Bug 1238780 - Remove Tab strip for Onboarding A. r=sebastian
authorChenxia Liu <liuche@mozilla.com>
Wed, 20 Jan 2016 12:28:31 -0800
changeset 281368 e3766ae94dfb37502a19a294ef6916eabd419a76
parent 281367 7d542a9b16e35ff7a5e74c22c0879ac9d6ac49cf
child 281369 c91239ff3c36cee3d1ddae67d0b6d62f65696781
push id29935
push userphilringnalda@gmail.com
push dateSun, 24 Jan 2016 02:12:02 +0000
treeherdermozilla-central@a2e81822194a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian
bugs1238780
milestone46.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1238780 - Remove Tab strip for Onboarding A. r=sebastian
mobile/android/base/java/org/mozilla/gecko/firstrun/FirstrunPager.java
mobile/android/base/resources/layout/firstrun_welcome_fragment.xml
--- a/mobile/android/base/java/org/mozilla/gecko/firstrun/FirstrunPager.java
+++ b/mobile/android/base/java/org/mozilla/gecko/firstrun/FirstrunPager.java
@@ -68,16 +68,19 @@ public class FirstrunPager extends ViewP
 
     public void load(Context appContext, FragmentManager fm, final FirstrunAnimationContainer.OnFinishListener onFinishListener) {
         final List<FirstrunPagerConfig.FirstrunPanelConfig> panels;
 
         if (Restrictions.isUserRestricted(context)) {
             panels = FirstrunPagerConfig.getRestricted();
         } else {
             panels = FirstrunPagerConfig.getDefault(appContext);
+            if (panels.size() == 1) {
+                mTabStrip.setVisibility(GONE);
+            }
         }
 
         setAdapter(new ViewPagerAdapter(fm, panels));
         this.pagerNavigation = new FirstrunPanel.PagerNavigation() {
             @Override
             public void next() {
                 final int currentPage = FirstrunPager.this.getCurrentItem();
                 if (currentPage < FirstrunPager.this.getAdapter().getCount() - 1) {
--- a/mobile/android/base/resources/layout/firstrun_welcome_fragment.xml
+++ b/mobile/android/base/resources/layout/firstrun_welcome_fragment.xml
@@ -7,27 +7,27 @@
 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
             android:layout_height="wrap_content"
             android:layout_width="match_parent"
             android:orientation="vertical"
             android:fillViewport="true">
 
     <LinearLayout android:layout_width="match_parent"
                   android:layout_height="match_parent"
-                  android:minHeight="@dimen/firstrun_min_height"
+                  android:minHeight="248dp"
                   android:background="@color/android:white"
                   android:gravity="center_horizontal"
                   android:orientation="vertical">
 
         <FrameLayout android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:background="@color/link_blue">
 
             <ImageView android:layout_width="wrap_content"
-                       android:layout_height="@dimen/firstrun_background_height"
+                       android:layout_height="248dp"
                        android:scaleType="fitCenter"
                        android:layout_gravity="center"
                        android:adjustViewBounds="true"
                        android:src="@drawable/firstrun_background_coffee"/>
 
             <ImageView android:layout_width="@dimen/firstrun_brand_size"
                        android:layout_height="@dimen/firstrun_brand_size"
                        android:src="@drawable/large_icon"