Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f416b94 authored by arangelov's avatar arangelov Committed by Antoan Angelov
Browse files

Re-setup viewpager on configuration change for RTL languages

Otherwise rotating the device while showing a tab with RTL
shows blank tab content. This could be due to ViewPager
bugs when handling RTL.

Fixes: 158862939
Test: manually rotating the device with RTL layout
Test: manually rotating the device with LTR layout
Change-Id: Iba4c71cf88747d6fbbc36d19b5102460e8aa7cec
parent 58fd58de
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1063,6 +1063,10 @@ public class ChooserActivity extends ResolverActivity implements
    @Override
    public void onConfigurationChanged(Configuration newConfig) {
        super.onConfigurationChanged(newConfig);
        ViewPager viewPager = findViewById(R.id.profile_pager);
        if (shouldShowTabs() && viewPager.isLayoutRtl()) {
            mMultiProfilePagerAdapter.setupViewPager(viewPager);
        }

        mShouldDisplayLandscape = shouldDisplayLandscape(newConfig.orientation);
        adjustPreviewWidth(newConfig.orientation, null);