diff options
author | Danesh M <daneshm90@gmail.com> | 2016-03-07 15:17:59 -0800 |
---|---|---|
committer | Danesh M <daneshm90@gmail.com> | 2016-03-21 11:44:50 -0700 |
commit | a3549a2715e47ce07297315586ea9c5798da2997 (patch) | |
tree | 895cfd77ae3684f4e3d1c44410d33826246875a0 /res/layout | |
parent | f5dea70443a1c0643be50cf8058ddbfff477712f (diff) | |
download | packages_apps_Settings-a3549a2715e47ce07297315586ea9c5798da2997.zip packages_apps_Settings-a3549a2715e47ce07297315586ea9c5798da2997.tar.gz packages_apps_Settings-a3549a2715e47ce07297315586ea9c5798da2997.tar.bz2 |
Settings : Add per app internet/data control
CYAN-3976
CRACKLING-834
Change-Id: I13192df837c057b5cadde8f31532e12daaf3c1b0
Diffstat (limited to 'res/layout')
-rw-r--r-- | res/layout/app_ops_details_item.xml | 81 | ||||
-rw-r--r-- | res/layout/preference_category_material.xml | 27 |
2 files changed, 62 insertions, 46 deletions
diff --git a/res/layout/app_ops_details_item.xml b/res/layout/app_ops_details_item.xml index eb206ae..beb04f3 100644 --- a/res/layout/app_ops_details_item.xml +++ b/res/layout/app_ops_details_item.xml @@ -17,68 +17,62 @@ */ --> -<GridLayout xmlns:android="http://schemas.android.com/apk/res/android" +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="?android:attr/listPreferredItemHeight" android:paddingStart="?android:attr/listPreferredItemPaddingStart" android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" android:paddingTop="8dip" - android:paddingBottom="8dip" - android:columnCount="3"> + android:paddingBottom="8dip"> <ImageView android:id="@+id/op_icon" android:layout_width="@android:dimen/app_icon_size" android:layout_height="@android:dimen/app_icon_size" - android:layout_column="0" - android:layout_row="0" - android:layout_rowSpan="2" android:layout_marginEnd="8dip" android:scaleType="centerInside" android:contentDescription="@null" /> - <TextView - android:id="@+id/op_name" - android:layout_column="1" - android:layout_row="0" - android:layout_columnSpan="2" - android:layout_gravity="fill_horizontal" - android:layout_marginTop="2dip" - android:singleLine="true" - android:ellipsize="marquee" - android:textAppearance="?android:attr/textAppearanceMedium" - android:textAlignment="viewStart" /> - - <TextView - android:id="@+id/op_time" - android:layout_column="1" - android:layout_row="1" + <LinearLayout + android:orientation="vertical" android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_gravity="fill_horizontal|top" - android:textAppearance="?android:attr/textAppearanceSmall" - android:textAlignment="viewStart" /> + android:layout_weight="1" + android:layout_height="wrap_content"> + <TextView + android:id="@+id/op_name" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="fill_horizontal" + android:layout_marginTop="2dip" + android:singleLine="true" + android:ellipsize="marquee" + android:textAppearance="?android:attr/textAppearanceMedium" + android:textAlignment="viewStart" /> - <TextView - android:id="@+id/op_counts" - android:layout_column="1" - android:layout_row="2" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_gravity="fill_horizontal|top" - android:textAppearance="?android:attr/textAppearanceSmall" - android:textAlignment="viewStart" /> + <TextView + android:id="@+id/op_time" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="fill_horizontal|top" + android:textAppearance="?android:attr/textAppearanceSmall" + android:textAlignment="viewStart" /> + + <TextView + android:id="@+id/op_counts" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="fill_horizontal|top" + android:textAppearance="?android:attr/textAppearanceSmall" + android:textAlignment="viewStart" /> + </LinearLayout> <Spinner android:id="@+id/spinnerWidget" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_gravity="center_vertical" + android:layout_gravity="end" android:layout_marginStart="8dip" - android:layout_column="2" - android:layout_row="0" - android:layout_rowSpan="3" android:padding="8dip" android:focusable="false" android:entries="@+array/app_ops_permissions" /> @@ -87,14 +81,9 @@ android:id="@+id/switchWidget" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_gravity="center_vertical" + android:layout_gravity="end" android:layout_marginStart="8dip" - android:layout_column="2" - android:layout_row="0" - android:layout_rowSpan="3" android:padding="8dip" android:focusable="false" android:clickable="true" /> - - -</GridLayout> +</LinearLayout> diff --git a/res/layout/preference_category_material.xml b/res/layout/preference_category_material.xml new file mode 100644 index 0000000..d528464 --- /dev/null +++ b/res/layout/preference_category_material.xml @@ -0,0 +1,27 @@ +<?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. +--> + +<!-- Layout used for PreferenceCategory in a PreferenceActivity. --> +<TextView xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+android:id/title" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="16dip" + android:textAppearance="@*android:style/TextAppearance.Material.Body2" + android:textColor="@*android:color/preference_category_text_color" + android:paddingStart="?*android:attr/listPreferredItemPaddingStart" + android:paddingEnd="?*android:attr/listPreferredItemPaddingEnd" + android:paddingTop="16dip" /> |