Show icons in preference activity

This commit is contained in:
Moez Bhatti
2018-04-09 15:26:02 -04:00
parent a9f6f39e59
commit b3ef24b055
9 changed files with 153 additions and 28 deletions
@@ -0,0 +1,27 @@
<!--
~ Copyright (C) 2017 Moez Bhatti <moez.bhatti@gmail.com>
~
~ This file is part of QKSMS.
~
~ QKSMS is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ QKSMS is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M12.87,15.07l-2.54,-2.51 0.03,-0.03c1.74,-1.94 2.98,-4.17 3.71,-6.53L17,6L17,4h-7L10,2L8,2v2L1,4v1.99h11.17C11.5,7.92 10.44,9.75 9,11.35 8.07,10.32 7.3,9.19 6.69,8h-2c0.73,1.63 1.73,3.17 2.98,4.56l-5.09,5.02L4,19l5,-5 3.11,3.11 0.76,-2.04zM18.5,10h-2L12,22h2l1.12,-3h4.75L21,22h2l-4.5,-12zM15.88,17l1.62,-4.33L19.12,17h-3.24z"/>
</vector>
@@ -0,0 +1,27 @@
<!--
~ Copyright (C) 2017 Moez Bhatti <moez.bhatti@gmail.com>
~
~ This file is part of QKSMS.
~
~ QKSMS is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ QKSMS is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M12,3c-4.97,0 -9,4.03 -9,9s4.03,9 9,9c0.83,0 1.5,-0.67 1.5,-1.5 0,-0.39 -0.15,-0.74 -0.39,-1.01 -0.23,-0.26 -0.38,-0.61 -0.38,-0.99 0,-0.83 0.67,-1.5 1.5,-1.5L16,16c2.76,0 5,-2.24 5,-5 0,-4.42 -4.03,-8 -9,-8zM6.5,12c-0.83,0 -1.5,-0.67 -1.5,-1.5S5.67,9 6.5,9 8,9.67 8,10.5 7.33,12 6.5,12zM9.5,8C8.67,8 8,7.33 8,6.5S8.67,5 9.5,5s1.5,0.67 1.5,1.5S10.33,8 9.5,8zM14.5,8c-0.83,0 -1.5,-0.67 -1.5,-1.5S13.67,5 14.5,5s1.5,0.67 1.5,1.5S15.33,8 14.5,8zM17.5,12c-0.83,0 -1.5,-0.67 -1.5,-1.5S16.67,9 17.5,9s1.5,0.67 1.5,1.5 -0.67,1.5 -1.5,1.5z"/>
</vector>
@@ -0,0 +1,27 @@
<!--
~ Copyright (C) 2017 Moez Bhatti <moez.bhatti@gmail.com>
~
~ This file is part of QKSMS.
~
~ QKSMS is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ QKSMS is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M9,4v3h5v12h3L17,7h5L22,4L9,4zM3,12h3v7h3v-7h3L12,9L3,9v3z"/>
</vector>
@@ -1,21 +1,3 @@
<!--
~ Copyright (C) 2017 Moez Bhatti <moez.bhatti@gmail.com>
~
~ This file is part of QKSMS.
~
~ QKSMS is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ QKSMS is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
@@ -0,0 +1,27 @@
<!--
~ Copyright (C) 2017 Moez Bhatti <moez.bhatti@gmail.com>
~
~ This file is part of QKSMS.
~
~ QKSMS is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ QKSMS is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M21,3H3C2,3 1,4 1,5v14c0,1.1 0.9,2 2,2h18c1,0 2,-1 2,-2V5c0,-1 -1,-2 -2,-2zM5,17l3.5,-4.5 2.5,3.01L14.5,11l4.5,6H5z"/>
</vector>
@@ -0,0 +1,27 @@
<!--
~ Copyright (C) 2017 Moez Bhatti <moez.bhatti@gmail.com>
~
~ This file is part of QKSMS.
~
~ QKSMS is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ QKSMS is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M12,4L12,1L8,5l4,4L12,6c3.31,0 6,2.69 6,6 0,1.01 -0.25,1.97 -0.7,2.8l1.46,1.46C19.54,15.03 20,13.57 20,12c0,-4.42 -3.58,-8 -8,-8zM12,18c-3.31,0 -6,-2.69 -6,-6 0,-1.01 0.25,-1.97 0.7,-2.8L5.24,7.74C4.46,8.97 4,10.43 4,12c0,4.42 3.58,8 8,8v3l4,-4 -4,-4v3z"/>
</vector>
@@ -28,9 +28,7 @@
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginStart="24dp"
android:visibility="gone"
tools:src="@drawable/ic_notifications_black_24dp"
tools:visibility="visible" />
android:visibility="invisible" />
<LinearLayout
android:layout_width="0dp"
@@ -62,12 +62,6 @@
android:layout_height="wrap_content"
app:title="@string/settings_default_sms_title" />
<common.widget.PreferenceView
android:id="@+id/notifications"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:title="@string/settings_notifications_title" />
<common.widget.Separator
android:layout_width="match_parent"
android:layout_height="1dp"
@@ -82,12 +76,14 @@
android:id="@+id/theme"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:icon="@drawable/ic_color_lens_black_24dp"
app:title="@string/settings_theme_title" />
<common.widget.PreferenceView
android:id="@+id/night"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:icon="@drawable/ic_invert_colors_black_24dp"
app:title="@string/settings_night_title"
tools:summary="Automatic" />
@@ -125,6 +121,13 @@
style="@style/PreferenceCategory"
android:text="@string/settings_category_general" />
<common.widget.PreferenceView
android:id="@+id/notifications"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:icon="@drawable/ic_notifications_black_24dp"
app:title="@string/settings_notifications_title" />
<common.widget.PreferenceView
android:id="@+id/autoEmoji"
android:layout_width="match_parent"
@@ -138,12 +141,14 @@
android:id="@+id/blocked"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:icon="@drawable/ic_block_black_24dp"
app:title="@string/settings_blocking_title" />
<common.widget.PreferenceView
android:id="@+id/delivery"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:icon="@drawable/ic_check_white_24dp"
app:summary="@string/settings_delivery_summary"
app:title="@string/settings_delivery_title"
app:widget="@layout/settings_switch_widget" />
@@ -152,6 +157,7 @@
android:id="@+id/qkreply"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:icon="@drawable/ic_reply_white_24dp"
app:summary="@string/settings_qkreply_summary"
app:title="@string/settings_qkreply_title"
app:widget="@layout/settings_switch_widget" />
@@ -160,12 +166,14 @@
android:id="@+id/textSize"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:icon="@drawable/ic_format_size_black_24dp"
app:title="@string/settings_text_size_title" />
<common.widget.PreferenceView
android:id="@+id/unicode"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:icon="@drawable/ic_translate_black_24dp"
app:summary="@string/settings_unicode_summary"
app:title="@string/settings_unicode_title"
app:widget="@layout/settings_switch_widget" />
@@ -183,6 +191,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="visible"
app:icon="@drawable/ic_photo_size_select_actual_black_24dp"
app:title="@string/settings_mms_size_title"
tools:summary="100KB" />
@@ -190,6 +199,7 @@
android:id="@+id/sync"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:icon="@drawable/ic_sync_black_24dp"
app:summary="@string/settings_sync_summary"
app:title="@string/settings_sync_title" />
+1 -1
View File
@@ -70,7 +70,7 @@
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginBottom">16dp</item>
<item name="android:layout_marginEnd">24dp</item>
<item name="android:layout_marginStart">24dp</item>
<item name="android:layout_marginStart">72dp</item>
<item name="android:layout_marginTop">16dp</item>
<item name="android:textStyle">bold</item>
<item name="textColor">secondary</item>