diff --git a/src/com/android/customization/widget/PreviewPager.java b/src/com/android/customization/widget/PreviewPager.java
index c80396d..9ce9d90 100644
--- a/src/com/android/customization/widget/PreviewPager.java
+++ b/src/com/android/customization/widget/PreviewPager.java
@@ -151,18 +151,14 @@
      * widget.
      */
     public void setAdapter(PagerAdapter adapter) {
+        int initialPage = 0;
+        if (mViewPager.getAdapter() != null) {
+            initialPage = isRtl() ? mAdapter.getCount() - 1 - mViewPager.getCurrentItem()
+                    : mViewPager.getCurrentItem();
+        }
         mAdapter = adapter;
         mViewPager.setAdapter(adapter);
-        if (ViewCompat.isLayoutDirectionResolved(mViewPager)) {
-            if (ViewCompat.getLayoutDirection(mViewPager) == ViewCompat.LAYOUT_DIRECTION_RTL) {
-                mViewPager.setCurrentItem(mAdapter.getCount() - 1);
-            }
-        } else {
-            if (TextUtilsCompat.getLayoutDirectionFromLocale(Locale.getDefault())
-                    == ViewCompat.LAYOUT_DIRECTION_RTL) {
-                mViewPager.setCurrentItem(mAdapter.getCount() - 1);
-            }
-        }
+        mViewPager.setCurrentItem(isRtl() ? mAdapter.getCount() - 1 - initialPage : initialPage);
         mAdapter.registerDataSetObserver(new DataSetObserver() {
             @Override
             public void onChanged() {
@@ -173,6 +169,14 @@
         updateIndicator(mViewPager.getCurrentItem());
     }
 
+    private boolean isRtl() {
+        if (ViewCompat.isLayoutDirectionResolved(mViewPager)) {
+            return ViewCompat.getLayoutDirection(mViewPager) == ViewCompat.LAYOUT_DIRECTION_RTL;
+        }
+        return TextUtilsCompat.getLayoutDirectionFromLocale(Locale.getDefault())
+                == ViewCompat.LAYOUT_DIRECTION_RTL;
+    }
+
     /**
      * Set a {@link OnPageChangeListener} to be notified when the ViewPager's page state changes
      */
