Bug 1238780 - Remove Tab strip for Onboarding A. r=sebastian draft
authorChenxia Liu <liuche@mozilla.com>
Wed, 20 Jan 2016 12:28:31 -0800
changeset 323998 c198cb487ec9b517fa1855da84a96e46d2da0836
parent 323997 0585cca0e199e845a2ca798f5d36c76e23f64915
child 513306 c5fc35bf64f19a4a87462c06e90594a6ace0efd0
push id9822
push usercliu@mozilla.com
push dateThu, 21 Jan 2016 19:10:42 +0000
reviewerssebastian
bugs1238780
milestone46.0a1
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"