Loading res/layout-land/choose_lock_pattern.xml +33 −24 Original line number Diff line number Diff line Loading @@ -41,11 +41,6 @@ android:layout_marginBottom="@dimen/suw_content_frame_padding_bottom" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <ImageView android:id="@+id/suw_layout_icon" style="@style/SuwGlifIcon" Loading @@ -55,6 +50,17 @@ android:layout_marginEnd="0dp" android:src="@drawable/ic_lock"/> <ScrollView android:id="@+id/scroll_layout_title_header" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="3.0"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:id="@+id/suw_layout_title" style="@style/SuwGlifHeaderTitle" Loading @@ -63,16 +69,19 @@ android:layout_marginStart="0dp" android:layout_marginEnd="0dp"/> </LinearLayout> <!-- header message --> <TextView android:id="@+id/headerText" <TextView android:id="@+id/headerText" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="16dp" android:gravity="start|bottom" android:textSize="18sp"/> </LinearLayout> </ScrollView> <!-- footer can show a message, or confirm / restart buttons --> <RelativeLayout android:layout_width="match_parent" Loading src/com/android/settings/ChooseLockPattern.java +16 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; import android.widget.ScrollView; import android.widget.TextView; import com.android.internal.logging.MetricsProto.MetricsEvent; Loading Loading @@ -152,6 +153,9 @@ public class ChooseLockPattern extends SettingsActivity { protected List<LockPatternView.Cell> mChosenPattern = null; private boolean mHideDrawer = false; // ScrollView that contains title and header, only exist in land mode private ScrollView mTitleHeaderScrollView; /** * The patten used during the help screen to show how to draw a pattern. */ Loading Loading @@ -237,6 +241,15 @@ public class ChooseLockPattern extends SettingsActivity { mFooterText.setText(""); mFooterLeftButton.setEnabled(false); mFooterRightButton.setEnabled(false); if (mTitleHeaderScrollView != null) { mTitleHeaderScrollView.post(new Runnable() { @Override public void run() { mTitleHeaderScrollView.fullScroll(ScrollView.FOCUS_DOWN); } }); } } }; Loading Loading @@ -415,6 +428,9 @@ public class ChooseLockPattern extends SettingsActivity { mFooterLeftButton = (TextView) view.findViewById(R.id.footerLeftButton); mFooterRightButton = (TextView) view.findViewById(R.id.footerRightButton); mTitleHeaderScrollView = (ScrollView) view.findViewById(R.id .scroll_layout_title_header); mFooterLeftButton.setOnClickListener(this); mFooterRightButton.setOnClickListener(this); Loading Loading
res/layout-land/choose_lock_pattern.xml +33 −24 Original line number Diff line number Diff line Loading @@ -41,11 +41,6 @@ android:layout_marginBottom="@dimen/suw_content_frame_padding_bottom" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <ImageView android:id="@+id/suw_layout_icon" style="@style/SuwGlifIcon" Loading @@ -55,6 +50,17 @@ android:layout_marginEnd="0dp" android:src="@drawable/ic_lock"/> <ScrollView android:id="@+id/scroll_layout_title_header" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="3.0"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:id="@+id/suw_layout_title" style="@style/SuwGlifHeaderTitle" Loading @@ -63,16 +69,19 @@ android:layout_marginStart="0dp" android:layout_marginEnd="0dp"/> </LinearLayout> <!-- header message --> <TextView android:id="@+id/headerText" <TextView android:id="@+id/headerText" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="16dp" android:gravity="start|bottom" android:textSize="18sp"/> </LinearLayout> </ScrollView> <!-- footer can show a message, or confirm / restart buttons --> <RelativeLayout android:layout_width="match_parent" Loading
src/com/android/settings/ChooseLockPattern.java +16 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; import android.widget.ScrollView; import android.widget.TextView; import com.android.internal.logging.MetricsProto.MetricsEvent; Loading Loading @@ -152,6 +153,9 @@ public class ChooseLockPattern extends SettingsActivity { protected List<LockPatternView.Cell> mChosenPattern = null; private boolean mHideDrawer = false; // ScrollView that contains title and header, only exist in land mode private ScrollView mTitleHeaderScrollView; /** * The patten used during the help screen to show how to draw a pattern. */ Loading Loading @@ -237,6 +241,15 @@ public class ChooseLockPattern extends SettingsActivity { mFooterText.setText(""); mFooterLeftButton.setEnabled(false); mFooterRightButton.setEnabled(false); if (mTitleHeaderScrollView != null) { mTitleHeaderScrollView.post(new Runnable() { @Override public void run() { mTitleHeaderScrollView.fullScroll(ScrollView.FOCUS_DOWN); } }); } } }; Loading Loading @@ -415,6 +428,9 @@ public class ChooseLockPattern extends SettingsActivity { mFooterLeftButton = (TextView) view.findViewById(R.id.footerLeftButton); mFooterRightButton = (TextView) view.findViewById(R.id.footerRightButton); mTitleHeaderScrollView = (ScrollView) view.findViewById(R.id .scroll_layout_title_header); mFooterLeftButton.setOnClickListener(this); mFooterRightButton.setOnClickListener(this); Loading