Show app icons for blocking manager preference

This commit is contained in:
Moez Bhatti
2021-02-23 23:04:19 -05:00
parent 6b9469757e
commit 1e69a6a000
12 changed files with 233 additions and 23 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

@@ -30,33 +30,38 @@
android:paddingTop="8dp"
android:paddingBottom="8dp">
<com.moez.QKSMS.common.widget.RadioPreferenceView
<com.moez.QKSMS.feature.blocking.manager.BlockingManagerPreferenceView
android:id="@+id/qksms"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:icon="@drawable/ic_blocking_manager_qksms"
app:summary="@string/blocking_manager_qksms_summary"
app:title="@string/blocking_manager_qksms_title" />
app:title="@string/blocking_manager_qksms_title"
app:widget="@layout/blocking_manager_list_option" />
<com.moez.QKSMS.common.widget.RadioPreferenceView
<com.moez.QKSMS.feature.blocking.manager.BlockingManagerPreferenceView
android:id="@+id/callBlocker"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:icon="@drawable/ic_blocking_manager_call_blocker"
app:summary="@string/blocking_manager_call_blocker_summary"
app:title="@string/blocking_manager_call_blocker_title"
app:widget="@layout/blocking_manager_list_option" />
<com.moez.QKSMS.common.widget.RadioPreferenceView
<com.moez.QKSMS.feature.blocking.manager.BlockingManagerPreferenceView
android:id="@+id/callControl"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:icon="@drawable/ic_blocking_manager_call_control"
app:summary="@string/blocking_manager_call_control_summary"
app:title="@string/blocking_manager_call_control_title"
app:widget="@layout/blocking_manager_list_option" />
<com.moez.QKSMS.common.widget.RadioPreferenceView
<com.moez.QKSMS.feature.blocking.manager.BlockingManagerPreferenceView
android:id="@+id/shouldIAnswer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:icon="@drawable/ic_blocking_manager_sia"
app:summary="@string/blocking_manager_sia_summary"
app:title="@string/blocking_manager_sia_title"
app:widget="@layout/blocking_manager_list_option" />
@@ -18,11 +18,11 @@
~ along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
-->
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/install"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/action"
android:layout_width="56dp"
android:layout_height="match_parent"
android:background="?attr/selectableItemBackground"
android:orientation="vertical"
android:padding="16dp"
android:src="@drawable/ic_info_black_24dp"
android:tint="?android:attr/textColorTertiary" />
tools:src="@drawable/ic_chevron_right_black_24dp"
tools:tint="?android:attr/textColorTertiary" />
@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2020 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/>.
-->
<merge
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:parentTag="com.moez.QKSMS.feature.blocking.manager.BlockingManagerPreferenceView">
<ImageView
android:id="@+id/iconView"
android:layout_width="44dp"
android:layout_height="44dp"
android:layout_marginStart="16dp"
android:gravity="center"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/titleView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:src="@mipmap/ic_launcher" />
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/titleView"
style="@style/TextPrimary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
app:layout_constraintEnd_toStartOf="@id/widgetFrame"
app:layout_constraintStart_toEndOf="@id/iconView"
app:layout_constraintTop_toTopOf="parent"
tools:text="Default SMS App" />
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/summaryView"
style="@style/TextSecondary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:layout_marginBottom="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/titleView"
app:layout_constraintStart_toStartOf="@id/titleView"
app:layout_constraintTop_toBottomOf="@id/titleView"
tools:text="QKSMS is your default SMS app" />
<FrameLayout
android:id="@+id/widgetFrame"
android:layout_width="wrap_content"
android:animateLayoutChanges="true"
android:layout_height="match_parent"
android:layout_marginEnd="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_goneMarginEnd="24dp" />
</merge>
@@ -22,7 +22,7 @@
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.appcompat.widget.Toolbar
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/toolbar"
style="@style/Toolbar"
+10 -2
View File
@@ -22,6 +22,7 @@
<attr name="title" format="string" />
<attr name="summary" format="string" />
<attr name="widget" format="reference" />
<attr name="icon" format="reference" />
<attr name="textColor" format="enum">
<enum name="theme" value="0" />
@@ -53,7 +54,7 @@
<attr name="title" />
<attr name="summary" />
<attr name="widget" />
<attr name="icon" format="reference" />
<attr name="icon" />
</declare-styleable>
<declare-styleable name="RadioPreferenceView">
@@ -62,4 +63,11 @@
<attr name="widget" />
</declare-styleable>
</resources>
<declare-styleable name="BlockingManagerPreferenceView">
<attr name="icon" />
<attr name="title" />
<attr name="summary" />
<attr name="widget" />
</declare-styleable>
</resources>
+2 -2
View File
@@ -289,8 +289,8 @@
<string name="blocking_manager_title">Blocking Manager</string>
<string name="blocking_manager_qksms_title">QKSMS</string>
<string name="blocking_manager_qksms_summary">Built-in blocking functionality in QKSMS</string>
<string name="blocking_manager_call_blocker_title" translatable="false">Call Blocker</string>
<string name="blocking_manager_call_blocker_summary">Call Blocker is a program that blocks unwanted calls, call centers, spam, robocalls, telemarketing, private calls, hidden calls, anonymous calls, strangers, etc.</string>
<string name="blocking_manager_call_blocker_title" translatable="false">Call Blocker - Incoming/Outgoing</string>
<string name="blocking_manager_call_blocker_summary">Block spam messages, numbers &amp; unknown calls with blacklist &amp; Schedule</string>
<string name="blocking_manager_call_control_title" translatable="false">Call Control</string>
<string name="blocking_manager_call_control_summary">Automatically filter your calls and messages in one convenient place! Community IQ™ allows you to prevent unwanted messages from community known spammers</string>
<string name="blocking_manager_sia_title" translatable="false">Should I Answer?</string>