- The AppHeaderController is no longer a singleton. Each time appheader should be updated we will create a new controller. It acts as a builder/mutator, user provides customizable inputs, and the controller will bind everything to UI when calling done(). Bug: 32442716 Test: RunSettingsRoboTests Change-Id: Icfc5bcd8bc170a02b57432d864eaddf71db0d5b4
90 lines
3.2 KiB
XML
90 lines
3.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
Copyright (C) 2016 The Android Open Source Project
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
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:id="@+id/app_snippet"
|
|
style="@style/AppHeader"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_horizontal|top"
|
|
android:orientation="vertical"
|
|
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
|
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
|
|
|
|
<!-- App snippet with buttons -->
|
|
<ImageView
|
|
android:id="@android:id/icon"
|
|
android:layout_width="80dp"
|
|
android:layout_height="80dp"
|
|
android:scaleType="fitXY"
|
|
android:layout_gravity="center_horizontal"
|
|
android:antialias="true"/>
|
|
|
|
<TextView
|
|
android:id="@android:id/title"
|
|
style="@style/TextAppearance.AppHeaderTitle"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:singleLine="true"
|
|
android:ellipsize="marquee"
|
|
android:gravity="center_horizontal"
|
|
android:paddingTop="8dp"/>
|
|
|
|
<TextView
|
|
android:id="@android:id/summary"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center_horizontal"
|
|
android:singleLine="true"
|
|
android:ellipsize="marquee"
|
|
android:textAppearance="@android:style/TextAppearance.Material.Body1"
|
|
android:textColor="?android:attr/textColorSecondary"/>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/app_detail_links"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="bottom"
|
|
android:paddingStart="8dp"
|
|
android:paddingEnd="8dp"
|
|
android:orientation="horizontal">
|
|
|
|
<ImageButton
|
|
android:id="@+id/left_button"
|
|
style="@style/AppHeaderLinkButton"
|
|
android:layout_width="0dp"
|
|
android:layout_weight="1"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:paddingEnd="8dp"
|
|
android:tint="?android:attr/colorAccent"/>
|
|
|
|
<ImageButton
|
|
android:id="@+id/right_button"
|
|
style="@style/AppHeaderLinkButton"
|
|
android:layout_width="0dp"
|
|
android:layout_weight="1"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:paddingStart="8dp"
|
|
android:src="@drawable/ic_settings_24dp"
|
|
android:tint="?android:attr/colorAccent"/>
|
|
|
|
</LinearLayout>
|
|
|
|
</LinearLayout> |