summaryrefslogtreecommitdiffstats
path: root/res/layout/dashboard_tile.xml
diff options
context:
space:
mode:
authorFabrice Di Meglio <fdimeglio@google.com>2014-04-24 14:48:48 -0700
committerFabrice Di Meglio <fdimeglio@google.com>2014-04-25 17:24:18 -0700
commit769630c8956fa844545d964166da90cc802fabac (patch)
treeecb9c4f835c026f373f76ca85bf13868399cbf2b /res/layout/dashboard_tile.xml
parent1102f76e5852d4cc482264e67c52cabf85d7a51d (diff)
downloadpackages_apps_Settings-769630c8956fa844545d964166da90cc802fabac.zip
packages_apps_Settings-769630c8956fa844545d964166da90cc802fabac.tar.gz
packages_apps_Settings-769630c8956fa844545d964166da90cc802fabac.tar.bz2
Settings new dashboard - part 2
Introduce the new Dashboard (a grid like presentation of Settings top categories) per UX specification. - the Dashboard is composed of "categories" and in each of them you have "tiles" - implement a new layout for showing top categories (DashboardContainerView). This layout basically acts like a grid - depending on the device configuration make the grid with 1 column in portrait / 2 colums in landscape (phones) OR 2 columns in portrait and 3 in landscape (tablets) - take care of Accounts adding and removing (as it changes the number of tiles to show) Also remove all the old code related to Headers Change-Id: Ie29944132c1b4c3f7b073d5a7d4453b8f5ec19a7
Diffstat (limited to 'res/layout/dashboard_tile.xml')
-rw-r--r--res/layout/dashboard_tile.xml58
1 files changed, 58 insertions, 0 deletions
diff --git a/res/layout/dashboard_tile.xml b/res/layout/dashboard_tile.xml
new file mode 100644
index 0000000..03b4b09
--- /dev/null
+++ b/res/layout/dashboard_tile.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 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="match_parent"
+ android:gravity="center_vertical"
+ android:minHeight="72dp"
+ android:background="@android:color/white">
+
+ <ImageView
+ android:id="@+id/icon"
+ android:layout_width="40dp"
+ android:layout_height="40dp"
+ android:scaleType="centerInside"
+ android:layout_marginStart="12dp"
+ android:layout_marginEnd="16dp"
+ />
+
+ <RelativeLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1" >
+
+ <TextView android:id="@+id/title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:singleLine="true"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:ellipsize="marquee"
+ android:fadingEdge="horizontal" />
+
+ <TextView android:id="@+id/status"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@android:id/title"
+ android:layout_alignStart="@android:id/title"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textColor="?android:attr/textColorSecondary"
+ />
+
+ </RelativeLayout>
+
+</LinearLayout> \ No newline at end of file