Merge "Fix work challenge background size." into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
1abf436466
@@ -20,7 +20,7 @@
|
||||
android:paddingTop="48dp">
|
||||
|
||||
<include layout="@layout/confirm_lock_password_base"
|
||||
android:layout_width="328dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_horizontal"/>
|
||||
</FrameLayout>
|
||||
|
@@ -18,7 +18,7 @@
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<include layout="@layout/confirm_lock_pattern_base"
|
||||
android:layout_width="328dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_horizontal"/>
|
||||
</FrameLayout>
|
||||
|
@@ -24,8 +24,9 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/topLayout"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_width="@dimen/confirm_credentials_layout_width"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="top|center_horizontal">
|
||||
|
||||
<TextView
|
||||
style="@android:style/TextAppearance.Material.Headline"
|
||||
@@ -96,4 +97,4 @@
|
||||
android:visibility="gone"/>
|
||||
|
||||
</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
|
||||
</FrameLayout>
|
||||
</FrameLayout>
|
||||
|
@@ -24,8 +24,9 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/topLayout"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_width="@dimen/confirm_credentials_layout_width"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="top|center_horizontal">
|
||||
|
||||
<TextView
|
||||
style="@android:style/TextAppearance.Material.Headline"
|
||||
@@ -100,4 +101,4 @@
|
||||
</LinearLayout>
|
||||
|
||||
</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
|
||||
</FrameLayout>
|
||||
</FrameLayout>
|
||||
|
@@ -73,5 +73,6 @@
|
||||
<dimen name="wifi_assistant_text_padding">24dp</dimen>
|
||||
|
||||
<dimen name="confirm_credentials_security_method_margin">72dp</dimen>
|
||||
<dimen name="confirm_credentials_layout_width">328dp</dimen>
|
||||
<dimen name="fab_margin">24dp</dimen>
|
||||
</resources>
|
||||
|
@@ -15,6 +15,8 @@
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<dimen name="match_parent">-1px</dimen>
|
||||
|
||||
<dimen name="device_memory_usage_button_width">16dip</dimen>
|
||||
<dimen name="device_memory_usage_button_height">32dip</dimen>
|
||||
<dimen name="action_bar_switch_padding">16dip</dimen>
|
||||
@@ -232,6 +234,7 @@
|
||||
<dimen name="setup_fingerprint_progress_bar_size">168dp</dimen>
|
||||
|
||||
<dimen name="confirm_credentials_security_method_margin">48dp</dimen>
|
||||
<dimen name="confirm_credentials_layout_width">@dimen/match_parent</dimen>
|
||||
<dimen name="fab_size">56dp</dimen>
|
||||
<dimen name="fab_margin">16dp</dimen>
|
||||
<dimen name="fab_elevation">12dp</dimen>
|
||||
|
@@ -204,6 +204,12 @@ public abstract class ConfirmDeviceCredentialBaseFragment extends InstrumentedFr
|
||||
}
|
||||
|
||||
private void setWorkChallengeBackground(View baseView, int userId) {
|
||||
View mainContent = getActivity().findViewById(com.android.settings.R.id.main_content);
|
||||
if (mainContent != null) {
|
||||
// Remove the main content padding so that the background image is full screen.
|
||||
mainContent.setPadding(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
DevicePolicyManager dpm = (DevicePolicyManager) getActivity().getSystemService(
|
||||
Context.DEVICE_POLICY_SERVICE);
|
||||
baseView.setBackground(new ColorDrawable(dpm.getOrganizationColorForUser(userId)));
|
||||
|
Reference in New Issue
Block a user