Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1492)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java

Issue 2166383002: [FRE] Disable swipe gesture and smoothly scroll effect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunViewPager.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java
index 451aa08707dfb250dd531677991cd4d65e8795dd..9d5cc72aa4259b8e49bac3a652316d6a6ca4c9f6 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java
@@ -8,7 +8,6 @@ import android.app.Activity;
import android.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
-import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
@@ -83,7 +82,7 @@ public class FirstRunActivity extends AppCompatActivity implements FirstRunPageD
private boolean mNativeSideIsInitialized;
private ProfileDataCache mProfileDataCache;
- private ViewPager mPager;
+ private FirstRunViewPager mPager;
private Bundle mFreProperties;
@@ -147,7 +146,7 @@ public class FirstRunActivity extends AppCompatActivity implements FirstRunPageD
return;
}
- mPager = new ViewPager(this);
+ mPager = new FirstRunViewPager(this);
mPager.setId(R.id.fre_pager);
setContentView(mPager);
@@ -234,7 +233,7 @@ public class FirstRunActivity extends AppCompatActivity implements FirstRunPageD
if (mPager.getCurrentItem() == 0) {
abortFirstRunExperience();
} else {
- mPager.setCurrentItem(mPager.getCurrentItem() - 1);
+ mPager.setCurrentItem(mPager.getCurrentItem() - 1, false);
}
}
@@ -247,7 +246,7 @@ public class FirstRunActivity extends AppCompatActivity implements FirstRunPageD
@Override
public void advanceToNextPage() {
- jumpToPage(mPager.getCurrentItem() + 1, true);
+ jumpToPage(mPager.getCurrentItem() + 1);
}
@Override
@@ -356,7 +355,7 @@ public class FirstRunActivity extends AppCompatActivity implements FirstRunPageD
FirstRunStatus.setSkipWelcomePage(FirstRunActivity.this, true);
flushPersistentData();
stopProgressionIfNotAcceptedTermsOfService();
- jumpToPage(mPager.getCurrentItem() + 1, true);
+ jumpToPage(mPager.getCurrentItem() + 1);
}
@Override
@@ -383,9 +382,8 @@ public class FirstRunActivity extends AppCompatActivity implements FirstRunPageD
* Transitions to a given page.
* @return Whether the transition to a given page was allowed.
* @param position A page index to transition to.
- * @param smooth Whether the transition should be smooth.
*/
- private boolean jumpToPage(int position, boolean smooth) {
+ private boolean jumpToPage(int position) {
if (mShowWelcomePage && !didAcceptTermsOfService()) {
return position == 0;
}
@@ -393,7 +391,7 @@ public class FirstRunActivity extends AppCompatActivity implements FirstRunPageD
completeFirstRunExperience();
return false;
}
- mPager.setCurrentItem(position, smooth);
+ mPager.setCurrentItem(position, false);
return true;
}
@@ -409,7 +407,7 @@ public class FirstRunActivity extends AppCompatActivity implements FirstRunPageD
while (currentPageIndex < mPagerAdapter.getCount()) {
FirstRunPage currentPage = (FirstRunPage) mPagerAdapter.getItem(currentPageIndex);
if (!currentPage.shouldSkipPageOnCreate(getApplicationContext())) return;
- if (!jumpToPage(currentPageIndex + 1, false)) return;
+ if (!jumpToPage(currentPageIndex + 1)) return;
currentPageIndex = mPager.getCurrentItem();
}
}
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunViewPager.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698