diff --git a/app/src/debug/AndroidManifest.xml b/app/src/debug/AndroidManifest.xml index 5cc2fa66a54..3ec89484ace 100644 --- a/app/src/debug/AndroidManifest.xml +++ b/app/src/debug/AndroidManifest.xml @@ -6,5 +6,6 @@ + tools:replace="android:name" + android:supportsRtl="true" /> \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 28cdbf02038..17b4282de2e 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -23,6 +23,7 @@ android:label="@string/app_name" android:logo="@mipmap/ic_launcher" android:theme="@style/OpeningTheme" + android:supportsRtl="true" android:resizeableActivity="true" tools:ignore="AllowBackup"> internalTabsList; + private boolean isRTL; private SelectedTabsPagerAdapter(final Context context, final FragmentManager fragmentManager, - final List tabsList) { + final List tabsList, + final boolean isRTL) { super(fragmentManager, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT); this.context = context; this.internalTabsList = new ArrayList<>(tabsList); + this.isRTL = isRTL; } @NonNull @Override public Fragment getItem(final int position) { - final Tab tab = internalTabsList.get(position); + final Tab tab = internalTabsList.get( + LocalizeLayoutUtils.getLayoutPosition( + isRTL, + internalTabsList.size(), + position) + ); final Fragment fragment; try { diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/TabAdapter.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/TabAdapter.java index 1a11836d48b..c1370dade34 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/TabAdapter.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/TabAdapter.java @@ -8,6 +8,8 @@ import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentPagerAdapter; +import org.schabi.newpipe.util.LocalizeLayoutUtils; + import java.util.ArrayList; import java.util.List; @@ -15,19 +17,21 @@ public class TabAdapter extends FragmentPagerAdapter { private final List mFragmentList = new ArrayList<>(); private final List mFragmentTitleList = new ArrayList<>(); private final FragmentManager fragmentManager; + private boolean isRTL; - public TabAdapter(final FragmentManager fm) { + public TabAdapter(final FragmentManager fm, final boolean isRTL) { // if changed to BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT => crash if enqueueing stream in // the background and then clicking on it to open VideoDetailFragment: // "Cannot setMaxLifecycle for Fragment not attached to FragmentManager" super(fm, BEHAVIOR_SET_USER_VISIBLE_HINT); this.fragmentManager = fm; + this.isRTL = isRTL; } @NonNull @Override public Fragment getItem(final int position) { - return mFragmentList.get(position); + return mFragmentList.get(getLayoutPosition(position)); } @Override @@ -46,16 +50,18 @@ public void clearAllItems() { } public void removeItem(final int position) { - mFragmentList.remove(position == 0 ? 0 : position - 1); - mFragmentTitleList.remove(position == 0 ? 0 : position - 1); + final int newPosition = getLayoutPosition(position); + + mFragmentList.remove(newPosition == 0 ? 0 : newPosition - 1); + mFragmentTitleList.remove(newPosition == 0 ? 0 : newPosition - 1); } public void updateItem(final int position, final Fragment fragment) { - mFragmentList.set(position, fragment); + mFragmentList.set(getLayoutPosition(position), fragment); } public void updateItem(final String title, final Fragment fragment) { - final int index = mFragmentTitleList.indexOf(title); + final int index = getLayoutPosition(mFragmentTitleList.indexOf(title)); if (index != -1) { updateItem(index, fragment); } @@ -64,14 +70,14 @@ public void updateItem(final String title, final Fragment fragment) { @Override public int getItemPosition(@NonNull final Object object) { if (mFragmentList.contains(object)) { - return mFragmentList.indexOf(object); + return getLayoutPosition(mFragmentList.indexOf(object)); } else { return POSITION_NONE; } } public int getItemPositionByTitle(final String title) { - return mFragmentTitleList.indexOf(title); + return getLayoutPosition(mFragmentTitleList.indexOf(title)); } @Nullable @@ -79,7 +85,8 @@ public String getItemTitle(final int position) { if (position < 0 || position >= mFragmentTitleList.size()) { return null; } - return mFragmentTitleList.get(position); + + return mFragmentTitleList.get(getLayoutPosition(position)); } public void notifyDataSetUpdate() { @@ -93,4 +100,7 @@ public void destroyItem(@NonNull final ViewGroup container, fragmentManager.beginTransaction().remove((Fragment) object).commitNowAllowingStateLoss(); } + private int getLayoutPosition(final int position) { + return LocalizeLayoutUtils.getLayoutPosition(isRTL, mFragmentList.size(), position); + } } diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java index 05630ef793a..6bcaf88cb60 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java @@ -91,6 +91,7 @@ import org.schabi.newpipe.util.ExtractorHelper; import org.schabi.newpipe.util.ListHelper; import org.schabi.newpipe.util.Localization; +import org.schabi.newpipe.util.LocalizeLayoutUtils; import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.PermissionHelper; import org.schabi.newpipe.util.PicassoHelper; @@ -603,10 +604,6 @@ public void onViewCreated(@NonNull final View rootView, final Bundle savedInstan protected void initViews(final View rootView, final Bundle savedInstanceState) { super.initViews(rootView, savedInstanceState); - pageAdapter = new TabAdapter(getChildFragmentManager()); - binding.viewPager.setAdapter(pageAdapter); - binding.tabLayout.setupWithViewPager(binding.viewPager); - binding.detailThumbnailRootLayout.requestFocus(); binding.detailControlsPlayWithKodi.setVisibility( @@ -621,6 +618,13 @@ protected void initViews(final View rootView, final Bundle savedInstanceState) { : View.GONE ); + pageAdapter = new TabAdapter( + getChildFragmentManager(), + LocalizeLayoutUtils.isRTL(getContext()) + ); + binding.viewPager.setAdapter(pageAdapter); + binding.tabLayout.setupWithViewPager(binding.viewPager); + if (DeviceUtils.isTv(getContext())) { // remove ripple effects from detail controls final int transparent = ContextCompat.getColor(requireContext(), @@ -985,8 +989,12 @@ private void initTabs() { * {@link #tabContentDescriptions}, which are all set in {@link #initTabs()}. */ private void updateTabIconsAndContentDescriptions() { + final boolean isRTL = LocalizeLayoutUtils.isRTL(getContext()); + for (int i = 0; i < tabIcons.size(); ++i) { - final TabLayout.Tab tab = binding.tabLayout.getTabAt(i); + final TabLayout.Tab tab = binding.tabLayout.getTabAt( + LocalizeLayoutUtils.getLayoutPosition( + isRTL, tabIcons.size(), i)); if (tab != null) { tab.setIcon(tabIcons.get(i)); tab.setContentDescription(tabContentDescriptions.get(i)); diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java index 15424334d38..c0723bb4db9 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java @@ -1089,7 +1089,7 @@ public int getSuggestionMovementFlags(@NonNull final RecyclerView.ViewHolder vie final SuggestionItem item = suggestionListAdapter.getItem(position); return item.fromHistory ? makeMovementFlags(0, - ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT) : 0; + ItemTouchHelper.START | ItemTouchHelper.END) : 0; } public void onSuggestionItemSwiped(@NonNull final RecyclerView.ViewHolder viewHolder) { diff --git a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java index 87d913b3b06..b4e30267979 100644 --- a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java @@ -683,7 +683,7 @@ private void saveImmediate() { private ItemTouchHelper.SimpleCallback getItemTouchCallback() { int directions = ItemTouchHelper.UP | ItemTouchHelper.DOWN; if (shouldUseGridLayout(requireContext())) { - directions |= ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT; + directions |= ItemTouchHelper.START | ItemTouchHelper.END; } return new ItemTouchHelper.SimpleCallback(directions, ItemTouchHelper.ACTION_STATE_IDLE) { diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/decoration/FeedGroupCarouselDecoration.kt b/app/src/main/java/org/schabi/newpipe/local/subscription/decoration/FeedGroupCarouselDecoration.kt index 7b7490eaa86..d03d057cf38 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/decoration/FeedGroupCarouselDecoration.kt +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/decoration/FeedGroupCarouselDecoration.kt @@ -5,12 +5,14 @@ import android.graphics.Rect import android.view.View import androidx.recyclerview.widget.RecyclerView import org.schabi.newpipe.R +import org.schabi.newpipe.util.LocalizeLayoutUtils class FeedGroupCarouselDecoration(context: Context) : RecyclerView.ItemDecoration() { private val marginStartEnd: Int private val marginTopBottom: Int private val marginBetweenItems: Int + private val isRTL: Boolean init { with(context.resources) { @@ -18,18 +20,32 @@ class FeedGroupCarouselDecoration(context: Context) : RecyclerView.ItemDecoratio marginTopBottom = getDimensionPixelOffset(R.dimen.feed_group_carousel_top_bottom_margin) marginBetweenItems = getDimensionPixelOffset(R.dimen.feed_group_carousel_between_items_margin) } + + isRTL = LocalizeLayoutUtils.isRTL(context) } override fun getItemOffsets(outRect: Rect, child: View, parent: RecyclerView, state: RecyclerView.State) { val childAdapterPosition = parent.getChildAdapterPosition(child) val childAdapterCount = parent.adapter?.itemCount ?: 0 - outRect.set(marginBetweenItems, marginTopBottom, 0, marginTopBottom) + outRect.set(0, marginTopBottom, 0, marginTopBottom) + + if (isRTL) { + outRect.right = marginBetweenItems + + if (childAdapterPosition == 0) { + outRect.right = marginStartEnd + } else if (childAdapterPosition == childAdapterCount - 1) { + outRect.left = marginStartEnd + } + } else { + outRect.left = marginBetweenItems - if (childAdapterPosition == 0) { - outRect.left = marginStartEnd - } else if (childAdapterPosition == childAdapterCount - 1) { - outRect.right = marginStartEnd + if (childAdapterPosition == 0) { + outRect.left = marginStartEnd + } else if (childAdapterPosition == childAdapterCount - 1) { + outRect.right = marginStartEnd + } } } } diff --git a/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java b/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java index c51b6d5dde0..396e16fbe94 100644 --- a/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java +++ b/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHelper.java @@ -514,7 +514,7 @@ public static WindowManager.LayoutParams retrievePopupLayoutParamsFromPrefs( popupLayoutParamType(), IDLE_WINDOW_FLAGS, PixelFormat.TRANSLUCENT); - popupLayoutParams.gravity = Gravity.LEFT | Gravity.TOP; + popupLayoutParams.gravity = Gravity.START | Gravity.TOP; popupLayoutParams.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE; final int centerX = (int) (player.getScreenWidth() / 2f - popupWidth / 2f); @@ -558,7 +558,7 @@ public static WindowManager.LayoutParams buildCloseOverlayLayoutParams() { flags, PixelFormat.TRANSLUCENT); - closeOverlayLayoutParams.gravity = Gravity.LEFT | Gravity.TOP; + closeOverlayLayoutParams.gravity = Gravity.START | Gravity.TOP; closeOverlayLayoutParams.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE; return closeOverlayLayoutParams; diff --git a/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueueItemTouchCallback.java b/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueueItemTouchCallback.java index b283e105ec6..6ad2e500487 100644 --- a/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueueItemTouchCallback.java +++ b/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueueItemTouchCallback.java @@ -8,7 +8,7 @@ public abstract class PlayQueueItemTouchCallback extends ItemTouchHelper.SimpleC private static final int MAXIMUM_INITIAL_DRAG_VELOCITY = 25; public PlayQueueItemTouchCallback() { - super(ItemTouchHelper.UP | ItemTouchHelper.DOWN, ItemTouchHelper.RIGHT); + super(ItemTouchHelper.UP | ItemTouchHelper.DOWN, ItemTouchHelper.END); } public abstract void onMove(int sourceIndex, int targetIndex); diff --git a/app/src/main/java/org/schabi/newpipe/util/CommentTextOnTouchListener.java b/app/src/main/java/org/schabi/newpipe/util/CommentTextOnTouchListener.java index 7c87e664ba8..da0bdf0e663 100644 --- a/app/src/main/java/org/schabi/newpipe/util/CommentTextOnTouchListener.java +++ b/app/src/main/java/org/schabi/newpipe/util/CommentTextOnTouchListener.java @@ -35,7 +35,7 @@ public boolean onTouch(final View v, final MotionEvent event) { int x = (int) event.getX(); int y = (int) event.getY(); - x -= widget.getTotalPaddingLeft(); + x -= widget.getTotalPaddingStart(); y -= widget.getTotalPaddingTop(); x += widget.getScrollX(); diff --git a/app/src/main/java/org/schabi/newpipe/util/LocalizeLayoutUtils.java b/app/src/main/java/org/schabi/newpipe/util/LocalizeLayoutUtils.java new file mode 100644 index 00000000000..e55c230043b --- /dev/null +++ b/app/src/main/java/org/schabi/newpipe/util/LocalizeLayoutUtils.java @@ -0,0 +1,29 @@ +package org.schabi.newpipe.util; + +import android.content.Context; +import android.content.res.Configuration; +import android.view.View; + +public final class LocalizeLayoutUtils { + private LocalizeLayoutUtils() { } + + private static Boolean isRTL = null; + + public static int getLayoutPosition(final boolean isRtl, final int count, final int position) { + return isRtl + ? count - 1 - position + : position; + } + + public static boolean isRTL(final Context context) { + if (isRTL != null) { + return isRTL; + } + + final Configuration config = context.getResources().getConfiguration(); + + isRTL = config.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL; + + return isRTL; + } +} diff --git a/app/src/main/res/drawable/ic_play_arrow_shadow.xml b/app/src/main/res/drawable/ic_play_arrow_shadow.xml index bf4b895b0ae..9a9a110b3e1 100644 --- a/app/src/main/res/drawable/ic_play_arrow_shadow.xml +++ b/app/src/main/res/drawable/ic_play_arrow_shadow.xml @@ -1,7 +1,6 @@ @@ -45,8 +44,7 @@ android:layout_height="match_parent" android:layout_above="@id/progress_bar" android:layout_below="@id/appbar" - android:layout_alignParentEnd="true" - android:layout_alignParentRight="true"> + android:layout_alignParentEnd="true"> + android:paddingRight="16dp" + android:layoutDirection="ltr"> @@ -255,7 +255,6 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_toStartOf="@id/details_panel" - android:layout_toLeftOf="@id/details_panel" android:background="?attr/selectableItemBackground" android:focusable="true" android:gravity="center_vertical" @@ -277,7 +276,7 @@ android:id="@+id/detail_sub_channel_thumbnail_view" android:layout_width="@dimen/video_item_detail_sub_channel_image_size" android:layout_height="@dimen/video_item_detail_sub_channel_image_size" - android:layout_gravity="bottom|right" + android:layout_gravity="bottom|end" android:contentDescription="@string/detail_sub_channel_thumbnail_view_description" android:src="@drawable/buddy" android:visibility="gone" @@ -295,7 +294,7 @@ android:id="@+id/detail_sub_channel_text_view" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginLeft="15dp" + android:layout_marginStart="15dp" android:ellipsize="marquee" android:fadingEdge="horizontal" android:marqueeRepeatLimit="marquee_forever" @@ -311,7 +310,7 @@ android:id="@+id/detail_uploader_text_view" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginLeft="15dp" + android:layout_marginStart="15dp" android:ellipsize="marquee" android:fadingEdge="horizontal" android:marqueeRepeatLimit="marquee_forever" @@ -328,12 +327,12 @@ android:id="@+id/detail_uploader_subscribe" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_gravity="center_vertical|right" - android:layout_marginRight="12dp" + android:layout_gravity="center_vertical|end" + android:layout_marginEnd="12dp" android:text="@string/rss_button_title" android:textSize="12sp" android:theme="@style/RedButton" - app:drawableLeftCompat="@drawable/ic_rss_feed" + app:drawableStartCompat="@drawable/ic_rss_feed" tools:ignore="RtlHardcoded" android:visibility="gone"/>--> @@ -344,9 +343,8 @@ android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_alignParentEnd="true" - android:layout_alignParentRight="true" - android:paddingLeft="6dp" - android:paddingRight="6dp"> + android:paddingStart="6dp" + android:paddingEnd="6dp"> @@ -399,8 +397,8 @@ android:layout_width="wrap_content" android:layout_height="@dimen/video_item_detail_like_image_height" android:layout_below="@id/detail_view_count_view" - android:layout_marginLeft="@dimen/video_item_detail_like_margin" - android:layout_toRightOf="@id/detail_thumbs_down_img_view" + android:layout_marginStart="@dimen/video_item_detail_like_margin" + android:layout_toEndOf="@id/detail_thumbs_down_img_view" android:gravity="center_vertical" android:lines="1" android:textAppearance="?android:attr/textAppearanceMedium" @@ -413,8 +411,8 @@ android:layout_width="wrap_content" android:layout_height="@dimen/video_item_detail_like_image_height" android:layout_below="@id/detail_view_count_view" - android:layout_marginLeft="12dp" - android:layout_toRightOf="@id/detail_thumbs_down_img_view" + android:layout_marginStart="12dp" + android:layout_toEndOf="@id/detail_thumbs_down_img_view" android:gravity="center_vertical" android:text="@string/disabled" android:textAppearance="?android:attr/textAppearanceLarge" @@ -585,8 +583,8 @@ android:id="@+id/detail_meta_info_separator" android:layout_width="match_parent" android:layout_height="1px" - android:layout_marginLeft="8dp" - android:layout_marginRight="8dp" + android:layout_marginStart="8dp" + android:layout_marginEnd="8dp" android:background="?attr/separator_color" /> @@ -652,8 +650,8 @@ android:layout_alignParentStart="true" android:background="@color/transparent_background_color" android:gravity="center_vertical" - android:paddingLeft="@dimen/video_item_search_padding" - android:paddingRight="@dimen/video_item_search_padding" + android:paddingStart="@dimen/video_item_search_padding" + android:paddingEnd="@dimen/video_item_search_padding" android:scaleType="fitCenter" android:src="@drawable/dummy_thumbnail" /> @@ -704,8 +702,8 @@ android:layout_height="60dp" android:layout_alignParentEnd="true" android:gravity="center_vertical" - android:paddingLeft="@dimen/video_item_search_padding" - android:paddingRight="@dimen/video_item_search_padding" + android:paddingStart="@dimen/video_item_search_padding" + android:paddingEnd="@dimen/video_item_search_padding" tools:ignore="RtlHardcoded"> + android:paddingRight="@dimen/player_main_controls_padding" + android:layoutDirection="ltr"> + android:weightSum="5.5" + android:layoutDirection="ltr"> + android:paddingStart="16dp"> + android:layout_height="wrap_content" + android:textAlignment="viewStart" + android:textDirection="anyRtl" /> diff --git a/app/src/main/res/layout/activity_player_queue_control.xml b/app/src/main/res/layout/activity_player_queue_control.xml index 24e06293226..a944ca1a9bb 100644 --- a/app/src/main/res/layout/activity_player_queue_control.xml +++ b/app/src/main/res/layout/activity_player_queue_control.xml @@ -44,9 +44,9 @@ android:layout_centerInParent="true" android:layout_above="@id/metadata" android:background="#c0000000" - android:paddingLeft="30dp" + android:paddingStart="30dp" android:paddingTop="5dp" - android:paddingRight="30dp" + android:paddingEnd="30dp" android:paddingBottom="5dp" android:textColor="@android:color/white" android:textSize="22sp" @@ -102,7 +102,8 @@ android:orientation="horizontal" android:paddingLeft="12dp" android:paddingRight="12dp" - android:layout_above="@+id/playback_controls"> + android:layout_above="@+id/playback_controls" + android:layoutDirection="ltr"> diff --git a/app/src/main/res/layout/channel_header.xml b/app/src/main/res/layout/channel_header.xml index 9366faf2c6e..d8d7c59146d 100644 --- a/app/src/main/res/layout/channel_header.xml +++ b/app/src/main/res/layout/channel_header.xml @@ -25,7 +25,7 @@ android:id="@+id/avatars_layout" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="8dp" + android:layout_marginStart="8dp" android:layout_marginTop="50dp"> + android:paddingEnd="@dimen/video_item_search_padding"> @@ -179,9 +179,9 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_vertical" - android:paddingLeft="12dp" + android:paddingStart="12dp" android:paddingTop="4dp" - android:paddingRight="12dp" + android:paddingEnd="12dp" android:paddingBottom="4dp"> + android:paddingEnd="@dimen/video_item_search_padding"> @@ -23,8 +23,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/file_name_text_view" - android:layout_marginLeft="20dp" - android:layout_marginRight="20dp" + android:layout_marginStart="20dp" + android:layout_marginEnd="20dp" android:layout_marginBottom="6dp" android:inputType="text" android:maxLines="1" /> @@ -34,9 +34,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/file_name" - android:layout_marginLeft="20dp" + android:layout_marginStart="20dp" android:layout_marginBottom="6dp" - android:gravity="left" + android:gravity="start" android:orientation="horizontal" tools:ignore="RtlHardcoded"> @@ -65,8 +65,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/video_audio_group" - android:layout_marginLeft="20dp" - android:layout_marginRight="20dp" + android:layout_marginStart="20dp" + android:layout_marginEnd="20dp" android:layout_marginBottom="12dp" android:minWidth="150dp" tools:listitem="@layout/stream_quality_item" /> @@ -76,8 +76,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/quality_spinner" - android:layout_marginLeft="24dp" - android:layout_marginRight="24dp" + android:layout_marginStart="24dp" + android:layout_marginEnd="24dp" android:layout_marginBottom="6dp" android:text="@string/msg_threads" /> @@ -85,8 +85,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/threads_text_view" - android:layout_marginLeft="24dp" - android:layout_marginRight="24dp" + android:layout_marginStart="24dp" + android:layout_marginEnd="24dp" android:orientation="horizontal" android:paddingBottom="12dp"> @@ -95,7 +95,7 @@ android:layout_width="25dp" android:layout_height="match_parent" android:gravity="center_vertical" - android:paddingLeft="2dp" + android:paddingStart="2dp" tools:ignore="RtlHardcoded,RtlSymmetry" tools:text="3" /> diff --git a/app/src/main/res/layout/drawer_header.xml b/app/src/main/res/layout/drawer_header.xml index 3069d0168ab..be0da4d8dae 100644 --- a/app/src/main/res/layout/drawer_header.xml +++ b/app/src/main/res/layout/drawer_header.xml @@ -29,8 +29,8 @@ @@ -67,8 +67,8 @@ android:background="@drawable/drawer_header_bottom_background" android:gravity="center" android:orientation="horizontal" - android:paddingLeft="6dp" - android:paddingRight="6dp"> + android:paddingStart="6dp" + android:paddingEnd="6dp"> @@ -34,11 +34,11 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_centerVertical="true" - android:layout_marginLeft="16dp" + android:layout_marginStart="16dp" android:layout_marginTop="6dp" android:layout_marginBottom="6dp" - android:layout_toLeftOf="@+id/handle" - android:layout_toRightOf="@+id/group_icon" + android:layout_toStartOf="@+id/handle" + android:layout_toEndOf="@+id/group_icon" android:ellipsize="end" android:maxLines="2" android:textAppearance="?textAppearanceListItem" @@ -49,11 +49,11 @@ android:id="@+id/handle" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_alignParentRight="true" + android:layout_alignParentEnd="true" android:layout_centerVertical="true" - android:paddingLeft="16dp" + android:paddingStart="16dp" android:paddingTop="12dp" - android:paddingRight="16dp" + android:paddingEnd="16dp" android:paddingBottom="12dp" app:srcCompat="@drawable/ic_drag_handle" tools:ignore="ContentDescription,RtlHardcoded" /> diff --git a/app/src/main/res/layout/feed_import_export_group.xml b/app/src/main/res/layout/feed_import_export_group.xml index e8232acc40d..4b1baa2acbd 100644 --- a/app/src/main/res/layout/feed_import_export_group.xml +++ b/app/src/main/res/layout/feed_import_export_group.xml @@ -37,9 +37,9 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" - android:paddingLeft="16dp" + android:paddingStart="16dp" android:paddingTop="8dp" - android:paddingRight="16dp" + android:paddingEnd="16dp" android:paddingBottom="8dp" android:text="@string/tab_subscriptions" android:textColor="?android:attr/textColorPrimary" @@ -50,7 +50,7 @@ android:id="@+id/import_export_expand_icon" android:layout_width="24dp" android:layout_height="24dp" - android:layout_marginRight="16dp" + android:layout_marginEnd="16dp" app:srcCompat="@drawable/ic_expand_more" tools:ignore="ContentDescription,RtlHardcoded" /> @@ -67,9 +67,9 @@ @@ -50,11 +52,15 @@ android:layout_height="wrap_content" android:paddingTop="10dp" android:text="@string/contribution_title" + android:textAlignment="viewStart" + android:textDirection="anyRtl" android:textAppearance="@android:style/TextAppearance.Medium" />