diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2017-12-14 09:12:14 -0800 |
---|---|---|
committer | Tony Mak <tonymak@google.com> | 2017-12-14 17:27:09 +0000 |
commit | 2cdaf57f101f54f80ea7d9e75845719a6cb0e0e3 (patch) | |
tree | 8fd92dd16601ba92a5f7791585a8b94c241cd904 /res | |
parent | a74e60cb46502385935d9868ab548e028b17fc58 (diff) | |
download | android_packages_apps_Trebuchet-2cdaf57f101f54f80ea7d9e75845719a6cb0e0e3.tar.gz android_packages_apps_Trebuchet-2cdaf57f101f54f80ea7d9e75845719a6cb0e0e3.tar.bz2 android_packages_apps_Trebuchet-2cdaf57f101f54f80ea7d9e75845719a6cb0e0e3.zip |
Make work footer stick to the bottom if there are only a few apps
Bug: 70571983
Change-Id: I60ef59de0cfcbc8df24b270d0b6d2f6439ccad44
Diffstat (limited to 'res')
-rw-r--r-- | res/layout/work_tab_footer.xml | 97 |
1 files changed, 47 insertions, 50 deletions
diff --git a/res/layout/work_tab_footer.xml b/res/layout/work_tab_footer.xml index 48578d799..64c95e3fc 100644 --- a/res/layout/work_tab_footer.xml +++ b/res/layout/work_tab_footer.xml @@ -13,60 +13,57 @@ See the License for the specific language governing permissions and limitations under the License. --> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical" - android:paddingBottom="@dimen/all_apps_work_profile_tab_footer_bottom_padding" - android:paddingLeft="@dimen/dynamic_grid_cell_padding_x" - android:paddingRight="@dimen/dynamic_grid_cell_padding_x" - android:paddingTop="@dimen/all_apps_work_profile_tab_footer_top_padding"> +<com.android.launcher3.views.WorkModeToggleContainer + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingBottom="@dimen/all_apps_work_profile_tab_footer_bottom_padding" + android:paddingLeft="@dimen/dynamic_grid_cell_padding_x" + android:paddingRight="@dimen/dynamic_grid_cell_padding_x" + android:paddingTop="@dimen/all_apps_work_profile_tab_footer_top_padding"> - <RelativeLayout - android:layout_width="match_parent" - android:layout_height="wrap_content"> + <Switch + android:id="@+id/work_mode_toggle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentEnd="true" + android:theme="@style/WorkModeSwitchTheme"/> - <Switch - android:id="@+id/work_mode_toggle" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentRight="true" - android:theme="@style/WorkModeSwitchTheme"/> + <TextView + android:id="@android:id/title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignBaseline="@id/work_mode_toggle" + android:layout_alignParentStart="true" + android:ellipsize="end" + android:fontFamily="roboto-regular" + android:lines="1" + android:text="@string/work_profile_toggle_label" + android:textColor="?android:attr/textColorTertiary" + android:textSize="16sp"/> - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignBaseline="@id/work_mode_toggle" - android:layout_alignParentLeft="true" - android:ellipsize="end" - android:fontFamily="roboto-regular" - android:lines="1" - android:text="@string/work_profile_toggle_label" - android:textColor="?android:attr/textColorTertiary" - android:textSize="16sp"/> + <ImageView + android:id="@android:id/icon" + android:layout_width="24dp" + android:layout_height="24dp" + android:layout_below="@android:id/title" + android:layout_marginTop="8dp" + android:src="@drawable/ic_corp"/> - </RelativeLayout> - <LinearLayout - android:layout_width="match_parent" + <TextView + android:id="@+id/managed_by_label" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:orientation="horizontal" - android:paddingTop="8dp"> - - <ImageView - android:layout_width="24dp" - android:layout_height="24dp" - android:src="@drawable/ic_corp"/> + android:layout_below="@android:id/title" + android:layout_marginTop="8dp" + android:layout_toEndOf="@android:id/icon" + android:ellipsize="end" + android:gravity="center_vertical" + android:lines="1" + android:minHeight="24dp" + android:paddingStart="12dp" + android:textColor="?android:attr/textColorHint" + android:textSize="13sp"/> - <TextView - android:id="@+id/managed_by_label" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical" - android:ellipsize="end" - android:lines="1" - android:paddingLeft="12dp" - android:textColor="?android:attr/textColorHint" - android:textSize="13sp"/> - </LinearLayout> -</LinearLayout>
\ No newline at end of file +</com.android.launcher3.views.WorkModeToggleContainer>
\ No newline at end of file |