Move toolbar from controller to activity

This commit is contained in:
Moez Bhatti
2018-07-30 23:25:32 -04:00
parent 75162c8114
commit 54facab486
9 changed files with 491 additions and 606 deletions
@@ -3,7 +3,6 @@ package com.moez.QKSMS.common.base
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.annotation.CallSuper
import androidx.annotation.LayoutRes
import androidx.annotation.StringRes
import androidx.appcompat.app.AppCompatActivity
@@ -32,13 +31,6 @@ abstract class QkController<ViewContract : QkViewContract<State>, State, Present
return inflater.inflate(layoutRes, container, false)
}
@CallSuper
override fun onAttach(view: View) {
super.onAttach(view)
appCompatActivity?.setSupportActionBar(view.toolbar)
setTitle(activity?.title)
}
fun setTitle(@StringRes titleId: Int) {
setTitle(activity?.getString(titleId))
}
@@ -8,7 +8,7 @@ import com.moez.QKSMS.common.base.QkController
import com.moez.QKSMS.common.widget.PreferenceView
import com.moez.QKSMS.injection.appComponent
import io.reactivex.Observable
import kotlinx.android.synthetic.main.about_activity.*
import kotlinx.android.synthetic.main.about_controller.*
import javax.inject.Inject
class AboutController : QkController<AboutView, Unit, AboutPresenter>(), AboutView {
@@ -17,7 +17,7 @@ class AboutController : QkController<AboutView, Unit, AboutPresenter>(), AboutVi
init {
appComponent.inject(this)
layoutRes = R.layout.about_activity
layoutRes = R.layout.about_controller
}
override fun onAttach(view: View) {
@@ -32,7 +32,7 @@ import com.moez.QKSMS.injection.appComponent
import io.reactivex.Observable
import io.reactivex.subjects.PublishSubject
import io.reactivex.subjects.Subject
import kotlinx.android.synthetic.main.theme_picker_activity.*
import kotlinx.android.synthetic.main.theme_picker_controller.*
import kotlinx.android.synthetic.main.theme_picker_hsv.*
import javax.inject.Inject
@@ -53,7 +53,7 @@ class ThemePickerController(val threadId: Long = 0L) : QkController<ThemePickerV
.build()
.inject(this)
layoutRes = R.layout.theme_picker_activity
layoutRes = R.layout.theme_picker_controller
}
override fun onAttach(view: View) {
@@ -1,119 +0,0 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ 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/>.
-->
<androidx.constraintlayout.widget.ConstraintLayout 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:orientation="vertical">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
style="@style/Toolbar"
app:layout_constraintTop_toTopOf="parent">
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/toolbarTitle"
style="@style/ToolbarText"
tools:text="@string/about_title" />
</androidx.appcompat.widget.Toolbar>
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/toolbar">
<LinearLayout
android:id="@+id/preferences"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:animateLayoutChanges="true"
android:orientation="vertical"
android:paddingBottom="8dp"
android:paddingTop="8dp">
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/version"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:title="@string/about_version_title"
tools:summary="3.0.8" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/developer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:summary="@string/about_developer"
app:title="@string/about_developer_title" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/source"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:summary="@string/about_source"
app:title="@string/about_source_title" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/changelog"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:summary="@string/about_changelog"
app:title="@string/about_changelog_title" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/contact"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:summary="@string/about_contact"
app:title="@string/about_contact_title" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/license"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:summary="@string/about_license"
app:title="@string/about_license_title" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/copyright"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:summary="@string/about_copyright"
app:title="@string/about_copyright_title" />
</LinearLayout>
</ScrollView>
<View
android:layout_width="match_parent"
android:layout_height="8dp"
android:background="@drawable/ab_shadow"
app:layout_constraintTop_toBottomOf="@id/toolbar" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_gravity="bottom"
android:background="?android:attr/divider"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ 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/>.
-->
<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">
<LinearLayout
android:id="@+id/preferences"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:animateLayoutChanges="true"
android:orientation="vertical"
android:paddingBottom="8dp"
android:paddingTop="8dp">
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/version"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:title="@string/about_version_title"
tools:summary="3.0.8" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/developer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:summary="@string/about_developer"
app:title="@string/about_developer_title" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/source"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:summary="@string/about_source"
app:title="@string/about_source_title" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/changelog"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:summary="@string/about_changelog"
app:title="@string/about_changelog_title" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/contact"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:summary="@string/about_contact"
app:title="@string/about_contact_title" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/license"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:summary="@string/about_license"
app:title="@string/about_license_title" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/copyright"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:summary="@string/about_copyright"
app:title="@string/about_copyright_title" />
</LinearLayout>
</ScrollView>
@@ -1,11 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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="match_parent">
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar android:id="@+id/toolbar"
style="@style/Toolbar"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:elevation="8dp">
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/toolbarTitle"
style="@style/ToolbarText"
tools:text="Conversations" />
</androidx.appcompat.widget.Toolbar>
<com.bluelinelabs.conductor.ChangeHandlerFrameLayout
android:id="@+id/container"
android:elevation="8dp"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="0dp"
android:layout_weight="1" />
</FrameLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:attr/divider" />
</LinearLayout>
@@ -17,213 +17,173 @@
~ You should have received a copy of the GNU General Public License
~ along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
-->
<androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/contentView"
<ScrollView android:id="@+id/contentView"
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:orientation="vertical">
android:layout_height="match_parent">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
style="@style/Toolbar"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:id="@+id/preferences"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="8dp"
android:paddingTop="8dp">
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/toolbarTitle"
style="@style/ToolbarText"
tools:text="Conversations" />
style="@style/PreferenceCategory"
android:text="@string/settings_category_appearance" />
</androidx.appcompat.widget.Toolbar>
<ScrollView
android:id="@+id/scrollView"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/toolbar">
<LinearLayout
android:id="@+id/preferences"
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/theme"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="8dp"
android:paddingTop="8dp">
app:icon="@drawable/ic_color_lens_black_24dp"
app:title="@string/settings_theme_title"
app:widget="@layout/settings_theme_widget" />
<com.moez.QKSMS.common.widget.QkTextView
style="@style/PreferenceCategory"
android:text="@string/settings_category_appearance" />
<com.moez.QKSMS.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" />
<com.moez.QKSMS.common.widget.PreferenceView
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"
app:widget="@layout/settings_theme_widget" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/black"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
app:title="@string/settings_black_title"
app:widget="@layout/settings_switch_widget" />
<com.moez.QKSMS.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" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/nightStart"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
app:title="@string/settings_night_start_title"
tools:summary="6:00PM" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/black"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
app:title="@string/settings_black_title"
app:widget="@layout/settings_switch_widget" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/nightEnd"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
app:title="@string/settings_night_end_title"
tools:summary="9:00AM" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/nightStart"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
app:title="@string/settings_night_start_title"
tools:summary="6:00PM" />
<com.moez.QKSMS.common.widget.PreferenceView
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" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/nightEnd"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
app:title="@string/settings_night_end_title"
tools:summary="9:00AM" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/systemFont"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:icon="@drawable/ic_title_black_24dp"
app:title="@string/settings_system_font_title"
app:widget="@layout/settings_switch_widget" />
<com.moez.QKSMS.common.widget.PreferenceView
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" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
android:background="?android:attr/divider" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/systemFont"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:icon="@drawable/ic_title_black_24dp"
app:title="@string/settings_system_font_title"
app:widget="@layout/settings_switch_widget" />
<com.moez.QKSMS.common.widget.QkTextView
style="@style/PreferenceCategory"
android:text="@string/settings_category_general" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
android:background="?android:attr/divider" />
<com.moez.QKSMS.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" />
<com.moez.QKSMS.common.widget.QkTextView
style="@style/PreferenceCategory"
android:text="@string/settings_category_general" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/autoEmoji"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
app:title="@string/settings_auto_emoji_title"
app:widget="@layout/settings_switch_widget" />
<com.moez.QKSMS.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" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/delayed"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:icon="@drawable/ic_av_timer_black_24dp"
app:title="@string/settings_delayed_title"
tools:summary="No delay" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/autoEmoji"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
app:title="@string/settings_auto_emoji_title"
app:widget="@layout/settings_switch_widget" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/swipeActions"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="visible"
app:icon="@drawable/ic_clear_all_black_24dp"
app:summary="@string/settings_swipe_actions_summary"
app:title="@string/settings_swipe_actions" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/delayed"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:icon="@drawable/ic_av_timer_black_24dp"
app:title="@string/settings_delayed_title"
tools:summary="No delay" />
<com.moez.QKSMS.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" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/swipeActions"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="visible"
app:icon="@drawable/ic_clear_all_black_24dp"
app:summary="@string/settings_swipe_actions_summary"
app:title="@string/settings_swipe_actions" />
<com.moez.QKSMS.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" />
<com.moez.QKSMS.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" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/mmsSize"
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" />
<com.moez.QKSMS.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" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
android:background="?android:attr/divider" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/mmsSize"
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" />
<com.moez.QKSMS.common.widget.PreferenceView
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" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
android:background="?android:attr/divider" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/about"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:icon="@drawable/ic_info_black_24dp"
app:title="@string/settings_about_title"
tools:summary="Version 3.0.7" />
<com.moez.QKSMS.common.widget.PreferenceView
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" />
</LinearLayout>
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/about"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:icon="@drawable/ic_info_black_24dp"
app:title="@string/settings_about_title"
tools:summary="Version 3.0.7" />
</LinearLayout>
</ScrollView>
<View
android:layout_width="0dp"
android:layout_height="8dp"
android:background="@drawable/ab_shadow"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/toolbar" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:attr/divider"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
@@ -17,292 +17,256 @@
~ You should have received a copy of the GNU General Public License
~ along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
-->
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<ScrollView
android:id="@+id/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:orientation="vertical">
android:layout_height="match_parent">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
style="@style/Toolbar"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/toolbarTitle"
style="@style/ToolbarText"
tools:text="Swipe actions" />
</androidx.appcompat.widget.Toolbar>
<ScrollView
android:id="@+id/scrollView"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/toolbar">
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/right"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:foreground="?attr/selectableItemBackground">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/right"
android:layout_width="match_parent"
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/rightTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:foreground="?attr/selectableItemBackground">
android:layout_marginEnd="16dp"
android:layout_marginStart="24dp"
android:layout_marginTop="24dp"
android:text="@string/settings_swipe_actions_right"
android:textColor="?android:attr/textColorPrimary"
app:layout_constraintEnd_toStartOf="@id/rightChange"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:textSize="primary" />
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/rightTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginStart="24dp"
android:layout_marginTop="24dp"
android:text="@string/settings_swipe_actions_right"
android:textColor="?android:attr/textColorPrimary"
app:layout_constraintEnd_toStartOf="@id/rightChange"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:textSize="primary" />
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/rightLabel"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:textColor="?android:attr/textColorSecondary"
app:layout_constraintEnd_toEndOf="@id/rightTitle"
app:layout_constraintStart_toStartOf="@id/rightTitle"
app:layout_constraintTop_toBottomOf="@id/rightTitle"
app:textSize="secondary"
tools:text="Archive" />
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/rightLabel"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:textColor="?android:attr/textColorSecondary"
app:layout_constraintEnd_toEndOf="@id/rightTitle"
app:layout_constraintStart_toStartOf="@id/rightTitle"
app:layout_constraintTop_toBottomOf="@id/rightTitle"
app:textSize="secondary"
tools:text="Archive" />
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/rightChange"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
android:text="@string/settings_swipe_actions_change"
android:textAllCaps="true"
android:textColor="?android:attr/textColorSecondary"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/rightTitle"
app:textSize="secondary" />
<View
android:id="@+id/rightBackground"
android:layout_width="match_parent"
android:layout_height="84dp"
android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:alpha="0.1"
android:background="@drawable/rounded_rectangle_outline_4dp"
android:backgroundTint="?android:attr/textColorPrimary"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/rightLabel" />
<ImageView
android:id="@+id/rightIcon"
android:layout_width="96dp"
android:layout_height="84dp"
android:background="@drawable/rounded_rectangle_left_4dp"
android:paddingBottom="30dp"
android:paddingEnd="48dp"
android:paddingStart="24dp"
android:paddingTop="30dp"
app:layout_constraintBottom_toBottomOf="@id/rightBackground"
app:layout_constraintStart_toStartOf="@id/rightBackground"
app:layout_constraintTop_toTopOf="@id/rightBackground"
tools:backgroundTint="@color/tools_theme"
tools:src="@drawable/ic_archive_black_24dp"
tools:tint="@color/textPrimaryDark" />
<ImageView
android:id="@+id/rightAvatar"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginStart="16dp"
android:background="@drawable/circle"
android:backgroundTint="?android:attr/divider"
android:padding="8dp"
android:src="@drawable/ic_person_black_24dp"
android:tint="?android:attr/textColorTertiary"
app:layout_constraintBottom_toBottomOf="@id/rightBackground"
app:layout_constraintStart_toEndOf="@id/rightIcon"
app:layout_constraintTop_toTopOf="@id/rightBackground" />
<View
android:id="@+id/rightTitleRect"
android:layout_width="128dp"
android:layout_height="8dp"
android:layout_marginStart="16dp"
android:background="@drawable/rounded_rectangle_2dp"
android:backgroundTint="?android:attr/textColorTertiary"
app:layout_constraintBottom_toTopOf="@id/rightSummaryRect"
app:layout_constraintStart_toEndOf="@id/rightAvatar"
app:layout_constraintTop_toTopOf="@id/rightBackground"
app:layout_constraintVertical_chainStyle="packed" />
<View
android:id="@+id/rightSummaryRect"
android:layout_width="96dp"
android:layout_height="8dp"
android:layout_marginTop="8dp"
android:background="@drawable/rounded_rectangle_2dp"
android:backgroundTint="?android:attr/divider"
app:layout_constraintBottom_toBottomOf="@id/rightBackground"
app:layout_constraintStart_toStartOf="@id/rightTitleRect"
app:layout_constraintTop_toBottomOf="@id/rightTitleRect" />
</androidx.constraintlayout.widget.ConstraintLayout>
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/rightChange"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
android:text="@string/settings_swipe_actions_change"
android:textAllCaps="true"
android:textColor="?android:attr/textColorSecondary"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/rightTitle"
app:textSize="secondary" />
<View
android:id="@+id/rightBackground"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:attr/divider" />
android:layout_height="84dp"
android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:alpha="0.1"
android:background="@drawable/rounded_rectangle_outline_4dp"
android:backgroundTint="?android:attr/textColorPrimary"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/rightLabel" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/left"
android:layout_width="match_parent"
<ImageView
android:id="@+id/rightIcon"
android:layout_width="96dp"
android:layout_height="84dp"
android:background="@drawable/rounded_rectangle_left_4dp"
android:paddingBottom="30dp"
android:paddingEnd="48dp"
android:paddingStart="24dp"
android:paddingTop="30dp"
app:layout_constraintBottom_toBottomOf="@id/rightBackground"
app:layout_constraintStart_toStartOf="@id/rightBackground"
app:layout_constraintTop_toTopOf="@id/rightBackground"
tools:backgroundTint="@color/tools_theme"
tools:src="@drawable/ic_archive_black_24dp"
tools:tint="@color/textPrimaryDark" />
<ImageView
android:id="@+id/rightAvatar"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginStart="16dp"
android:background="@drawable/circle"
android:backgroundTint="?android:attr/divider"
android:padding="8dp"
android:src="@drawable/ic_person_black_24dp"
android:tint="?android:attr/textColorTertiary"
app:layout_constraintBottom_toBottomOf="@id/rightBackground"
app:layout_constraintStart_toEndOf="@id/rightIcon"
app:layout_constraintTop_toTopOf="@id/rightBackground" />
<View
android:id="@+id/rightTitleRect"
android:layout_width="128dp"
android:layout_height="8dp"
android:layout_marginStart="16dp"
android:background="@drawable/rounded_rectangle_2dp"
android:backgroundTint="?android:attr/textColorTertiary"
app:layout_constraintBottom_toTopOf="@id/rightSummaryRect"
app:layout_constraintStart_toEndOf="@id/rightAvatar"
app:layout_constraintTop_toTopOf="@id/rightBackground"
app:layout_constraintVertical_chainStyle="packed" />
<View
android:id="@+id/rightSummaryRect"
android:layout_width="96dp"
android:layout_height="8dp"
android:layout_marginTop="8dp"
android:background="@drawable/rounded_rectangle_2dp"
android:backgroundTint="?android:attr/divider"
app:layout_constraintBottom_toBottomOf="@id/rightBackground"
app:layout_constraintStart_toStartOf="@id/rightTitleRect"
app:layout_constraintTop_toBottomOf="@id/rightTitleRect" />
</androidx.constraintlayout.widget.ConstraintLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:attr/divider" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/left"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:foreground="?attr/selectableItemBackground">
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/leftTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:foreground="?attr/selectableItemBackground">
android:layout_marginEnd="16dp"
android:layout_marginStart="24dp"
android:layout_marginTop="24dp"
android:text="@string/settings_swipe_actions_left"
android:textColor="?android:attr/textColorPrimary"
app:layout_constraintEnd_toStartOf="@id/leftChange"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:textSize="primary" />
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/leftTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginStart="24dp"
android:layout_marginTop="24dp"
android:text="@string/settings_swipe_actions_left"
android:textColor="?android:attr/textColorPrimary"
app:layout_constraintEnd_toStartOf="@id/leftChange"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:textSize="primary" />
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/leftLabel"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:textColor="?android:attr/textColorSecondary"
app:layout_constraintEnd_toEndOf="@id/leftTitle"
app:layout_constraintStart_toStartOf="@id/leftTitle"
app:layout_constraintTop_toBottomOf="@id/leftTitle"
app:textSize="secondary"
tools:text="Archive" />
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/leftLabel"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:textColor="?android:attr/textColorSecondary"
app:layout_constraintEnd_toEndOf="@id/leftTitle"
app:layout_constraintStart_toStartOf="@id/leftTitle"
app:layout_constraintTop_toBottomOf="@id/leftTitle"
app:textSize="secondary"
tools:text="Archive" />
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/leftChange"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
android:text="@string/settings_swipe_actions_change"
android:textAllCaps="true"
android:textColor="?android:attr/textColorSecondary"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/leftTitle"
app:textSize="secondary" />
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/leftChange"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
android:text="@string/settings_swipe_actions_change"
android:textAllCaps="true"
android:textColor="?android:attr/textColorSecondary"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/leftTitle"
app:textSize="secondary" />
<View
android:id="@+id/leftBackground"
android:layout_width="match_parent"
android:layout_height="84dp"
android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:alpha="0.1"
android:background="@drawable/rounded_rectangle_outline_4dp"
android:backgroundTint="?android:attr/textColorPrimary"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/leftLabel" />
<View
android:id="@+id/leftBackground"
android:layout_width="match_parent"
android:layout_height="84dp"
android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:alpha="0.1"
android:background="@drawable/rounded_rectangle_outline_4dp"
android:backgroundTint="?android:attr/textColorPrimary"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/leftLabel" />
<ImageView
android:id="@+id/leftIcon"
android:layout_width="96dp"
android:layout_height="84dp"
android:background="@drawable/rounded_rectangle_right_4dp"
android:paddingBottom="30dp"
android:paddingEnd="24dp"
android:paddingStart="48dp"
android:paddingTop="30dp"
app:layout_constraintBottom_toBottomOf="@id/leftBackground"
app:layout_constraintEnd_toEndOf="@id/leftBackground"
app:layout_constraintTop_toTopOf="@id/leftBackground"
tools:backgroundTint="@color/tools_theme"
tools:src="@drawable/ic_archive_black_24dp"
tools:tint="@color/textPrimaryDark" />
<ImageView
android:id="@+id/leftIcon"
android:layout_width="96dp"
android:layout_height="84dp"
android:background="@drawable/rounded_rectangle_right_4dp"
android:paddingBottom="30dp"
android:paddingEnd="24dp"
android:paddingStart="48dp"
android:paddingTop="30dp"
app:layout_constraintBottom_toBottomOf="@id/leftBackground"
app:layout_constraintEnd_toEndOf="@id/leftBackground"
app:layout_constraintTop_toTopOf="@id/leftBackground"
tools:backgroundTint="@color/tools_theme"
tools:src="@drawable/ic_archive_black_24dp"
tools:tint="@color/textPrimaryDark" />
<ImageView
android:id="@+id/leftAvatar"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginStart="16dp"
android:background="@drawable/circle"
android:backgroundTint="?android:attr/divider"
android:padding="8dp"
android:src="@drawable/ic_person_black_24dp"
android:tint="?android:attr/textColorTertiary"
app:layout_constraintBottom_toBottomOf="@id/leftBackground"
app:layout_constraintStart_toStartOf="@id/leftBackground"
app:layout_constraintTop_toTopOf="@id/leftBackground" />
<ImageView
android:id="@+id/leftAvatar"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginStart="16dp"
android:background="@drawable/circle"
android:backgroundTint="?android:attr/divider"
android:padding="8dp"
android:src="@drawable/ic_person_black_24dp"
android:tint="?android:attr/textColorTertiary"
app:layout_constraintBottom_toBottomOf="@id/leftBackground"
app:layout_constraintStart_toStartOf="@id/leftBackground"
app:layout_constraintTop_toTopOf="@id/leftBackground" />
<View
android:id="@+id/leftTitleRect"
android:layout_width="128dp"
android:layout_height="8dp"
android:layout_marginStart="16dp"
android:background="@drawable/rounded_rectangle_2dp"
android:backgroundTint="?android:attr/textColorTertiary"
app:layout_constraintBottom_toTopOf="@id/leftSummaryRect"
app:layout_constraintStart_toEndOf="@id/leftAvatar"
app:layout_constraintTop_toTopOf="@id/leftBackground"
app:layout_constraintVertical_chainStyle="packed" />
<View
android:id="@+id/leftTitleRect"
android:layout_width="128dp"
android:layout_height="8dp"
android:layout_marginStart="16dp"
android:background="@drawable/rounded_rectangle_2dp"
android:backgroundTint="?android:attr/textColorTertiary"
app:layout_constraintBottom_toTopOf="@id/leftSummaryRect"
app:layout_constraintStart_toEndOf="@id/leftAvatar"
app:layout_constraintTop_toTopOf="@id/leftBackground"
app:layout_constraintVertical_chainStyle="packed" />
<View
android:id="@+id/leftSummaryRect"
android:layout_width="96dp"
android:layout_height="8dp"
android:layout_marginTop="8dp"
android:background="@drawable/rounded_rectangle_2dp"
android:backgroundTint="?android:attr/divider"
app:layout_constraintBottom_toBottomOf="@id/leftBackground"
app:layout_constraintStart_toStartOf="@id/leftTitleRect"
app:layout_constraintTop_toBottomOf="@id/leftTitleRect" />
<View
android:id="@+id/leftSummaryRect"
android:layout_width="96dp"
android:layout_height="8dp"
android:layout_marginTop="8dp"
android:background="@drawable/rounded_rectangle_2dp"
android:backgroundTint="?android:attr/divider"
app:layout_constraintBottom_toBottomOf="@id/leftBackground"
app:layout_constraintStart_toStartOf="@id/leftTitleRect"
app:layout_constraintTop_toBottomOf="@id/leftTitleRect" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
<View
android:layout_width="0dp"
android:layout_height="8dp"
android:background="@drawable/ab_shadow"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/toolbar" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:attr/divider"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
@@ -24,51 +24,33 @@
android:animateLayoutChanges="true"
android:orientation="vertical">
<include layout="@layout/toolbar" />
<com.moez.QKSMS.common.widget.PagerTitleView
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="?attr/colorPrimary"
android:elevation="8dp"
android:orientation="horizontal"
android:paddingEnd="12dp"
android:paddingStart="12dp" />
<FrameLayout
<androidx.viewpager.widget.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<androidx.viewpager.widget.ViewPager
android:id="@+id/pager"
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/materialColors"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/materialColors"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<include
android:id="@+id/hsvPicker"
layout="@layout/theme_picker_hsv"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</androidx.viewpager.widget.ViewPager>
<View
<include
android:id="@+id/hsvPicker"
layout="@layout/theme_picker_hsv"
android:layout_width="match_parent"
android:layout_height="8dp"
android:background="@drawable/ab_shadow" />
android:layout_height="match_parent" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_gravity="bottom"
android:background="?android:attr/divider" />
</FrameLayout>
</androidx.viewpager.widget.ViewPager>
</LinearLayout>