Make nav drawer scrollable, improve banner for QKSMS+

This commit is contained in:
Moez Bhatti
2018-07-18 14:41:06 -04:00
parent cb1ba7f8c3
commit 08dbd7d72a
7 changed files with 313 additions and 200 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="M10,6L8.59,7.41 13.17,12l-4.58,4.59L10,18l6,-6z"/>
</vector>
+261 -196
View File
@@ -17,218 +17,283 @@
~ You should have received a copy of the GNU General Public License
~ along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<ScrollView 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="match_parent"
android:background="?android:attr/windowBackground"
android:orientation="vertical"
android:paddingTop="8dp">
android:background="?android:attr/windowBackground">
<LinearLayout
android:id="@+id/inbox"
style="@style/DrawerRow">
<ImageView
android:id="@+id/inboxIcon"
style="@style/DrawerIcon"
android:src="@drawable/ic_inbox_black_24dp"
tools:tint="@color/tools_theme" />
<com.moez.QKSMS.common.widget.QkTextView
style="@style/DrawerText"
android:text="@string/drawer_inbox" />
</LinearLayout>
<LinearLayout
android:id="@+id/archived"
style="@style/DrawerRow">
<ImageView
android:id="@+id/archivedIcon"
style="@style/DrawerIcon"
android:src="@drawable/ic_archive_black_24dp"
tools:tint="?android:attr/textColorSecondary" />
<com.moez.QKSMS.common.widget.QkTextView
style="@style/DrawerText"
android:text="@string/drawer_archived" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
android:background="?android:attr/divider" />
<LinearLayout
android:id="@+id/scheduled"
style="@style/DrawerRow">
<ImageView
style="@style/DrawerIcon"
android:src="@drawable/ic_event_black_24dp"
android:tint="?android:attr/textColorSecondary" />
<com.moez.QKSMS.common.widget.QkTextView
style="@style/DrawerText"
android:text="@string/drawer_scheduled" />
</LinearLayout>
<LinearLayout
android:id="@+id/blocking"
style="@style/DrawerRow">
<ImageView
style="@style/DrawerIcon"
android:src="@drawable/ic_block_black_24dp"
android:tint="?android:attr/textColorSecondary" />
<com.moez.QKSMS.common.widget.QkTextView
style="@style/DrawerText"
android:text="@string/drawer_blocking" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
android:background="?android:attr/divider" />
<LinearLayout
android:id="@+id/settings"
style="@style/DrawerRow">
<ImageView
style="@style/DrawerIcon"
android:src="@drawable/ic_settings_black_24dp"
android:tint="?android:attr/textColorSecondary" />
<com.moez.QKSMS.common.widget.QkTextView
style="@style/DrawerText"
android:text="@string/drawer_settings" />
</LinearLayout>
<LinearLayout
android:id="@+id/plus"
style="@style/DrawerRow">
<ImageView
style="@style/DrawerIcon"
android:src="@drawable/ic_star_black_24dp"
android:tint="?android:attr/textColorSecondary" />
<com.moez.QKSMS.common.widget.QkTextView
style="@style/DrawerText"
android:text="@string/drawer_plus" />
</LinearLayout>
<LinearLayout
android:id="@+id/help"
style="@style/DrawerRow">
<ImageView
style="@style/DrawerIcon"
android:src="@drawable/ic_help_black_24dp"
android:tint="?android:attr/textColorSecondary" />
<com.moez.QKSMS.common.widget.QkTextView
style="@style/DrawerText"
android:text="@string/drawer_help" />
</LinearLayout>
<Space
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/rateLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:background="@drawable/rounded_rectangle_outline_2dp"
android:backgroundTint="?android:attr/divider">
android:orientation="vertical"
android:paddingBottom="8dp"
android:paddingTop="8dp">
<ImageView
android:id="@+id/rateIcon"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginStart="16dp"
android:src="@drawable/ic_favorite_black_24dp"
app:layout_constraintBottom_toBottomOf="@id/rateSummary"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/rateTitle"
tools:tint="@color/tools_theme" />
<LinearLayout
android:id="@+id/inbox"
style="@style/DrawerRow">
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/rateTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:text="@string/rate_title"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/rateIcon"
app:layout_constraintTop_toTopOf="parent"
app:textColor="primary"
app:textSize="primary" />
<ImageView
android:id="@+id/inboxIcon"
style="@style/DrawerIcon"
android:src="@drawable/ic_inbox_black_24dp"
tools:tint="@color/tools_theme" />
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/rateSummary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:text="@string/rate_summary"
app:layout_constraintEnd_toEndOf="@id/rateTitle"
app:layout_constraintStart_toStartOf="@id/rateTitle"
app:layout_constraintTop_toBottomOf="@id/rateTitle"
app:textColor="secondary"
app:textSize="secondary" />
<com.moez.QKSMS.common.widget.QkTextView
style="@style/DrawerText"
android:text="@string/drawer_inbox" />
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/rateDismiss"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
</LinearLayout>
<LinearLayout
android:id="@+id/archived"
style="@style/DrawerRow">
<ImageView
android:id="@+id/archivedIcon"
style="@style/DrawerIcon"
android:src="@drawable/ic_archive_black_24dp"
tools:tint="?android:attr/textColorSecondary" />
<com.moez.QKSMS.common.widget.QkTextView
style="@style/DrawerText"
android:text="@string/drawer_archived" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
android:paddingBottom="16dp"
android:paddingStart="16dp"
android:paddingTop="16dp"
android:text="@string/rate_dismiss"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@id/rateOkay"
app:layout_constraintTop_toBottomOf="@id/rateSummary"
app:textColor="tertiary"
app:textSize="secondary" />
android:background="?android:attr/divider" />
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/rateOkay"
android:layout_width="wrap_content"
<LinearLayout
android:id="@+id/scheduled"
style="@style/DrawerRow">
<ImageView
style="@style/DrawerIcon"
android:src="@drawable/ic_event_black_24dp"
android:tint="?android:attr/textColorSecondary" />
<com.moez.QKSMS.common.widget.QkTextView
style="@style/DrawerText"
android:text="@string/drawer_scheduled" />
</LinearLayout>
<LinearLayout
android:id="@+id/blocking"
style="@style/DrawerRow">
<ImageView
style="@style/DrawerIcon"
android:src="@drawable/ic_block_black_24dp"
android:tint="?android:attr/textColorSecondary" />
<com.moez.QKSMS.common.widget.QkTextView
style="@style/DrawerText"
android:text="@string/drawer_blocking" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
android:background="?android:attr/divider" />
<LinearLayout
android:id="@+id/settings"
style="@style/DrawerRow">
<ImageView
style="@style/DrawerIcon"
android:src="@drawable/ic_settings_black_24dp"
android:tint="?android:attr/textColorSecondary" />
<com.moez.QKSMS.common.widget.QkTextView
style="@style/DrawerText"
android:text="@string/drawer_settings" />
</LinearLayout>
<LinearLayout
android:id="@+id/plus"
style="@style/DrawerRow">
<ImageView
style="@style/DrawerIcon"
android:src="@drawable/ic_star_black_24dp"
android:tint="?android:attr/textColorSecondary" />
<com.moez.QKSMS.common.widget.QkTextView
style="@style/DrawerText"
android:text="@string/drawer_plus" />
</LinearLayout>
<LinearLayout
android:id="@+id/help"
style="@style/DrawerRow">
<ImageView
style="@style/DrawerIcon"
android:src="@drawable/ic_help_black_24dp"
android:tint="?android:attr/textColorSecondary" />
<com.moez.QKSMS.common.widget.QkTextView
style="@style/DrawerText"
android:text="@string/drawer_help" />
</LinearLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/plusBanner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:padding="16dp"
android:text="@string/rate_okay"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/rateSummary"
app:textColor="secondary"
app:textSize="secondary" />
android:background="@drawable/rounded_rectangle_outline_2dp"
android:backgroundTint="?android:attr/divider"
android:foreground="?attr/selectableItemBackground"
android:padding="16dp">
</androidx.constraintlayout.widget.ConstraintLayout>
<ImageView
android:id="@+id/plusIcon"
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/ic_star_black_24dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:tint="@color/tools_theme" />
</LinearLayout>
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/plusTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
android:text="@string/drawer_plus_banner_title"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@id/plusNext"
app:layout_constraintStart_toEndOf="@id/plusIcon"
app:layout_constraintTop_toTopOf="parent"
app:textColor="primary"
app:textSize="primary" />
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/plusSummary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="@string/drawer_plus_banner_summary"
app:layout_constraintEnd_toEndOf="@id/plusTitle"
app:layout_constraintStart_toStartOf="@id/plusTitle"
app:layout_constraintTop_toBottomOf="@id/plusTitle"
app:textColor="secondary"
app:textSize="secondary" />
<ImageView
android:id="@+id/plusNext"
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/ic_chevron_right_black_24dp"
android:tint="?android:attr/textColorTertiary"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/rateLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:background="@drawable/rounded_rectangle_outline_2dp"
android:backgroundTint="?android:attr/divider">
<ImageView
android:id="@+id/rateIcon"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginStart="16dp"
android:src="@drawable/ic_favorite_black_24dp"
app:layout_constraintBottom_toBottomOf="@id/rateSummary"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/rateTitle"
tools:tint="@color/tools_theme" />
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/rateTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:text="@string/rate_title"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/rateIcon"
app:layout_constraintTop_toTopOf="parent"
app:textColor="primary"
app:textSize="primary" />
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/rateSummary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginTop="2dp"
android:text="@string/rate_summary"
app:layout_constraintEnd_toEndOf="@id/rateTitle"
app:layout_constraintStart_toStartOf="@id/rateTitle"
app:layout_constraintTop_toBottomOf="@id/rateTitle"
app:textColor="secondary"
app:textSize="secondary" />
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/rateDismiss"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:paddingBottom="16dp"
android:paddingStart="16dp"
android:paddingTop="16dp"
android:text="@string/rate_dismiss"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@id/rateOkay"
app:layout_constraintTop_toBottomOf="@id/rateSummary"
app:textColor="tertiary"
app:textSize="secondary" />
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/rateOkay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:padding="16dp"
android:text="@string/rate_okay"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/rateSummary"
app:textColor="secondary"
app:textSize="secondary" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</ScrollView>
@@ -68,6 +68,8 @@
<string name="drawer_settings">Settings</string>
<string name="drawer_plus">QKSMS+</string>
<string name="drawer_help">Help &amp; feedback</string>
<string name="drawer_plus_banner_title">QKSMS+</string>
<string name="drawer_plus_banner_summary">Unlock amazing new features, and support development</string>
<string name="rate_title">Enjoying QKSMS?</string>
<string name="rate_summary">Share some love and rate us on Google Play!</string>