Change work_app_edu to be like T spec: https://screenshot.googleplex.com/43ThiCnqrAqAQgE
Fixed the button to show on Portrait mode..streamline added for work_mode_fab.
Took out unneccessary attributes such as textColor for the button and took out background.
How it looks in landscape: https://screenshot.googleplex.com/AVaUEztqsXYA28N
How it looks in portrait: https://screenshot.googleplex.com/3oTG3j7yZLCxkLz
Apk: https://drive.google.com/file/d/1qLeiJSF3lHf7tZzoHWwBHGxDgbveTIYX/view?usp=sharing
Test: Manual - Tested on local Pixel device (Raven)
Bug: 224731116
Bug: 224731300
Change-Id: If1392806adecf1ce02723d20686ca6bf524f6464
diff --git a/res/layout/work_apps_edu.xml b/res/layout/work_apps_edu.xml
index 1517087..73200de 100644
--- a/res/layout/work_apps_edu.xml
+++ b/res/layout/work_apps_edu.xml
@@ -19,37 +19,49 @@
android:layout_marginTop="8dp"
android:gravity="center">
- <LinearLayout
+ <RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="vertical"
- android:paddingHorizontal="@dimen/work_card_padding_horizontal"
- android:paddingVertical="@dimen/work_card_padding_horizontal"
+ android:orientation="horizontal"
android:background="@drawable/work_card"
android:layout_gravity="center_horizontal"
- android:gravity="center"
+ android:paddingEnd="@dimen/work_card_margin"
+ android:paddingStart="@dimen/work_card_margin"
+ android:paddingTop="@dimen/work_card_margin"
android:id="@+id/wrapper">
-
<TextView
style="@style/PrimaryHeadline"
android:textColor="?android:attr/textColorPrimary"
android:id="@+id/work_apps_paused_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/work_card_padding_horizontal"
+ android:layout_marginBottom="@dimen/work_card_margin"
+ android:layout_marginRight="@dimen/work_card_margin"
android:text="@string/work_profile_edu_work_apps"
- android:textAlignment="center"
- android:textSize="20sp" />
-
- <Button
+ android:textSize="18sp" />
+ <RelativeLayout
android:layout_width="match_parent"
- android:layout_height="@dimen/work_card_button_height"
- android:id="@+id/action_btn"
- android:textColor="?attr/workProfileOverlayTextColor"
- android:text="@string/work_profile_edu_accept"
- android:textAlignment="center"
- android:background="@drawable/rounded_action_button"
+ android:layout_height="@dimen/padded_rounded_button_height"
+ android:orientation="horizontal"
+ >
+ <FrameLayout
+ android:layout_width="@dimen/rounded_button_width"
+ android:layout_height="@dimen/rounded_button_width"
+ android:background="@drawable/rounded_action_button"
+ android:padding="@dimen/rounded_button_padding"
+ android:layout_alignParentRight="true">
+ <ImageButton
+ android:layout_width="@dimen/x_icon_size"
+ android:layout_height="@dimen/x_icon_size"
+ android:id="@+id/action_btn"
+ android:src="@drawable/ic_remove_no_shadow"
+ android:layout_gravity="center"
+ android:padding="@dimen/x_icon_padding" />
+ </FrameLayout>
+ </RelativeLayout>
- android:textSize="14sp" />
- </LinearLayout>
+ </RelativeLayout>
+
+
+
</com.android.launcher3.allapps.WorkEduCard>
\ No newline at end of file
diff --git a/res/layout/work_mode_fab.xml b/res/layout/work_mode_fab.xml
index 04faa15..c536d77 100644
--- a/res/layout/work_mode_fab.xml
+++ b/res/layout/work_mode_fab.xml
@@ -29,4 +29,6 @@
android:drawableStart="@drawable/ic_corp_off"
android:layout_marginBottom="@dimen/work_fab_margin"
android:layout_marginEnd="@dimen/work_fab_margin"
+ android:paddingLeft="@dimen/work_mode_fab_padding"
+ android:paddingRight="@dimen/work_mode_fab_padding"
android:text="@string/work_apps_pause_btn_text" />
\ No newline at end of file
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 0615053..c1b9f01 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -136,18 +136,25 @@
<!-- Floating action button inside work tab to toggle work profile -->
<dimen name="work_fab_height">56dp</dimen>
- <dimen name="work_fab_radius">28dp</dimen>
- <dimen name="work_card_padding_horizontal">24dp</dimen>
+ <dimen name="work_fab_radius">16dp</dimen>
+ <dimen name="work_card_padding_horizontal">10dp</dimen>
<dimen name="work_card_button_height">52dp</dimen>
<dimen name="work_fab_margin">16dp</dimen>
+ <dimen name="work_mode_fab_padding">16dp</dimen>
<dimen name="work_profile_footer_padding">20dp</dimen>
<dimen name="work_edu_card_margin">16dp</dimen>
- <dimen name="work_edu_card_radius">28dp</dimen>
+ <dimen name="work_edu_card_radius">16dp</dimen>
+
+ <dimen name="work_card_margin">24dp</dimen>
+ <!-- (x) icon button inside work edu card -->
+ <dimen name="rounded_button_width">24dp</dimen>
+ <dimen name="x_icon_size">16dp</dimen>
+ <dimen name="x_icon_padding">4dp</dimen>
<!-- rounded button shown inside card views, and snack bars -->
<dimen name="padded_rounded_button_height">48dp</dimen>
- <dimen name="rounded_button_height">32dp</dimen>
- <dimen name="rounded_button_radius">16dp</dimen>
+ <dimen name="rounded_button_height">48dp</dimen>
+ <dimen name="rounded_button_radius">200dp</dimen>
<dimen name="rounded_button_padding">8dp</dimen>
diff --git a/src/com/android/launcher3/allapps/WorkAdapterProvider.java b/src/com/android/launcher3/allapps/WorkAdapterProvider.java
index f52a21f..ce44958 100644
--- a/src/com/android/launcher3/allapps/WorkAdapterProvider.java
+++ b/src/com/android/launcher3/allapps/WorkAdapterProvider.java
@@ -92,8 +92,6 @@
TextView title = view.findViewById(R.id.work_apps_paused_title);
title.setText(cache.workProfileEdu);
- Button button = view.findViewById(R.id.action_btn);
- button.setText(cache.workProfileEduAccept);
}
/**