diff options
Diffstat (limited to 'res')
-rw-r--r-- | res/drawable/header_background.xml | 21 | ||||
-rw-r--r-- | res/drawable/ic_info.xml | 27 | ||||
-rw-r--r-- | res/layout/grant_permissions.xml | 7 | ||||
-rw-r--r-- | res/layout/header.xml | 62 | ||||
-rwxr-xr-x | res/values/colors.xml | 1 | ||||
-rw-r--r-- | res/values/dimens.xml | 25 | ||||
-rw-r--r-- | res/values/strings.xml | 6 | ||||
-rwxr-xr-x | res/values/styles.xml | 3 |
8 files changed, 151 insertions, 1 deletions
diff --git a/res/drawable/header_background.xml b/res/drawable/header_background.xml new file mode 100644 index 00000000..77db9e03 --- /dev/null +++ b/res/drawable/header_background.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2015 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. +--> + +<ripple xmlns:android="http://schemas.android.com/apk/res/android" + android:color="?android:attr/colorControlHighlight"> + <item android:drawable="@color/header_background_color" /> +</ripple> + diff --git a/res/drawable/ic_info.xml b/res/drawable/ic_info.xml new file mode 100644 index 00000000..f80a41cb --- /dev/null +++ b/res/drawable/ic_info.xml @@ -0,0 +1,27 @@ +<!-- +Copyright (C) 2015 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24.0dp" + android:height="24.0dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:pathData="M0 0h24v24H0z" + android:fillColor="#00000000"/> + <path + android:fillColor="#FFFFFFFF" + android:pathData="M11.0,17.0l2.0,0.0l0.0,-6.0l-2.0,0.0l0.0,6.0zm1.0,-15.0C6.48,2.0 2.0,6.48 2.0,12.0s4.48,10.0 10.0,10.0 10.0,-4.48 10.0,-10.0S17.52,2.0 12.0,2.0zm0.0,18.0c-4.41,0.0 -8.0,-3.59 -8.0,-8.0s3.59,-8.0 8.0,-8.0 8.0,3.59 8.0,8.0 -3.59,8.0 -8.0,8.0zM11.0,9.0l2.0,0.0L13.0,7.0l-2.0,0.0l0.0,2.0z"/> +</vector> diff --git a/res/layout/grant_permissions.xml b/res/layout/grant_permissions.xml index 7c6bfb7a..2004447f 100644 --- a/res/layout/grant_permissions.xml +++ b/res/layout/grant_permissions.xml @@ -27,6 +27,7 @@ android:id="@+id/permission_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:tint="?android:attr/colorAccent" android:paddingTop="6dip" android:paddingEnd="10dip"> </ImageView> @@ -43,13 +44,17 @@ android:id="@+id/do_not_ask_checkbox" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_below="@id/permission_message" + android:layout_marginTop="12dp" + android:text="@string/never_ask_again" + style="?android:attr/textAppearanceSmall" android:visibility="gone"> </CheckBox> <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" - android:layout_below="@id/permission_message" + android:layout_below="@id/do_not_ask_checkbox" android:orientation="horizontal" android:paddingTop="4dip"> diff --git a/res/layout/header.xml b/res/layout/header.xml new file mode 100644 index 00000000..f9b27af6 --- /dev/null +++ b/res/layout/header.xml @@ -0,0 +1,62 @@ +<!-- + Copyright (C) 2015 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. +--> + +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="?android:attr/actionBarSize" + android:background="@drawable/header_background" + android:gravity="center_vertical" + android:theme="@style/Theme.Header.Settings" > + + <ImageView android:id="@+id/icon" + android:layout_width="@dimen/header_subsettings_margin_start" + android:layout_height="40dp" + android:gravity="end" + android:layout_centerVertical="true" /> + + <TextView + android:id="@+id/name" + android:layout_height="wrap_content" + android:layout_width="match_parent" + android:layout_toStartOf="@+id/app_settings" + android:layout_marginStart="@dimen/header_subsettings_margin_start" + android:layout_alignWithParentIfMissing="true" + android:layout_centerVertical="true" + android:textAppearance="@android:style/TextAppearance.Material.Medium" + android:textColor="@android:color/white" + android:textAlignment="viewStart" /> + + <ImageView + android:id="@+id/info" + android:layout_width="56dp" + android:layout_height="56dp" + android:layout_alignParentEnd="true" + android:layout_marginEnd="@dimen/header_subsettings_margin_end" + android:layout_centerVertical="true" + android:minHeight="0dp" + android:minWidth="0dp" + android:scaleType="center" + android:src="@drawable/ic_info" + style="?android:attr/borderlessButtonStyle" /> + + <View + android:id="@+id/row_divider" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="?android:attr/listDivider" /> + +</RelativeLayout> + diff --git a/res/values/colors.xml b/res/values/colors.xml index 6a18b2eb..5d92d6fc 100755 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -17,5 +17,6 @@ <resources> <color name="shadow">#cc222222</color> <color name="transparent">#00000000</color> + <color name="header_background_color">#ff37474f</color> </resources> diff --git a/res/values/dimens.xml b/res/values/dimens.xml new file mode 100644 index 00000000..028def55 --- /dev/null +++ b/res/values/dimens.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2015 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. +--> + +<resources> + <!-- Header sub settings margin start / end --> + <dimen name="header_subsettings_margin_start">72dp</dimen> + <dimen name="header_subsettings_margin_end">16dp</dimen> + + <!-- Header margin start / end --> + <dimen name="header_margin_start">16dp</dimen> + <dimen name="header_margin_end">16dp</dimen> +</resources> diff --git a/res/values/strings.xml b/res/values/strings.xml index e807392f..52fe050d 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -197,4 +197,10 @@ <string name="permdesc_togglePermissions" translatable="false">Allows the holder to launch the UI for toggling app permissions. Should never be needed for normal apps.</string> + <!-- Title for page of managing application permissions --> + <string name="app_permissions">App permissions</string> + <!-- Checkbox that allows user to not be questioned about this permission + request again --> + <string name="never_ask_again">Never ask again</string> + </resources> diff --git a/res/values/styles.xml b/res/values/styles.xml index b5d8d480..c67f043a 100755 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -23,4 +23,7 @@ <style name="Theme.AlertDialogActivity" parent="@android:style/Theme.DeviceDefault.Light.Panel"> <item name="android:backgroundDimEnabled">true</item> </style> + + <style name="Theme.Header.Settings" parent="@android:style/Theme.Material.Settings"> + </style> </resources> |