Merge "UI Refresh: a new app info header for app/notification."

This commit is contained in:
TreeHugger Robot
2016-10-27 22:43:51 +00:00
committed by Android (Google) Code Review
14 changed files with 665 additions and 10 deletions

View File

@@ -0,0 +1,46 @@
<?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:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="bottom"
android:paddingTop="4dp"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:orientation="horizontal">
<Button
android:id="@+id/left_button"
style="@style/AppActionPrimaryButton"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingEnd="8dp"/>
<Button
android:id="@+id/right_button"
style="@style/AppActionPrimaryButton"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingStart="8dp"/>
</LinearLayout>

View File

@@ -0,0 +1,91 @@
<?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_marginTop="16dp"
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>