From 5046005b0eae524b0c90171f7b97faad2506cc54 Mon Sep 17 00:00:00 2001 From: "Dr. Tobias Quathamer" Date: Sat, 22 Apr 2017 22:30:07 +0200 Subject: [PATCH] Use Gravity.START and .END rather than .LEFT and .RIGHT --- .../java/com/b44t/ui/ActionBar/ActionBar.java | 20 +++++----- .../b44t/ui/ActionBar/ActionBarLayout.java | 4 +- .../b44t/ui/ActionBar/ActionBarMenuItem.java | 2 +- .../com/b44t/ui/ActionBar/BottomSheet.java | 8 ++-- .../com/b44t/ui/ActionBar/SimpleTextView.java | 2 +- .../java/com/b44t/ui/AudioSelectActivity.java | 4 +- .../com/b44t/ui/BlockedUsersActivity.java | 2 +- .../com/b44t/ui/Cells/ChatUnreadCell.java | 2 +- .../com/b44t/ui/Cells/DrawerActionCell.java | 4 +- .../com/b44t/ui/Cells/DrawerProfileCell.java | 10 ++--- .../b44t/ui/Cells/PhotoAttachPhotoCell.java | 4 +- .../com/b44t/ui/Cells/PhotoEditToolCell.java | 6 +-- .../b44t/ui/Cells/PhotoPickerAlbumsCell.java | 4 +- .../b44t/ui/Cells/PhotoPickerPhotoCell.java | 4 +- .../java/com/b44t/ui/Cells/WallpaperCell.java | 4 +- .../main/java/com/b44t/ui/ChatActivity.java | 16 ++++---- .../ui/Components/ChatActivityEnterView.java | 16 ++++---- .../b44t/ui/Components/ChatAttachAlert.java | 6 +-- .../ui/Components/ChatAvatarContainer.java | 4 +- .../com/b44t/ui/Components/EmojiView.java | 6 +-- .../com/b44t/ui/Components/PasscodeView.java | 16 ++++---- .../b44t/ui/Components/PhotoFilterView.java | 32 +++++++-------- .../ui/Components/PickerBottomLayout.java | 4 +- .../java/com/b44t/ui/ContactAddActivity.java | 2 +- .../com/b44t/ui/GroupCreateFinalActivity.java | 2 +- .../java/com/b44t/ui/PasscodeActivity.java | 6 +-- .../com/b44t/ui/PhotoAlbumPickerActivity.java | 6 +-- .../java/com/b44t/ui/PhotoPickerActivity.java | 2 +- .../main/java/com/b44t/ui/PhotoViewer.java | 40 +++++++++---------- .../java/com/b44t/ui/ProfileActivity.java | 14 +++---- .../b44t/ui/ProfileNotificationsActivity.java | 8 ++-- .../java/com/b44t/ui/SettingsAdvActivity.java | 2 +- .../com/b44t/ui/StickerPreviewViewer.java | 2 +- .../java/com/b44t/ui/WallpapersActivity.java | 2 +- 34 files changed, 133 insertions(+), 133 deletions(-) diff --git a/MessengerProj/src/main/java/com/b44t/ui/ActionBar/ActionBar.java b/MessengerProj/src/main/java/com/b44t/ui/ActionBar/ActionBar.java index 57af1d4fa..f73056098 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/ActionBar/ActionBar.java +++ b/MessengerProj/src/main/java/com/b44t/ui/ActionBar/ActionBar.java @@ -90,7 +90,7 @@ public class ActionBar extends FrameLayout { backButtonImageView.setScaleType(ImageView.ScaleType.CENTER); backButtonImageView.setBackgroundDrawable(Theme.createBarSelectorDrawable(itemsBackgroundColor)); backButtonImageView.setPadding(AndroidUtilities.dp(1), 0, 0, 0); - addView(backButtonImageView, LayoutHelper.createFrame(54, 54, Gravity.LEFT | Gravity.TOP)); + addView(backButtonImageView, LayoutHelper.createFrame(54, 54, Gravity.START | Gravity.TOP)); backButtonImageView.setOnClickListener(new OnClickListener() { @Override @@ -130,10 +130,10 @@ public class ActionBar extends FrameLayout { return; } subtitleTextView = new SimpleTextView(getContext()); - subtitleTextView.setGravity(Gravity.LEFT); + subtitleTextView.setGravity(Gravity.START); subtitleTextView.setTextColor(Theme.ACTION_BAR_SUBTITLE_COLOR); subtitleTextView.setTextSize(Theme.ACTION_BAR_SUBTITLE_TEXT_SIZE); - addView(subtitleTextView, 0, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.TOP)); + addView(subtitleTextView, 0, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.START | Gravity.TOP)); } public void setAddToContainer(boolean value) { @@ -159,9 +159,9 @@ public class ActionBar extends FrameLayout { return; } titleTextView = new SimpleTextView(getContext()); - titleTextView.setGravity(Gravity.LEFT); + titleTextView.setGravity(Gravity.START); titleTextView.setTextColor(0xffffffff); - addView(titleTextView, 0, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.TOP)); + addView(titleTextView, 0, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.START | Gravity.TOP)); } public void setTitle(CharSequence value) { @@ -195,7 +195,7 @@ public class ActionBar extends FrameLayout { return menu; } menu = new ActionBarMenu(getContext(), this); - addView(menu, 0, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.MATCH_PARENT, Gravity.RIGHT)); + addView(menu, 0, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.MATCH_PARENT, Gravity.END)); return menu; } @@ -214,7 +214,7 @@ public class ActionBar extends FrameLayout { FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams)actionMode.getLayoutParams(); layoutParams.height = LayoutHelper.MATCH_PARENT; layoutParams.width = LayoutHelper.MATCH_PARENT; - layoutParams.gravity = Gravity.RIGHT; + layoutParams.gravity = Gravity.END; actionMode.setLayoutParams(layoutParams); actionMode.setVisibility(INVISIBLE); @@ -226,7 +226,7 @@ public class ActionBar extends FrameLayout { layoutParams = (FrameLayout.LayoutParams)actionModeTop.getLayoutParams(); layoutParams.height = AndroidUtilities.statusBarHeight; layoutParams.width = LayoutHelper.MATCH_PARENT; - layoutParams.gravity = Gravity.TOP | Gravity.LEFT; + layoutParams.gravity = Gravity.TOP | Gravity.START; actionModeTop.setLayoutParams(layoutParams); actionModeTop.setVisibility(INVISIBLE); } @@ -356,7 +356,7 @@ public class ActionBar extends FrameLayout { FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) actionModeTop.getLayoutParams(); layoutParams.height = AndroidUtilities.statusBarHeight; layoutParams.width = LayoutHelper.MATCH_PARENT; - layoutParams.gravity = Gravity.TOP | Gravity.LEFT; + layoutParams.gravity = Gravity.TOP | Gravity.START; actionModeTop.setLayoutParams(layoutParams); } } @@ -496,7 +496,7 @@ public class ActionBar extends FrameLayout { int gravity = lp.gravity; if (gravity == -1) { - gravity = Gravity.TOP | Gravity.LEFT; + gravity = Gravity.TOP | Gravity.START; } final int absoluteGravity = gravity & Gravity.HORIZONTAL_GRAVITY_MASK; diff --git a/MessengerProj/src/main/java/com/b44t/ui/ActionBar/ActionBarLayout.java b/MessengerProj/src/main/java/com/b44t/ui/ActionBar/ActionBarLayout.java index aa9538686..f141d5fe7 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/ActionBar/ActionBarLayout.java +++ b/MessengerProj/src/main/java/com/b44t/ui/ActionBar/ActionBarLayout.java @@ -186,7 +186,7 @@ public class ActionBarLayout extends FrameLayout { FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) containerViewBack.getLayoutParams(); layoutParams.width = LayoutHelper.MATCH_PARENT; layoutParams.height = LayoutHelper.MATCH_PARENT; - layoutParams.gravity = Gravity.TOP | Gravity.LEFT; + layoutParams.gravity = Gravity.TOP | Gravity.START; containerViewBack.setLayoutParams(layoutParams); containerView = new LinearLayoutContainer(parentActivity); @@ -194,7 +194,7 @@ public class ActionBarLayout extends FrameLayout { layoutParams = (FrameLayout.LayoutParams) containerView.getLayoutParams(); layoutParams.width = LayoutHelper.MATCH_PARENT; layoutParams.height = LayoutHelper.MATCH_PARENT; - layoutParams.gravity = Gravity.TOP | Gravity.LEFT; + layoutParams.gravity = Gravity.TOP | Gravity.START; containerView.setLayoutParams(layoutParams); for (BaseFragment fragment : fragmentsStack) { diff --git a/MessengerProj/src/main/java/com/b44t/ui/ActionBar/ActionBarMenuItem.java b/MessengerProj/src/main/java/com/b44t/ui/ActionBar/ActionBarMenuItem.java index 6ac6648e7..677839167 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/ActionBar/ActionBarMenuItem.java +++ b/MessengerProj/src/main/java/com/b44t/ui/ActionBar/ActionBarMenuItem.java @@ -506,7 +506,7 @@ public class ActionBarMenuItem extends FrameLayout { searchCountText.setTextSize(14); searchCountText.setText("1/10"); searchCountText.setVisibility(View.GONE); - searchContainer.addView(searchCountText, LayoutHelper.createLinear(48, LayoutHelper.WRAP_CONTENT, Gravity.LEFT|Gravity.CENTER_VERTICAL)); + searchContainer.addView(searchCountText, LayoutHelper.createLinear(48, LayoutHelper.WRAP_CONTENT, Gravity.START|Gravity.CENTER_VERTICAL)); searchUpButton = new ImageView(getContext()); searchUpButton.setImageResource(R.drawable.search_up); diff --git a/MessengerProj/src/main/java/com/b44t/ui/ActionBar/BottomSheet.java b/MessengerProj/src/main/java/com/b44t/ui/ActionBar/BottomSheet.java index d4ed3e48f..8fb11b6d8 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/ActionBar/BottomSheet.java +++ b/MessengerProj/src/main/java/com/b44t/ui/ActionBar/BottomSheet.java @@ -356,7 +356,7 @@ public class BottomSheet extends Dialog { int gravity = lp.gravity; if (gravity == -1) { - gravity = Gravity.TOP | Gravity.LEFT; + gravity = Gravity.TOP | Gravity.START; } final int absoluteGravity = gravity & Gravity.HORIZONTAL_GRAVITY_MASK; @@ -563,7 +563,7 @@ public class BottomSheet extends Dialog { ViewGroup viewGroup = (ViewGroup) customView.getParent(); viewGroup.removeView(customView); } - containerView.addView(customView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.TOP)); + containerView.addView(customView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.START | Gravity.TOP)); } else { int topOffset = 0; if (title != null) { @@ -591,7 +591,7 @@ public class BottomSheet extends Dialog { for (int a = 0; a < items.length; a++) { BottomSheetCell cell = new BottomSheetCell(getContext(), 0); cell.setTextAndIcon(items[a], itemIcons != null ? itemIcons[a] : 0); - containerView.addView(cell, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, Gravity.LEFT | Gravity.TOP, 0, topOffset, 0, 0)); + containerView.addView(cell, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, Gravity.START | Gravity.TOP, 0, topOffset, 0, 0)); topOffset += 48; cell.setTag(a); cell.setOnClickListener(new View.OnClickListener() { @@ -607,7 +607,7 @@ public class BottomSheet extends Dialog { WindowManager.LayoutParams params = window.getAttributes(); params.width = ViewGroup.LayoutParams.MATCH_PARENT; - params.gravity = Gravity.TOP | Gravity.LEFT; + params.gravity = Gravity.TOP | Gravity.START; params.dimAmount = 0; params.flags &= ~WindowManager.LayoutParams.FLAG_DIM_BEHIND; if (!focusable) { diff --git a/MessengerProj/src/main/java/com/b44t/ui/ActionBar/SimpleTextView.java b/MessengerProj/src/main/java/com/b44t/ui/ActionBar/SimpleTextView.java index 4bf9d7519..c9edb43da 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/ActionBar/SimpleTextView.java +++ b/MessengerProj/src/main/java/com/b44t/ui/ActionBar/SimpleTextView.java @@ -41,7 +41,7 @@ public class SimpleTextView extends View implements Drawable.Callback { private Layout layout; private TextPaint textPaint; - private int gravity = Gravity.LEFT | Gravity.TOP; + private int gravity = Gravity.START | Gravity.TOP; private CharSequence text; //private SpannableStringBuilder spannableStringBuilder; private Drawable leftDrawable; diff --git a/MessengerProj/src/main/java/com/b44t/ui/AudioSelectActivity.java b/MessengerProj/src/main/java/com/b44t/ui/AudioSelectActivity.java index 23948319c..bcbdc2947 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/AudioSelectActivity.java +++ b/MessengerProj/src/main/java/com/b44t/ui/AudioSelectActivity.java @@ -119,7 +119,7 @@ public class AudioSelectActivity extends BaseFragment implements NotificationCen listView.setDivider(null); listView.setDividerHeight(0); listView.setAdapter(listViewAdapter = new ListAdapter(context)); - frameLayout.addView(listView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.LEFT | Gravity.TOP, 0, 0, 0, 48)); + frameLayout.addView(listView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.START | Gravity.TOP, 0, 0, 0, 48)); listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override @@ -161,7 +161,7 @@ public class AudioSelectActivity extends BaseFragment implements NotificationCen View shadow = new View(context); shadow.setBackgroundResource(R.drawable.header_shadow_reverse); - frameLayout.addView(shadow, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 3, Gravity.LEFT | Gravity.BOTTOM, 0, 0, 0, 48)); + frameLayout.addView(shadow, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 3, Gravity.START | Gravity.BOTTOM, 0, 0, 0, 48)); if (loadingAudio) { progressView.showProgress(); diff --git a/MessengerProj/src/main/java/com/b44t/ui/BlockedUsersActivity.java b/MessengerProj/src/main/java/com/b44t/ui/BlockedUsersActivity.java index c50d52924..e26b9047e 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/BlockedUsersActivity.java +++ b/MessengerProj/src/main/java/com/b44t/ui/BlockedUsersActivity.java @@ -108,7 +108,7 @@ public class BlockedUsersActivity extends BaseFragment implements NotificationCe emptyTextView.setGravity(Gravity.CENTER); emptyTextView.setVisibility(View.INVISIBLE); emptyTextView.setText(context.getString(R.string.NoBlocked)); - frameLayout.addView(emptyTextView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.LEFT)); + frameLayout.addView(emptyTextView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.START)); emptyTextView.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { diff --git a/MessengerProj/src/main/java/com/b44t/ui/Cells/ChatUnreadCell.java b/MessengerProj/src/main/java/com/b44t/ui/Cells/ChatUnreadCell.java index 0d4697f93..b1b712303 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/Cells/ChatUnreadCell.java +++ b/MessengerProj/src/main/java/com/b44t/ui/Cells/ChatUnreadCell.java @@ -46,7 +46,7 @@ public class ChatUnreadCell extends FrameLayout { FrameLayout frameLayout = new FrameLayout(context); frameLayout.setBackgroundResource(R.drawable.newmsg_divider); - addView(frameLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 27, Gravity.LEFT | Gravity.TOP, 0, 7, 0, 0)); + addView(frameLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 27, Gravity.START | Gravity.TOP, 0, 7, 0, 0)); textView = new TextView(context); textView.setPadding(0, 0, 0, AndroidUtilities.dp(1)); diff --git a/MessengerProj/src/main/java/com/b44t/ui/Cells/DrawerActionCell.java b/MessengerProj/src/main/java/com/b44t/ui/Cells/DrawerActionCell.java index 79b4cf699..4d8432d9a 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/Cells/DrawerActionCell.java +++ b/MessengerProj/src/main/java/com/b44t/ui/Cells/DrawerActionCell.java @@ -45,9 +45,9 @@ public class DrawerActionCell extends FrameLayout { textView.setLines(1); textView.setMaxLines(1); textView.setSingleLine(true); - textView.setGravity(Gravity.LEFT | Gravity.CENTER_VERTICAL); + textView.setGravity(Gravity.START | Gravity.CENTER_VERTICAL); textView.setCompoundDrawablePadding(AndroidUtilities.dp(18)); - addView(textView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.LEFT | Gravity.TOP, 14, 0, 16, 0)); + addView(textView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.START | Gravity.TOP, 14, 0, 16, 0)); } @Override diff --git a/MessengerProj/src/main/java/com/b44t/ui/Cells/DrawerProfileCell.java b/MessengerProj/src/main/java/com/b44t/ui/Cells/DrawerProfileCell.java index e2a33aca8..0af5fabf6 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/Cells/DrawerProfileCell.java +++ b/MessengerProj/src/main/java/com/b44t/ui/Cells/DrawerProfileCell.java @@ -64,7 +64,7 @@ public class DrawerProfileCell extends FrameLayout { ImageView shadowView = new ImageView(context); shadowView.setScaleType(ImageView.ScaleType.FIT_XY); shadowView.setImageResource(R.drawable.bottom_shadow); - addView(shadowView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 100/*EDIT BY MR, was 70*/, Gravity.LEFT | Gravity.BOTTOM)); + addView(shadowView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 100/*EDIT BY MR, was 70*/, Gravity.START | Gravity.BOTTOM)); nameTextView = new TextView(context); nameTextView.setTextColor(0xffffffff); @@ -72,9 +72,9 @@ public class DrawerProfileCell extends FrameLayout { nameTextView.setLines(1); nameTextView.setMaxLines(1); nameTextView.setSingleLine(true); - nameTextView.setGravity(Gravity.LEFT); + nameTextView.setGravity(Gravity.START); nameTextView.setEllipsize(TextUtils.TruncateAt.END); - addView(nameTextView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.BOTTOM, 16, 0, 16, 28)); + addView(nameTextView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.START | Gravity.BOTTOM, 16, 0, 16, 28)); subtitleTextView = new TextView(context); subtitleTextView.setTextColor(0xffc2e5ff); @@ -82,9 +82,9 @@ public class DrawerProfileCell extends FrameLayout { subtitleTextView.setLines(1); subtitleTextView.setMaxLines(1); subtitleTextView.setSingleLine(true); - subtitleTextView.setGravity(Gravity.LEFT); + subtitleTextView.setGravity(Gravity.START); subtitleTextView.setTextColor(0xffffffff); - addView(subtitleTextView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.BOTTOM, 16, 0, 16, 9)); + addView(subtitleTextView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.START | Gravity.BOTTOM, 16, 0, 16, 9)); } @Override diff --git a/MessengerProj/src/main/java/com/b44t/ui/Cells/PhotoAttachPhotoCell.java b/MessengerProj/src/main/java/com/b44t/ui/Cells/PhotoAttachPhotoCell.java index bfa6b3f3d..9b834bf79 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/Cells/PhotoAttachPhotoCell.java +++ b/MessengerProj/src/main/java/com/b44t/ui/Cells/PhotoAttachPhotoCell.java @@ -61,14 +61,14 @@ public class PhotoAttachPhotoCell extends FrameLayout { imageView = new BackupImageView(context); addView(imageView, LayoutHelper.createFrame(80, 80)); checkFrame = new FrameLayout(context); - addView(checkFrame, LayoutHelper.createFrame(42, 42, Gravity.LEFT | Gravity.TOP, 38, 0, 0, 0)); + addView(checkFrame, LayoutHelper.createFrame(42, 42, Gravity.START | Gravity.TOP, 38, 0, 0, 0)); checkBox = new CheckBoxView(context, R.drawable.checkbig); checkBox.setSize(30); checkBox.setCheckOffset(AndroidUtilities.dp(1)); checkBox.setDrawBackground(true); checkBox.setColor(0xff3ccaef); - addView(checkBox, LayoutHelper.createFrame(30, 30, Gravity.LEFT | Gravity.TOP, 46, 4, 0, 0)); + addView(checkBox, LayoutHelper.createFrame(30, 30, Gravity.START | Gravity.TOP, 46, 4, 0, 0)); checkBox.setVisibility(VISIBLE); } diff --git a/MessengerProj/src/main/java/com/b44t/ui/Cells/PhotoEditToolCell.java b/MessengerProj/src/main/java/com/b44t/ui/Cells/PhotoEditToolCell.java index 4f1d4d35b..db16e9316 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/Cells/PhotoEditToolCell.java +++ b/MessengerProj/src/main/java/com/b44t/ui/Cells/PhotoEditToolCell.java @@ -45,7 +45,7 @@ public class PhotoEditToolCell extends FrameLayout { iconImage = new ImageView(context); iconImage.setScaleType(ImageView.ScaleType.CENTER); - addView(iconImage, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.LEFT, 0, 0, 0, 12)); + addView(iconImage, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.START, 0, 0, 0, 12)); nameTextView = new TextView(context); nameTextView.setGravity(Gravity.CENTER); @@ -54,12 +54,12 @@ public class PhotoEditToolCell extends FrameLayout { nameTextView.setMaxLines(1); nameTextView.setSingleLine(true); nameTextView.setEllipsize(TextUtils.TruncateAt.END); - addView(nameTextView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.BOTTOM, 4, 0, 4, 0)); + addView(nameTextView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.START | Gravity.BOTTOM, 4, 0, 4, 0)); valueTextView = new TextView(context); valueTextView.setTextColor(0xff6cc3ff); valueTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 11); - addView(valueTextView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.TOP, 57, 3, 0, 0)); + addView(valueTextView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.START | Gravity.TOP, 57, 3, 0, 0)); } @Override diff --git a/MessengerProj/src/main/java/com/b44t/ui/Cells/PhotoPickerAlbumsCell.java b/MessengerProj/src/main/java/com/b44t/ui/Cells/PhotoPickerAlbumsCell.java index cf8596cd5..7f86476b6 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/Cells/PhotoPickerAlbumsCell.java +++ b/MessengerProj/src/main/java/com/b44t/ui/Cells/PhotoPickerAlbumsCell.java @@ -67,7 +67,7 @@ public class PhotoPickerAlbumsCell extends FrameLayout { LinearLayout linearLayout = new LinearLayout(context); linearLayout.setOrientation(LinearLayout.HORIZONTAL); linearLayout.setBackgroundColor(0x7f000000); - addView(linearLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 28, Gravity.LEFT | Gravity.BOTTOM)); + addView(linearLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 28, Gravity.START | Gravity.BOTTOM)); nameTextView = new TextView(context); nameTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 15); @@ -170,7 +170,7 @@ public class PhotoPickerAlbumsCell extends FrameLayout { layoutParams.leftMargin = (itemWidth + AndroidUtilities.dp(4)) * a; layoutParams.width = itemWidth; layoutParams.height = itemWidth; - layoutParams.gravity = Gravity.LEFT | Gravity.TOP; + layoutParams.gravity = Gravity.START | Gravity.TOP; albumViews[a].setLayoutParams(layoutParams); } diff --git a/MessengerProj/src/main/java/com/b44t/ui/Cells/PhotoPickerPhotoCell.java b/MessengerProj/src/main/java/com/b44t/ui/Cells/PhotoPickerPhotoCell.java index c4df878f3..361c10355 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/Cells/PhotoPickerPhotoCell.java +++ b/MessengerProj/src/main/java/com/b44t/ui/Cells/PhotoPickerPhotoCell.java @@ -52,14 +52,14 @@ public class PhotoPickerPhotoCell extends FrameLayout { addView(photoImage, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT)); checkFrame = new FrameLayout(context); - addView(checkFrame, LayoutHelper.createFrame(42, 42, Gravity.RIGHT | Gravity.TOP)); + addView(checkFrame, LayoutHelper.createFrame(42, 42, Gravity.END | Gravity.TOP)); checkBox = new CheckBoxView(context, R.drawable.checkbig); checkBox.setSize(30); checkBox.setCheckOffset(AndroidUtilities.dp(1)); checkBox.setDrawBackground(true); checkBox.setColor(0xff3ccaef); - addView(checkBox, LayoutHelper.createFrame(30, 30, Gravity.RIGHT | Gravity.TOP, 0, 4, 4, 0)); + addView(checkBox, LayoutHelper.createFrame(30, 30, Gravity.END | Gravity.TOP, 0, 4, 4, 0)); } @Override diff --git a/MessengerProj/src/main/java/com/b44t/ui/Cells/WallpaperCell.java b/MessengerProj/src/main/java/com/b44t/ui/Cells/WallpaperCell.java index 8cf33571f..e3ae7f3aa 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/Cells/WallpaperCell.java +++ b/MessengerProj/src/main/java/com/b44t/ui/Cells/WallpaperCell.java @@ -46,12 +46,12 @@ public class WallpaperCell extends FrameLayout { super(context); imageView = new BackupImageView(context); - addView(imageView, LayoutHelper.createFrame(100, 100, Gravity.LEFT | Gravity.BOTTOM)); + addView(imageView, LayoutHelper.createFrame(100, 100, Gravity.START | Gravity.BOTTOM)); imageView2 = new ImageView(context); imageView2.setImageResource(R.drawable.ic_gallery_background); imageView2.setScaleType(ImageView.ScaleType.CENTER); - addView(imageView2, LayoutHelper.createFrame(100, 100, Gravity.LEFT | Gravity.BOTTOM)); + addView(imageView2, LayoutHelper.createFrame(100, 100, Gravity.START | Gravity.BOTTOM)); selectionView = new View(context); selectionView.setBackgroundResource(R.drawable.wall_selection); diff --git a/MessengerProj/src/main/java/com/b44t/ui/ChatActivity.java b/MessengerProj/src/main/java/com/b44t/ui/ChatActivity.java index 3bfde4516..b575a89ef 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/ChatActivity.java +++ b/MessengerProj/src/main/java/com/b44t/ui/ChatActivity.java @@ -526,7 +526,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not }); avatarContainer = new ChatAvatarContainer(context, this); - actionBar.addView(avatarContainer, 0, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.LEFT, 56, 0, 40, 0)); + actionBar.addView(avatarContainer, 0, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.START, 56, 0, 40, 0)); ActionBarMenu menu = actionBar.createMenu(); @@ -670,7 +670,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not actionModeTitleContainer.addView(actionModeTextView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT)); actionModeSubTextView = new SimpleTextView(context); - actionModeSubTextView.setGravity(Gravity.LEFT); + actionModeSubTextView.setGravity(Gravity.START); actionModeSubTextView.setTextColor(Theme.ACTION_BAR_ACTION_MODE_TEXT_COLOR); actionModeTitleContainer.addView(actionModeSubTextView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT)); actionModeViews.add(actionMode.addItem(ID_DELETE_MESSAGES, R.drawable.ic_ab_fwd_delete, Theme.ACTION_BAR_MODE_SELECTOR_COLOR, null, AndroidUtilities.dp(54))); @@ -753,7 +753,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not int gravity = lp.gravity; if (gravity == -1) { - gravity = Gravity.TOP | Gravity.LEFT; + gravity = Gravity.TOP | Gravity.START; } final int absoluteGravity = gravity & Gravity.HORIZONTAL_GRAVITY_MASK; @@ -822,12 +822,12 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not if( m_mrChat.getParamInt(MrChat.MR_CHAT_PARAM_UNPROMOTED, 0)==1 ) { emptyView.setText(context.getString(R.string.MsgNewGroupDraftHint)); - emptyView.setGravity(Gravity.LEFT); + emptyView.setGravity(Gravity.START); } else if( m_mrChat.getType()==MrChat.MR_CHAT_NORMAL ){ String name = m_mrChat.getName(); emptyView.setText(AndroidUtilities.replaceTags(String.format(context.getString(R.string.NoMessagesHint), name, name))); - emptyView.setGravity(Gravity.LEFT); + emptyView.setGravity(Gravity.START); } else { emptyView.setText(context.getString(R.string.NoMessages)); @@ -1004,7 +1004,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not pagedownButton = new FrameLayout(context); pagedownButton.setVisibility(View.INVISIBLE); - contentView.addView(pagedownButton, LayoutHelper.createFrame(46, 59, Gravity.RIGHT | Gravity.BOTTOM, 0, 0, 7, 5)); + contentView.addView(pagedownButton, LayoutHelper.createFrame(46, 59, Gravity.END | Gravity.BOTTOM, 0, 0, 7, 5)); pagedownButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { @@ -1018,7 +1018,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not ImageView pagedownButtonImage = new ImageView(context); pagedownButtonImage.setImageResource(R.drawable.pagedown); - pagedownButton.addView(pagedownButtonImage, LayoutHelper.createFrame(46, 46, Gravity.LEFT | Gravity.BOTTOM)); + pagedownButton.addView(pagedownButtonImage, LayoutHelper.createFrame(46, 46, Gravity.START | Gravity.BOTTOM)); pagedownButtonCounter = new TextView(context); pagedownButtonCounter.setVisibility(View.INVISIBLE); @@ -1039,7 +1039,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not chatActivityEnterView.setAllowStickersAndGifs(false, false); // for the moment, we have no stickers - contentView.addView(chatActivityEnterView, contentView.getChildCount() - 1, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.BOTTOM)); + contentView.addView(chatActivityEnterView, contentView.getChildCount() - 1, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.START | Gravity.BOTTOM)); chatActivityEnterView.setDelegate(new ChatActivityEnterView.ChatActivityEnterViewDelegate() { @Override public void onMessageSend(CharSequence message) { diff --git a/MessengerProj/src/main/java/com/b44t/ui/Components/ChatActivityEnterView.java b/MessengerProj/src/main/java/com/b44t/ui/Components/ChatActivityEnterView.java index fd2ba1117..97c6ba1e3 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/Components/ChatActivityEnterView.java +++ b/MessengerProj/src/main/java/com/b44t/ui/Components/ChatActivityEnterView.java @@ -438,7 +438,7 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe textFieldContainer = new LinearLayout(context); //textFieldContainer.setBackgroundColor(0xffffffff); textFieldContainer.setOrientation(LinearLayout.HORIZONTAL); - addView(textFieldContainer, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.TOP, 0, 2, 0, 0)); + addView(textFieldContainer, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.START | Gravity.TOP, 0, 2, 0, 0)); FrameLayout frameLayout = new FrameLayout(context); textFieldContainer.addView(frameLayout, LayoutHelper.createLinear(0, LayoutHelper.WRAP_CONTENT, 1.0f)); @@ -450,7 +450,7 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe if (Build.VERSION.SDK_INT >= 21) { emojiButton.setBackgroundDrawable(Theme.createBarSelectorDrawable(Theme.INPUT_FIELD_SELECTOR_COLOR)); } - frameLayout.addView(emojiButton, LayoutHelper.createFrame(48, 48, Gravity.BOTTOM | Gravity.LEFT, 3, 0, 0, 0)); + frameLayout.addView(emojiButton, LayoutHelper.createFrame(48, 48, Gravity.BOTTOM | Gravity.START, 3, 0, 0, 0)); emojiButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { @@ -588,7 +588,7 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe attachButton.setOrientation(LinearLayout.HORIZONTAL); attachButton.setEnabled(false); attachButton.setPivotX(AndroidUtilities.dp(48)); - frameLayout.addView(attachButton, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, 48, Gravity.BOTTOM | Gravity.RIGHT)); + frameLayout.addView(attachButton, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, 48, Gravity.BOTTOM | Gravity.END)); } recordedAudioPanel = new FrameLayout(context); @@ -620,15 +620,15 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe View view = new View(context); view.setBackgroundResource(R.drawable.recorded); - recordedAudioPanel.addView(view, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 32, Gravity.CENTER_VERTICAL | Gravity.LEFT, 48, 0, 0, 0)); + recordedAudioPanel.addView(view, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 32, Gravity.CENTER_VERTICAL | Gravity.START, 48, 0, 0, 0)); recordedAudioSeekBar = new SeekBarWaveformView(context); - recordedAudioPanel.addView(recordedAudioSeekBar, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 32, Gravity.CENTER_VERTICAL | Gravity.LEFT, 48 + 44, 0, 52, 0)); + recordedAudioPanel.addView(recordedAudioSeekBar, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 32, Gravity.CENTER_VERTICAL | Gravity.START, 48 + 44, 0, 52, 0)); recordedAudioPlayButton = new ImageView(context); recordedAudioPlayButton.setImageResource(R.drawable.s_player_play_states); recordedAudioPlayButton.setScaleType(ImageView.ScaleType.CENTER); - recordedAudioPanel.addView(recordedAudioPlayButton, LayoutHelper.createFrame(48, 48, Gravity.LEFT | Gravity.BOTTOM, 48, 0, 0, 0)); + recordedAudioPanel.addView(recordedAudioPlayButton, LayoutHelper.createFrame(48, 48, Gravity.START | Gravity.BOTTOM, 48, 0, 0, 0)); recordedAudioPlayButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { @@ -649,7 +649,7 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe recordedAudioTimeTextView.setTextColor(0xffffffff); recordedAudioTimeTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 13); recordedAudioTimeTextView.setText("0:13"); - recordedAudioPanel.addView(recordedAudioTimeTextView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.RIGHT | Gravity.CENTER_VERTICAL, 0, 0, 13, 0)); + recordedAudioPanel.addView(recordedAudioTimeTextView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.END | Gravity.CENTER_VERTICAL, 0, 0, 13, 0)); recordPanel = new FrameLayout(context); recordPanel.setVisibility(GONE); @@ -763,7 +763,7 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe recordCircle = new RecordCircle(context); recordCircle.setVisibility(GONE); - sizeNotifierLayout.addView(recordCircle, LayoutHelper.createFrame(124, 124, Gravity.BOTTOM | Gravity.RIGHT, 0, 0, -36, -38)); + sizeNotifierLayout.addView(recordCircle, LayoutHelper.createFrame(124, 124, Gravity.BOTTOM | Gravity.END, 0, 0, -36, -38)); sendButton = new ImageView(context); sendButton.setVisibility(INVISIBLE); diff --git a/MessengerProj/src/main/java/com/b44t/ui/Components/ChatAttachAlert.java b/MessengerProj/src/main/java/com/b44t/ui/Components/ChatAttachAlert.java index e9759f396..2e45d2556 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/Components/ChatAttachAlert.java +++ b/MessengerProj/src/main/java/com/b44t/ui/Components/ChatAttachAlert.java @@ -138,7 +138,7 @@ public class ChatAttachAlert extends BottomSheet implements NotificationCenter.N textView.setEllipsize(TextUtils.TruncateAt.END); textView.setTextColor(Theme.ATTACH_SHEET_TEXT_COLOR); textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 12); - addView(textView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.TOP, 0, 64, 0, 0)); + addView(textView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.START | Gravity.TOP, 0, 64, 0, 0)); } @Override @@ -339,7 +339,7 @@ public class ChatAttachAlert extends BottomSheet implements NotificationCenter.N } }; lineView.setBackgroundColor(0xffd2d2d2); - attachView.addView(lineView, new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 1, Gravity.TOP | Gravity.LEFT)); + attachView.addView(lineView, new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 1, Gravity.TOP | Gravity.START)); CharSequence[] labels = new CharSequence[ATTACH_BUTTON_COUNT]; labels[ATTACH_BUTTON_IDX_CAMERA] = ApplicationLoader.applicationContext.getString(R.string.ChatCamera); @@ -354,7 +354,7 @@ public class ChatAttachAlert extends BottomSheet implements NotificationCenter.N for (int a = 0; a < ATTACH_BUTTON_COUNT; a++) { AttachButton attachButton = new AttachButton(context); attachButton.setTextAndIcon(labels[a], Theme.attachButtonDrawables[a]); - attachView.addView(attachButton, LayoutHelper.createFrame(85, 90, Gravity.LEFT | Gravity.TOP)); + attachView.addView(attachButton, LayoutHelper.createFrame(85, 90, Gravity.START | Gravity.TOP)); attachButton.setTag(a); views[a] = attachButton; if (a == ATTACH_BUTTON_IDX_SENDSELECTED) { diff --git a/MessengerProj/src/main/java/com/b44t/ui/Components/ChatAvatarContainer.java b/MessengerProj/src/main/java/com/b44t/ui/Components/ChatAvatarContainer.java index a0b38bed6..c47be2587 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/Components/ChatAvatarContainer.java +++ b/MessengerProj/src/main/java/com/b44t/ui/Components/ChatAvatarContainer.java @@ -61,7 +61,7 @@ public class ChatAvatarContainer extends FrameLayout { titleTextView = new SimpleTextView(context); titleTextView.setTextColor(Theme.ACTION_BAR_TITLE_COLOR); titleTextView.setTextSize(18); - titleTextView.setGravity(Gravity.LEFT); + titleTextView.setGravity(Gravity.START); titleTextView.setLeftDrawableTopPadding(-AndroidUtilities.dp(1.3f)); titleTextView.setRightDrawableTopPadding(-AndroidUtilities.dp(1.3f)); addView(titleTextView); @@ -69,7 +69,7 @@ public class ChatAvatarContainer extends FrameLayout { subtitleTextView = new SimpleTextView(context); subtitleTextView.setTextColor(Theme.ACTION_BAR_SUBTITLE_COLOR); subtitleTextView.setTextSize(Theme.ACTION_BAR_SUBTITLE_TEXT_SIZE); - subtitleTextView.setGravity(Gravity.LEFT); + subtitleTextView.setGravity(Gravity.START); addView(subtitleTextView); setOnClickListener(new View.OnClickListener() { diff --git a/MessengerProj/src/main/java/com/b44t/ui/Components/EmojiView.java b/MessengerProj/src/main/java/com/b44t/ui/Components/EmojiView.java index 90c83ef83..801a54d11 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/Components/EmojiView.java +++ b/MessengerProj/src/main/java/com/b44t/ui/Components/EmojiView.java @@ -780,7 +780,7 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific scrollSlidingTabStrip.setIndicatorColor(0xffe2e5e7); scrollSlidingTabStrip.setUnderlineColor(0xffe2e5e7); scrollSlidingTabStrip.setVisibility(INVISIBLE); - addView(scrollSlidingTabStrip, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, Gravity.LEFT | Gravity.TOP)); + addView(scrollSlidingTabStrip, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, Gravity.START | Gravity.TOP)); scrollSlidingTabStrip.setTranslationX(AndroidUtilities.displaySize.x); updateStickerTabs(); scrollSlidingTabStrip.setDelegate(new ScrollSlidingTabStrip.ScrollSlidingTabStripDelegate() { @@ -921,7 +921,7 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific View view = new View(context); view.setBackgroundColor(0xffe2e5e7); - frameLayout.addView(view, LayoutHelper.createFrame(52, 1, Gravity.LEFT | Gravity.BOTTOM)); + frameLayout.addView(view, LayoutHelper.createFrame(52, 1, Gravity.START | Gravity.BOTTOM)); recentsWrap = new FrameLayout(context); recentsWrap.addView(views.get(0)); @@ -934,7 +934,7 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific recentsWrap.addView(textView); views.get(0).setEmptyView(textView); - addView(pager, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.LEFT | Gravity.TOP, 0, 48, 0, 0)); + addView(pager, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.START | Gravity.TOP, 0, 48, 0, 0)); emojiSize = AndroidUtilities.dp(AndroidUtilities.isTablet() ? 40 : 32); pickerView = new EmojiColorPickerView(context); diff --git a/MessengerProj/src/main/java/com/b44t/ui/Components/PasscodeView.java b/MessengerProj/src/main/java/com/b44t/ui/Components/PasscodeView.java index 153b265b1..494118afb 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/Components/PasscodeView.java +++ b/MessengerProj/src/main/java/com/b44t/ui/Components/PasscodeView.java @@ -118,7 +118,7 @@ public class PasscodeView extends FrameLayout { layoutParams = (LayoutParams) passwordFrameLayout.getLayoutParams(); layoutParams.width = LayoutHelper.MATCH_PARENT; layoutParams.height = LayoutHelper.MATCH_PARENT; - layoutParams.gravity = Gravity.TOP | Gravity.LEFT; + layoutParams.gravity = Gravity.TOP | Gravity.START; passwordFrameLayout.setLayoutParams(layoutParams); ImageView imageView = new ImageView(context); @@ -224,7 +224,7 @@ public class PasscodeView extends FrameLayout { layoutParams.height = AndroidUtilities.dp(60); layoutParams.bottomMargin = AndroidUtilities.dp(4); layoutParams.rightMargin = AndroidUtilities.dp(10); - layoutParams.gravity = Gravity.BOTTOM | Gravity.RIGHT; + layoutParams.gravity = Gravity.BOTTOM | Gravity.END; checkImage.setLayoutParams(layoutParams); checkImage.setOnClickListener(new OnClickListener() { @Override @@ -239,7 +239,7 @@ public class PasscodeView extends FrameLayout { layoutParams = (LayoutParams) lineFrameLayout.getLayoutParams(); layoutParams.width = LayoutHelper.MATCH_PARENT; layoutParams.height = AndroidUtilities.dp(1); - layoutParams.gravity = Gravity.BOTTOM | Gravity.LEFT; + layoutParams.gravity = Gravity.BOTTOM | Gravity.START; layoutParams.leftMargin = AndroidUtilities.dp(20); layoutParams.rightMargin = AndroidUtilities.dp(20); lineFrameLayout.setLayoutParams(layoutParams); @@ -249,7 +249,7 @@ public class PasscodeView extends FrameLayout { layoutParams = (LayoutParams) numbersFrameLayout.getLayoutParams(); layoutParams.width = LayoutHelper.MATCH_PARENT; layoutParams.height = LayoutHelper.MATCH_PARENT; - layoutParams.gravity = Gravity.TOP | Gravity.LEFT; + layoutParams.gravity = Gravity.TOP | Gravity.START; numbersFrameLayout.setLayoutParams(layoutParams); lettersTextViews = new ArrayList<>(10); @@ -265,7 +265,7 @@ public class PasscodeView extends FrameLayout { layoutParams = (LayoutParams) textView.getLayoutParams(); layoutParams.width = AndroidUtilities.dp(50); layoutParams.height = AndroidUtilities.dp(50); - layoutParams.gravity = Gravity.TOP | Gravity.LEFT; + layoutParams.gravity = Gravity.TOP | Gravity.START; textView.setLayoutParams(layoutParams); numberTextViews.add(textView); @@ -277,7 +277,7 @@ public class PasscodeView extends FrameLayout { layoutParams = (LayoutParams) textView.getLayoutParams(); layoutParams.width = AndroidUtilities.dp(50); layoutParams.height = AndroidUtilities.dp(20); - layoutParams.gravity = Gravity.TOP | Gravity.LEFT; + layoutParams.gravity = Gravity.TOP | Gravity.START; textView.setLayoutParams(layoutParams); switch (a) { case 0: @@ -319,7 +319,7 @@ public class PasscodeView extends FrameLayout { layoutParams = (LayoutParams) eraseView.getLayoutParams(); layoutParams.width = AndroidUtilities.dp(50); layoutParams.height = AndroidUtilities.dp(50); - layoutParams.gravity = Gravity.TOP | Gravity.LEFT; + layoutParams.gravity = Gravity.TOP | Gravity.START; eraseView.setLayoutParams(layoutParams); for (int a = 0; a < 11; a++) { FrameLayout frameLayout = new FrameLayout(context); @@ -389,7 +389,7 @@ public class PasscodeView extends FrameLayout { layoutParams = (LayoutParams) frameLayout.getLayoutParams(); layoutParams.width = AndroidUtilities.dp(100); layoutParams.height = AndroidUtilities.dp(100); - layoutParams.gravity = Gravity.TOP | Gravity.LEFT; + layoutParams.gravity = Gravity.TOP | Gravity.START; frameLayout.setLayoutParams(layoutParams); } } diff --git a/MessengerProj/src/main/java/com/b44t/ui/Components/PhotoFilterView.java b/MessengerProj/src/main/java/com/b44t/ui/Components/PhotoFilterView.java index 9ee4854be..7f8c786fb 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/Components/PhotoFilterView.java +++ b/MessengerProj/src/main/java/com/b44t/ui/Components/PhotoFilterView.java @@ -2003,7 +2003,7 @@ public class PhotoFilterView extends FrameLayout { //setLayerType(LAYER_TYPE_HARDWARE, null); //textureView.setLayerType(LAYER_TYPE_HARDWARE, null); } - addView(textureView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.LEFT)); + addView(textureView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.START)); textureView.setVisibility(INVISIBLE); textureView.setSurfaceTextureListener(new TextureView.SurfaceTextureListener() { @Override @@ -2048,7 +2048,7 @@ public class PhotoFilterView extends FrameLayout { blurControl = new PhotoFilterBlurControl(context); blurControl.setVisibility(INVISIBLE); - addView(blurControl, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.LEFT | Gravity.TOP)); + addView(blurControl, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.START | Gravity.TOP)); blurControl.setDelegate(new PhotoFilterBlurControl.PhotoFilterLinearBlurControlDelegate() { @Override public void valueChanged(Point centerPoint, float falloff, float size, float angle) { @@ -2072,14 +2072,14 @@ public class PhotoFilterView extends FrameLayout { } }); curvesControl.setVisibility(INVISIBLE); - addView(curvesControl, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.LEFT | Gravity.TOP)); + addView(curvesControl, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.START | Gravity.TOP)); toolsView = new FrameLayout(context); - addView(toolsView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 126, Gravity.LEFT | Gravity.BOTTOM)); + addView(toolsView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 126, Gravity.START | Gravity.BOTTOM)); FrameLayout frameLayout = new FrameLayout(context); frameLayout.setBackgroundColor(0xff1a1a1a); - toolsView.addView(frameLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, Gravity.BOTTOM | Gravity.LEFT)); + toolsView.addView(frameLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, Gravity.BOTTOM | Gravity.START)); cancelTextView = new TextView(context); cancelTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 14); @@ -2088,7 +2088,7 @@ public class PhotoFilterView extends FrameLayout { cancelTextView.setBackgroundDrawable(Theme.createBarSelectorDrawable(Theme.ACTION_BAR_PICKER_SELECTOR_COLOR, false)); cancelTextView.setPadding(AndroidUtilities.dp(29), 0, AndroidUtilities.dp(29), 0); cancelTextView.setText(context.getString(R.string.Cancel).toUpperCase()); - frameLayout.addView(cancelTextView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.LEFT)); + frameLayout.addView(cancelTextView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.START)); doneTextView = new TextView(context); doneTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 14); @@ -2098,7 +2098,7 @@ public class PhotoFilterView extends FrameLayout { doneTextView.setPadding(AndroidUtilities.dp(29), 0, AndroidUtilities.dp(29), 0); doneTextView.setText(context.getString(R.string.Done).toUpperCase()); doneTextView.setTypeface(Typeface.DEFAULT_BOLD); - frameLayout.addView(doneTextView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.RIGHT)); + frameLayout.addView(doneTextView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.END)); recyclerListView = new RecyclerListView(context); LinearLayoutManager layoutManager = new LinearLayoutManager(context); @@ -2108,7 +2108,7 @@ public class PhotoFilterView extends FrameLayout { recyclerListView.setTag(12); recyclerListView.setOverScrollMode(RecyclerListView.OVER_SCROLL_NEVER); recyclerListView.setAdapter(toolsAdapter = new ToolsAdapter(context)); - toolsView.addView(recyclerListView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 60, Gravity.LEFT | Gravity.TOP)); + toolsView.addView(recyclerListView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 60, Gravity.START | Gravity.TOP)); recyclerListView.setOnItemClickListener(new RecyclerListView.OnItemClickListener() { @Override public void onItemClick(View view, int position) { @@ -2176,17 +2176,17 @@ public class PhotoFilterView extends FrameLayout { editView = new FrameLayout(context); editView.setVisibility(GONE); - addView(editView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 126, Gravity.LEFT | Gravity.BOTTOM)); + addView(editView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 126, Gravity.START | Gravity.BOTTOM)); frameLayout = new FrameLayout(context); frameLayout.setBackgroundColor(0xff1a1a1a); - editView.addView(frameLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, Gravity.BOTTOM | Gravity.LEFT)); + editView.addView(frameLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, Gravity.BOTTOM | Gravity.START)); ImageView imageView = new ImageView(context); imageView.setImageResource(R.drawable.edit_cancel); imageView.setBackgroundDrawable(Theme.createBarSelectorDrawable(Theme.ACTION_BAR_PICKER_SELECTOR_COLOR, false)); imageView.setPadding(AndroidUtilities.dp(22), 0, AndroidUtilities.dp(22), 0); - frameLayout.addView(imageView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.LEFT)); + frameLayout.addView(imageView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.START)); imageView.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { @@ -2234,7 +2234,7 @@ public class PhotoFilterView extends FrameLayout { imageView.setImageResource(R.drawable.edit_doneblue); imageView.setBackgroundDrawable(Theme.createBarSelectorDrawable(Theme.ACTION_BAR_PICKER_SELECTOR_COLOR, false)); imageView.setPadding(AndroidUtilities.dp(22), AndroidUtilities.dp(1), AndroidUtilities.dp(22), 0); - frameLayout.addView(imageView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.RIGHT)); + frameLayout.addView(imageView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.END)); imageView.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { @@ -2292,7 +2292,7 @@ public class PhotoFilterView extends FrameLayout { } } }); - editView.addView(valueSeekBar, LayoutHelper.createFrame(AndroidUtilities.isTablet() ? 498 : LayoutHelper.MATCH_PARENT, 60, AndroidUtilities.isTablet() ? Gravity.CENTER_HORIZONTAL | Gravity.TOP : Gravity.LEFT | Gravity.TOP, 14, 10, 14, 0)); + editView.addView(valueSeekBar, LayoutHelper.createFrame(AndroidUtilities.isTablet() ? 498 : LayoutHelper.MATCH_PARENT, 60, AndroidUtilities.isTablet() ? Gravity.CENTER_HORIZONTAL | Gravity.TOP : Gravity.START | Gravity.TOP, 14, 10, 14, 0)); curveLayout = new FrameLayout(context); editView.addView(curveLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 78, Gravity.CENTER_HORIZONTAL)); @@ -2365,7 +2365,7 @@ public class PhotoFilterView extends FrameLayout { tintButtonsContainer = new LinearLayout(context); tintButtonsContainer.setOrientation(LinearLayout.HORIZONTAL); tintButtonsContainer.setPadding(AndroidUtilities.dp(10), 0, AndroidUtilities.dp(10), 0); - tintLayout.addView(tintButtonsContainer, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 50, Gravity.LEFT | Gravity.TOP, 0, 24, 0, 0)); + tintLayout.addView(tintButtonsContainer, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 50, Gravity.START | Gravity.TOP, 0, 24, 0, 0)); for (int a = 0; a < tintShadowColors.length; a++) { RadioButton radioButton = new RadioButton(context); radioButton.setSize(AndroidUtilities.dp(20)); @@ -2418,7 +2418,7 @@ public class PhotoFilterView extends FrameLayout { blurRadialButton.setTextColor(0xffffffff); blurRadialButton.setGravity(Gravity.CENTER_HORIZONTAL); blurRadialButton.setText(context.getString(R.string.BlurRadial)); - blurLayout.addView(blurRadialButton, LayoutHelper.createFrame(80, 80, Gravity.LEFT | Gravity.TOP, 100, 0, 0, 0)); + blurLayout.addView(blurRadialButton, LayoutHelper.createFrame(80, 80, Gravity.START | Gravity.TOP, 100, 0, 0, 0)); blurRadialButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { @@ -2439,7 +2439,7 @@ public class PhotoFilterView extends FrameLayout { blurLinearButton.setTextColor(0xffffffff); blurLinearButton.setGravity(Gravity.CENTER_HORIZONTAL); blurLinearButton.setText(context.getString(R.string.BlurLinear)); - blurLayout.addView(blurLinearButton, LayoutHelper.createFrame(80, 80, Gravity.LEFT | Gravity.TOP, 200, 0, 0, 0)); + blurLayout.addView(blurLinearButton, LayoutHelper.createFrame(80, 80, Gravity.START | Gravity.TOP, 200, 0, 0, 0)); blurLinearButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { diff --git a/MessengerProj/src/main/java/com/b44t/ui/Components/PickerBottomLayout.java b/MessengerProj/src/main/java/com/b44t/ui/Components/PickerBottomLayout.java index 4bf2be90a..116e91209 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/Components/PickerBottomLayout.java +++ b/MessengerProj/src/main/java/com/b44t/ui/Components/PickerBottomLayout.java @@ -63,13 +63,13 @@ public class PickerBottomLayout extends FrameLayout { cancelButton.setBackgroundDrawable(Theme.createBarSelectorDrawable(isDarkTheme ? Theme.ACTION_BAR_PICKER_SELECTOR_COLOR : Theme.ACTION_BAR_AUDIO_SELECTOR_COLOR, false)); cancelButton.setPadding(AndroidUtilities.dp(29), 0, AndroidUtilities.dp(29), 0); cancelButton.setText(context.getString(R.string.Cancel).toUpperCase()); - addView(cancelButton, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.LEFT)); + addView(cancelButton, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.START)); doneButton = new LinearLayout(context); doneButton.setOrientation(LinearLayout.HORIZONTAL); doneButton.setBackgroundDrawable(Theme.createBarSelectorDrawable(isDarkTheme ? Theme.ACTION_BAR_PICKER_SELECTOR_COLOR : Theme.ACTION_BAR_AUDIO_SELECTOR_COLOR, false)); doneButton.setPadding(AndroidUtilities.dp(29), 0, AndroidUtilities.dp(29), 0); - addView(doneButton, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.RIGHT)); + addView(doneButton, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.END)); doneButtonBadgeTextView = new TextView(context); doneButtonBadgeTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 13); diff --git a/MessengerProj/src/main/java/com/b44t/ui/ContactAddActivity.java b/MessengerProj/src/main/java/com/b44t/ui/ContactAddActivity.java index d6e54db69..8eeb34a53 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/ContactAddActivity.java +++ b/MessengerProj/src/main/java/com/b44t/ui/ContactAddActivity.java @@ -187,7 +187,7 @@ public class ContactAddActivity extends BaseFragment implements NotificationCent LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) frameLayout.getLayoutParams(); layoutParams.width = LayoutHelper.MATCH_PARENT; layoutParams.height = LayoutHelper.WRAP_CONTENT; - layoutParams.gravity = Gravity.TOP | Gravity.LEFT; + layoutParams.gravity = Gravity.TOP | Gravity.START; frameLayout.setLayoutParams(layoutParams); avatarImage = new BackupImageView(context); diff --git a/MessengerProj/src/main/java/com/b44t/ui/GroupCreateFinalActivity.java b/MessengerProj/src/main/java/com/b44t/ui/GroupCreateFinalActivity.java index 5319f45b4..c3a55956a 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/GroupCreateFinalActivity.java +++ b/MessengerProj/src/main/java/com/b44t/ui/GroupCreateFinalActivity.java @@ -167,7 +167,7 @@ public class GroupCreateFinalActivity extends BaseFragment implements Notificati LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) frameLayout.getLayoutParams(); layoutParams.width = LayoutHelper.MATCH_PARENT; layoutParams.height = LayoutHelper.WRAP_CONTENT; - layoutParams.gravity = Gravity.TOP | Gravity.LEFT; + layoutParams.gravity = Gravity.TOP | Gravity.START; frameLayout.setLayoutParams(layoutParams); avatarImage = new BackupImageView(context); diff --git a/MessengerProj/src/main/java/com/b44t/ui/PasscodeActivity.java b/MessengerProj/src/main/java/com/b44t/ui/PasscodeActivity.java index 822e8a01f..d6f623d3e 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/PasscodeActivity.java +++ b/MessengerProj/src/main/java/com/b44t/ui/PasscodeActivity.java @@ -201,7 +201,7 @@ public class PasscodeActivity extends BaseFragment implements NotificationCenter layoutParams.topMargin = AndroidUtilities.dp(90); layoutParams.height = AndroidUtilities.dp(36); layoutParams.leftMargin = AndroidUtilities.dp(40); - layoutParams.gravity = Gravity.TOP | Gravity.LEFT; + layoutParams.gravity = Gravity.TOP | Gravity.START; layoutParams.rightMargin = AndroidUtilities.dp(40); layoutParams.width = LayoutHelper.MATCH_PARENT; passwordEditText.setLayoutParams(layoutParams); @@ -273,7 +273,7 @@ public class PasscodeActivity extends BaseFragment implements NotificationCenter layoutParams.width = LayoutHelper.WRAP_CONTENT; layoutParams.rightMargin = AndroidUtilities.dp(40); layoutParams.leftMargin = AndroidUtilities.isTablet() ? AndroidUtilities.dp(64) : AndroidUtilities.dp(56); - layoutParams.gravity = Gravity.TOP | Gravity.LEFT; + layoutParams.gravity = Gravity.TOP | Gravity.START; dropDownContainer.setLayoutParams(layoutParams); dropDownContainer.setOnClickListener(new View.OnClickListener() { @Override @@ -283,7 +283,7 @@ public class PasscodeActivity extends BaseFragment implements NotificationCenter }); dropDown = new TextView(context); - dropDown.setGravity(Gravity.LEFT); + dropDown.setGravity(Gravity.START); dropDown.setSingleLine(true); dropDown.setLines(1); dropDown.setMaxLines(1); diff --git a/MessengerProj/src/main/java/com/b44t/ui/PhotoAlbumPickerActivity.java b/MessengerProj/src/main/java/com/b44t/ui/PhotoAlbumPickerActivity.java index c8a246128..b3951267a 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/PhotoAlbumPickerActivity.java +++ b/MessengerProj/src/main/java/com/b44t/ui/PhotoAlbumPickerActivity.java @@ -173,7 +173,7 @@ public class PhotoAlbumPickerActivity extends BaseFragment implements Notificati layoutParams.width = LayoutHelper.WRAP_CONTENT; layoutParams.rightMargin = AndroidUtilities.dp(40); layoutParams.leftMargin = AndroidUtilities.isTablet() ? AndroidUtilities.dp(64) : AndroidUtilities.dp(56); - layoutParams.gravity = Gravity.TOP | Gravity.LEFT; + layoutParams.gravity = Gravity.TOP | Gravity.START; dropDownContainer.setLayoutParams(layoutParams); dropDownContainer.setOnClickListener(new View.OnClickListener() { @Override @@ -183,7 +183,7 @@ public class PhotoAlbumPickerActivity extends BaseFragment implements Notificati }); dropDown = new TextView(context); - dropDown.setGravity(Gravity.LEFT); + dropDown.setGravity(Gravity.START); dropDown.setSingleLine(true); dropDown.setLines(1); dropDown.setMaxLines(1); @@ -290,7 +290,7 @@ public class PhotoAlbumPickerActivity extends BaseFragment implements Notificati View shadow = new View(context); shadow.setBackgroundResource(R.drawable.header_shadow_reverse); - frameLayout.addView(shadow, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 3, Gravity.LEFT | Gravity.BOTTOM, 0, 0, 0, 48)); + frameLayout.addView(shadow, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 3, Gravity.START | Gravity.BOTTOM, 0, 0, 0, 48)); return fragmentView; } diff --git a/MessengerProj/src/main/java/com/b44t/ui/PhotoPickerActivity.java b/MessengerProj/src/main/java/com/b44t/ui/PhotoPickerActivity.java index 669db8295..546f311a2 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/PhotoPickerActivity.java +++ b/MessengerProj/src/main/java/com/b44t/ui/PhotoPickerActivity.java @@ -212,7 +212,7 @@ public class PhotoPickerActivity extends BaseFragment implements NotificationCen else { View shadow = new View(context); shadow.setBackgroundResource(R.drawable.header_shadow_reverse); - frameLayout.addView(shadow, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 3, Gravity.LEFT | Gravity.BOTTOM, 0, 0, 0, 48)); + frameLayout.addView(shadow, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 3, Gravity.START | Gravity.BOTTOM, 0, 0, 0, 48)); } return fragmentView; diff --git a/MessengerProj/src/main/java/com/b44t/ui/PhotoViewer.java b/MessengerProj/src/main/java/com/b44t/ui/PhotoViewer.java index 80c91e6a1..0bad3b1be 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/PhotoViewer.java +++ b/MessengerProj/src/main/java/com/b44t/ui/PhotoViewer.java @@ -603,7 +603,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat int gravity = lp.gravity; if (gravity == -1) { - gravity = Gravity.TOP | Gravity.LEFT; + gravity = Gravity.TOP | Gravity.START; } final int absoluteGravity = gravity & Gravity.HORIZONTAL_GRAVITY_MASK; @@ -891,7 +891,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat containerView = new FrameLayoutDrawer(activity); containerView.setFocusable(false); - windowView.addView(containerView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.LEFT)); + windowView.addView(containerView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.START)); windowLayoutParams = new WindowManager.LayoutParams(); windowLayoutParams.height = WindowManager.LayoutParams.MATCH_PARENT; @@ -1091,7 +1091,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat bottomLayout = new FrameLayout(actvityContext); bottomLayout.setBackgroundColor(0x7f000000); - containerView.addView(bottomLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, Gravity.BOTTOM | Gravity.LEFT)); + containerView.addView(bottomLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, Gravity.BOTTOM | Gravity.START)); /* captionTextViewOld = new TextView(actvityContext); @@ -1100,10 +1100,10 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat captionTextViewOld.setPadding(AndroidUtilities.dp(16), AndroidUtilities.dp(8), AndroidUtilities.dp(16), AndroidUtilities.dp(8)); captionTextViewOld.setLinkTextColor(0xffffffff); captionTextViewOld.setTextColor(0xffffffff); - captionTextViewOld.setGravity(Gravity.CENTER_VERTICAL | Gravity.LEFT); + captionTextViewOld.setGravity(Gravity.CENTER_VERTICAL | Gravity.START); captionTextViewOld.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16); captionTextViewOld.setVisibility(View.INVISIBLE); - containerView.addView(captionTextViewOld, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.BOTTOM | Gravity.LEFT, 0, 0, 0, 48)); + containerView.addView(captionTextViewOld, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.BOTTOM | Gravity.START, 0, 0, 0, 48)); captionTextView = captionTextViewNew = new TextView(actvityContext); captionTextViewNew.setMaxLines(10); @@ -1111,10 +1111,10 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat captionTextViewNew.setPadding(AndroidUtilities.dp(16), AndroidUtilities.dp(8), AndroidUtilities.dp(16), AndroidUtilities.dp(8)); captionTextViewNew.setLinkTextColor(0xffffffff); captionTextViewNew.setTextColor(0xffffffff); - captionTextViewNew.setGravity(Gravity.CENTER_VERTICAL | Gravity.LEFT); + captionTextViewNew.setGravity(Gravity.CENTER_VERTICAL | Gravity.START); captionTextViewNew.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16); captionTextViewNew.setVisibility(View.INVISIBLE); - containerView.addView(captionTextViewNew, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.BOTTOM | Gravity.LEFT, 0, 0, 0, 48)); + containerView.addView(captionTextViewNew, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.BOTTOM | Gravity.START, 0, 0, 0, 48)); */ radialProgressViews[0] = new RadialProgressView(containerView.getContext(), containerView); @@ -1130,8 +1130,8 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat nameTextView.setMaxLines(1); nameTextView.setEllipsize(TextUtils.TruncateAt.END); nameTextView.setTextColor(0xffffffff); - nameTextView.setGravity(Gravity.LEFT); - bottomLayout.addView(nameTextView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP | Gravity.LEFT, 16, 5, 60, 0)); + nameTextView.setGravity(Gravity.START); + bottomLayout.addView(nameTextView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP | Gravity.START, 16, 5, 60, 0)); dateTextView = new TextView(containerView.getContext()); dateTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 13); @@ -1139,8 +1139,8 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat dateTextView.setMaxLines(1); dateTextView.setEllipsize(TextUtils.TruncateAt.END); dateTextView.setTextColor(0xffffffff); - dateTextView.setGravity(Gravity.LEFT); - bottomLayout.addView(dateTextView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP | Gravity.LEFT, 16, 25, 50, 0)); + dateTextView.setGravity(Gravity.START); + bottomLayout.addView(dateTextView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP | Gravity.START, 16, 25, 50, 0)); if (Build.VERSION.SDK_INT >= 16) { /*videoPlayerSeekbar = new SeekBar(containerView.getContext()); @@ -1194,12 +1194,12 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat } }; videoPlayerControlFrameLayout.setWillNotDraw(false); - bottomLayout.addView(videoPlayerControlFrameLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.LEFT)); + bottomLayout.addView(videoPlayerControlFrameLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.START)); */ /*videoPlayButton = new ImageView(containerView.getContext()); videoPlayButton.setScaleType(ImageView.ScaleType.CENTER); - videoPlayerControlFrameLayout.addView(videoPlayButton, LayoutHelper.createFrame(48, 48, Gravity.LEFT | Gravity.TOP)); + videoPlayerControlFrameLayout.addView(videoPlayButton, LayoutHelper.createFrame(48, 48, Gravity.START | Gravity.TOP)); videoPlayButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -1217,12 +1217,12 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat videoPlayerTime.setTextColor(0xffffffff); videoPlayerTime.setGravity(Gravity.CENTER_VERTICAL); videoPlayerTime.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 13); - videoPlayerControlFrameLayout.addView(videoPlayerTime, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.MATCH_PARENT, Gravity.RIGHT | Gravity.TOP, 0, 0, 8, 0));*/ + videoPlayerControlFrameLayout.addView(videoPlayerTime, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.MATCH_PARENT, Gravity.END | Gravity.TOP, 0, 0, 8, 0));*/ } pickerView = new PickerBottomLayout(actvityContext); pickerView.setBackgroundColor(0x7f000000); - containerView.addView(pickerView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, Gravity.BOTTOM | Gravity.LEFT)); + containerView.addView(pickerView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, Gravity.BOTTOM | Gravity.START)); pickerView.cancelButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { @@ -1245,7 +1245,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat editorDoneLayout.setBackgroundColor(0x7f000000); editorDoneLayout.updateSelectedCount(0, false); editorDoneLayout.setVisibility(View.GONE); - containerView.addView(editorDoneLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, Gravity.LEFT | Gravity.BOTTOM)); + containerView.addView(editorDoneLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, Gravity.START | Gravity.BOTTOM)); editorDoneLayout.cancelButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { @@ -1305,7 +1305,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat checkImageView.setCheckOffset(AndroidUtilities.dp(1)); checkImageView.setColor(0xff3ccaef); checkImageView.setVisibility(View.GONE); - containerView.addView(checkImageView, LayoutHelper.createFrame(45, 45, Gravity.RIGHT | Gravity.TOP, 0, rotation == Surface.ROTATION_270 || rotation == Surface.ROTATION_90 ? 58 : 68, 10, 0)); + containerView.addView(checkImageView, LayoutHelper.createFrame(45, 45, Gravity.END | Gravity.TOP, 0, rotation == Surface.ROTATION_270 || rotation == Surface.ROTATION_90 ? 58 : 68, 10, 0)); checkImageView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -1348,7 +1348,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat } } }); - containerView.addView(captionEditText, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.BOTTOM | Gravity.LEFT, 0, 0, 0, -400)); + containerView.addView(captionEditText, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.BOTTOM | Gravity.START, 0, 0, 0, -400)); */ /* @@ -1366,7 +1366,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat mentionListView.setVisibility(View.GONE); mentionListView.setClipToPadding(true); mentionListView.setOverScrollMode(ListView.OVER_SCROLL_NEVER); - containerView.addView(mentionListView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 110, Gravity.LEFT | Gravity.BOTTOM)); + containerView.addView(mentionListView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 110, Gravity.START | Gravity.BOTTOM)); mentionListView.setAdapter(mentionsAdapter = new MentionsAdapter(actvityContext, true, 0, new MentionsAdapter.MentionsAdapterDelegate() { @Override @@ -1895,7 +1895,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat if (photoCropView == null) { photoCropView = new PhotoCropView(actvityContext); photoCropView.setVisibility(View.GONE); - containerView.addView(photoCropView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.LEFT, 0, 0, 0, 48)); + containerView.addView(photoCropView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.START, 0, 0, 0, 48)); photoCropView.setDelegate(new PhotoCropView.PhotoCropViewDelegate() { @Override public void needMoveImageTo(float x, float y, float s, boolean animated) { diff --git a/MessengerProj/src/main/java/com/b44t/ui/ProfileActivity.java b/MessengerProj/src/main/java/com/b44t/ui/ProfileActivity.java index f0bd2fbf5..ba41509e3 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/ProfileActivity.java +++ b/MessengerProj/src/main/java/com/b44t/ui/ProfileActivity.java @@ -366,7 +366,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. layoutManager.setOrientation(LinearLayoutManager.VERTICAL); listView.setLayoutManager(layoutManager); listView.setGlowColor(Theme.ACTION_BAR_COLOR); - frameLayout.addView(listView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.LEFT)); + frameLayout.addView(listView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.START)); listView.setAdapter(listAdapter); listView.setOnItemClickListener(new RecyclerListView.OnItemClickListener() { @@ -529,7 +529,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. avatarImage.setRoundRadius(AndroidUtilities.dp(21)); avatarImage.setPivotX(0); avatarImage.setPivotY(0); - frameLayout.addView(avatarImage, LayoutHelper.createFrame(42, 42, Gravity.TOP | Gravity.LEFT, 64, 0, 0, 0)); + frameLayout.addView(avatarImage, LayoutHelper.createFrame(42, 42, Gravity.TOP | Gravity.START, 64, 0, 0, 0)); avatarImage.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -556,18 +556,18 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. nameTextView[a] = new SimpleTextView(context); nameTextView[a].setTextColor(Theme.ACTION_BAR_TITLE_COLOR); nameTextView[a].setTextSize(18); - nameTextView[a].setGravity(Gravity.LEFT); + nameTextView[a].setGravity(Gravity.START); nameTextView[a].setLeftDrawableTopPadding(-AndroidUtilities.dp(1.3f)); nameTextView[a].setRightDrawableTopPadding(-AndroidUtilities.dp(1.3f)); nameTextView[a].setPivotX(0); nameTextView[a].setPivotY(0); - frameLayout.addView(nameTextView[a], LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.TOP, 118, 0, a == 0 ? 48 : 0, 0)); + frameLayout.addView(nameTextView[a], LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.START | Gravity.TOP, 118, 0, a == 0 ? 48 : 0, 0)); onlineTextView[a] = new SimpleTextView(context); onlineTextView[a].setTextColor(Theme.ACTION_BAR_SUBTITLE_COLOR); onlineTextView[a].setTextSize(14); - onlineTextView[a].setGravity(Gravity.LEFT); - frameLayout.addView(onlineTextView[a], LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.TOP, 118, 0, a == 0 ? 48 : 8, 0)); + onlineTextView[a].setGravity(Gravity.START); + frameLayout.addView(onlineTextView[a], LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.START | Gravity.TOP, 118, 0, a == 0 ? 48 : 8, 0)); } if ( chat_id != 0 && chat_id!= MrChat.MR_CHAT_ID_DEADDROP ) { @@ -581,7 +581,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. writeButton.setScaleType(ImageView.ScaleType.CENTER); writeButton.setImageResource(R.drawable.floating_camera); - frameLayout.addView(writeButton, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.RIGHT | Gravity.TOP, 0, 0, 16, 0)); + frameLayout.addView(writeButton, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.END | Gravity.TOP, 0, 0, 16, 0)); if (Build.VERSION.SDK_INT >= 21) { StateListAnimator animator = new StateListAnimator(); animator.addState(new int[]{android.R.attr.state_pressed}, ObjectAnimator.ofFloat(writeButton, "translationZ", AndroidUtilities.dp(2), AndroidUtilities.dp(4)).setDuration(200)); diff --git a/MessengerProj/src/main/java/com/b44t/ui/ProfileNotificationsActivity.java b/MessengerProj/src/main/java/com/b44t/ui/ProfileNotificationsActivity.java index 7d0b8b4e3..74df6896f 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/ProfileNotificationsActivity.java +++ b/MessengerProj/src/main/java/com/b44t/ui/ProfileNotificationsActivity.java @@ -349,7 +349,7 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi layoutParams1 = (LinearLayout.LayoutParams) textView.getLayoutParams(); layoutParams1.width = LayoutHelper.WRAP_CONTENT; layoutParams1.height = LayoutHelper.WRAP_CONTENT; - layoutParams1.gravity = Gravity.CENTER_VERTICAL | Gravity.LEFT; + layoutParams1.gravity = Gravity.CENTER_VERTICAL | Gravity.START; textView.setLayoutParams(layoutParams1); final NumberPicker numberPickerTimes = new NumberPicker(getParentActivity()); @@ -369,7 +369,7 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi layoutParams1 = (LinearLayout.LayoutParams) textView.getLayoutParams(); layoutParams1.width = LayoutHelper.WRAP_CONTENT; layoutParams1.height = LayoutHelper.WRAP_CONTENT; - layoutParams1.gravity = Gravity.CENTER_VERTICAL | Gravity.LEFT; + layoutParams1.gravity = Gravity.CENTER_VERTICAL | Gravity.START; textView.setLayoutParams(layoutParams1); linearLayout2 = new LinearLayout(getParentActivity()); @@ -388,7 +388,7 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi layoutParams1 = (LinearLayout.LayoutParams) textView.getLayoutParams(); layoutParams1.width = LayoutHelper.WRAP_CONTENT; layoutParams1.height = LayoutHelper.WRAP_CONTENT; - layoutParams1.gravity = Gravity.CENTER_VERTICAL | Gravity.LEFT; + layoutParams1.gravity = Gravity.CENTER_VERTICAL | Gravity.START; textView.setLayoutParams(layoutParams1); final NumberPicker numberPickerMinutes = new NumberPicker(getParentActivity()); @@ -408,7 +408,7 @@ public class ProfileNotificationsActivity extends BaseFragment implements Notifi layoutParams1 = (LinearLayout.LayoutParams) textView.getLayoutParams(); layoutParams1.width = LayoutHelper.WRAP_CONTENT; layoutParams1.height = LayoutHelper.WRAP_CONTENT; - layoutParams1.gravity = Gravity.CENTER_VERTICAL | Gravity.LEFT; + layoutParams1.gravity = Gravity.CENTER_VERTICAL | Gravity.START; textView.setLayoutParams(layoutParams1); AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity()); diff --git a/MessengerProj/src/main/java/com/b44t/ui/SettingsAdvActivity.java b/MessengerProj/src/main/java/com/b44t/ui/SettingsAdvActivity.java index 6e3cb38ba..561d4dcb4 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/SettingsAdvActivity.java +++ b/MessengerProj/src/main/java/com/b44t/ui/SettingsAdvActivity.java @@ -116,7 +116,7 @@ public class SettingsAdvActivity extends BaseFragment { listView.setDivider(null); listView.setDividerHeight(0); listView.setDrawSelectorOnTop(true); - frameLayout.addView(listView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.LEFT)); + frameLayout.addView(listView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.START)); listView.setAdapter(listAdapter); listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override diff --git a/MessengerProj/src/main/java/com/b44t/ui/StickerPreviewViewer.java b/MessengerProj/src/main/java/com/b44t/ui/StickerPreviewViewer.java index 2519a7150..f4b8c5b9f 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/StickerPreviewViewer.java +++ b/MessengerProj/src/main/java/com/b44t/ui/StickerPreviewViewer.java @@ -309,7 +309,7 @@ public class StickerPreviewViewer { containerView = new FrameLayoutDrawer(activity); containerView.setFocusable(false); - windowView.addView(containerView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.LEFT)); + windowView.addView(containerView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.START)); containerView.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { diff --git a/MessengerProj/src/main/java/com/b44t/ui/WallpapersActivity.java b/MessengerProj/src/main/java/com/b44t/ui/WallpapersActivity.java index a47fe6000..056b25986 100644 --- a/MessengerProj/src/main/java/com/b44t/ui/WallpapersActivity.java +++ b/MessengerProj/src/main/java/com/b44t/ui/WallpapersActivity.java @@ -202,7 +202,7 @@ public class WallpapersActivity extends BaseFragment implements NotificationCent listView.setDisallowInterceptTouchEvents(true); listView.setOverScrollMode(RecyclerListView.OVER_SCROLL_NEVER); listView.setAdapter(listAdapter = new ListAdapter(context)); - frameLayout.addView(listView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 102, Gravity.LEFT | Gravity.BOTTOM)); + frameLayout.addView(listView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 102, Gravity.START | Gravity.BOTTOM)); listView.setOnItemClickListener(new RecyclerListView.OnItemClickListener() { @Override public void onItemClick(View view, int position) {