forked from upstream-mirrors/quik
Update design for scheduled messages empty state
This commit is contained in:
@@ -54,6 +54,8 @@ class ScheduledActivity : QkThemedActivity(), ScheduledView {
|
|||||||
messages.adapter = messageAdapter
|
messages.adapter = messageAdapter
|
||||||
|
|
||||||
colors.theme().let { theme ->
|
colors.theme().let { theme ->
|
||||||
|
sampleMessage.setBackgroundTint(theme.theme)
|
||||||
|
sampleMessage.setTextColor(theme.textPrimary)
|
||||||
upgrade.setBackgroundTint(theme.theme)
|
upgrade.setBackgroundTint(theme.theme)
|
||||||
upgradeIcon.setTint(theme.textPrimary)
|
upgradeIcon.setTint(theme.textPrimary)
|
||||||
upgradeLabel.setTextColor(theme.textPrimary)
|
upgradeLabel.setTextColor(theme.textPrimary)
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
<?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/>.
|
||||||
|
-->
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<solid android:color="@android:color/transparent" />
|
||||||
|
<stroke
|
||||||
|
android:width="1dp"
|
||||||
|
android:color="@color/white" />
|
||||||
|
<corners android:radius="22dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
||||||
@@ -31,6 +31,8 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:collapsedTitleTextAppearance="@style/CollapsingToolbarCollapsedText"
|
app:collapsedTitleTextAppearance="@style/CollapsingToolbarCollapsedText"
|
||||||
app:expandedTitleMarginBottom="8dp"
|
app:expandedTitleMarginBottom="8dp"
|
||||||
|
app:expandedTitleMarginEnd="24dp"
|
||||||
|
app:expandedTitleMarginStart="24dp"
|
||||||
app:expandedTitleTextAppearance="@style/CollapsingToolbarExpandedText"
|
app:expandedTitleTextAppearance="@style/CollapsingToolbarExpandedText"
|
||||||
app:layout_scrollFlags="scroll|exitUntilCollapsed">
|
app:layout_scrollFlags="scroll|exitUntilCollapsed">
|
||||||
|
|
||||||
|
|||||||
@@ -23,26 +23,87 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.core.widget.NestedScrollView
|
||||||
android:id="@+id/messages"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:paddingBottom="8dp"
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
android:paddingTop="8dp"
|
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
|
||||||
tools:listitem="@layout/scheduled_message_list_item" />
|
|
||||||
|
|
||||||
<com.moez.QKSMS.common.widget.QkTextView
|
<LinearLayout
|
||||||
android:id="@+id/empty"
|
android:layout_width="match_parent"
|
||||||
style="@style/TextSecondary"
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="match_parent"
|
android:animateLayoutChanges="true"
|
||||||
android:layout_height="match_parent"
|
android:orientation="vertical">
|
||||||
android:clickable="true"
|
|
||||||
android:focusable="true"
|
<LinearLayout
|
||||||
android:gravity="center"
|
android:id="@+id/empty"
|
||||||
android:padding="56dp"
|
android:layout_width="match_parent"
|
||||||
android:text="@string/scheduled_empty_text" />
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingEnd="24dp"
|
||||||
|
android:paddingStart="24dp">
|
||||||
|
|
||||||
|
<com.moez.QKSMS.common.widget.QkTextView
|
||||||
|
style="@style/TextPrimary"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:text="@string/scheduled_empty_description"
|
||||||
|
app:textColor="secondary" />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="56dp" />
|
||||||
|
|
||||||
|
<com.moez.QKSMS.common.widget.TightTextView
|
||||||
|
style="@style/ScheduledSampleTextStyle"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:text="@string/scheduled_empty_message_1" />
|
||||||
|
|
||||||
|
<com.moez.QKSMS.common.widget.TightTextView
|
||||||
|
android:id="@+id/sampleMessage"
|
||||||
|
style="@style/ScheduledSampleTextStyle"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:background="@drawable/rounded_rectangle_22dp"
|
||||||
|
android:text="@string/scheduled_empty_message_2"
|
||||||
|
tools:backgroundTint="@color/tools_theme"
|
||||||
|
tools:textColor="@color/textPrimaryDark" />
|
||||||
|
|
||||||
|
<com.moez.QKSMS.common.widget.TightTextView
|
||||||
|
style="@style/ScheduledSampleTextStyle"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:text="@string/scheduled_empty_message_3" />
|
||||||
|
|
||||||
|
<com.moez.QKSMS.common.widget.QkTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:gravity="end"
|
||||||
|
android:text="@string/scheduled_empty_message_3_timestamp"
|
||||||
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
|
android:textStyle="italic"
|
||||||
|
app:textSize="secondary" />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="56dp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/messages"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingBottom="8dp"
|
||||||
|
android:paddingTop="8dp"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
|
tools:listitem="@layout/scheduled_message_list_item" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/upgrade"
|
android:id="@+id/upgrade"
|
||||||
|
|||||||
@@ -137,7 +137,10 @@
|
|||||||
|
|
||||||
<string name="scheduled_title">Scheduled</string>
|
<string name="scheduled_title">Scheduled</string>
|
||||||
<string name="scheduled_empty_description">Automatically send a message, at the exact moment you\'d like</string>
|
<string name="scheduled_empty_description">Automatically send a message, at the exact moment you\'d like</string>
|
||||||
<string name="scheduled_empty_text">Your scheduled messages will appear here</string>
|
<string name="scheduled_empty_message_1">Hey! When was your birthday again?</string>
|
||||||
|
<string name="scheduled_empty_message_2">It\'s on December 23rd</string>
|
||||||
|
<string name="scheduled_empty_message_3">Happy birthday! Look at what a great friend I am, remembering your birthday</string>
|
||||||
|
<string name="scheduled_empty_message_3_timestamp">Sending on December 23rd </string>
|
||||||
<string name="scheduled_options_title">Scheduled message</string>
|
<string name="scheduled_options_title">Scheduled message</string>
|
||||||
<string-array name="scheduled_options">
|
<string-array name="scheduled_options">
|
||||||
<item>Send now</item>
|
<item>Send now</item>
|
||||||
|
|||||||
@@ -87,6 +87,21 @@
|
|||||||
<item name="android:textStyle">bold</item>
|
<item name="android:textStyle">bold</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="ScheduledSampleTextStyle">
|
||||||
|
<item name="android:layout_width">wrap_content</item>
|
||||||
|
<item name="android:layout_height">wrap_content</item>
|
||||||
|
<item name="android:background">@drawable/rounded_rectangle_outline_22dp</item>
|
||||||
|
<item name="android:backgroundTint">?android:attr/divider</item>
|
||||||
|
<item name="android:gravity">center_vertical</item>
|
||||||
|
<item name="android:minHeight">44dp</item>
|
||||||
|
<item name="android:paddingBottom">12dp</item>
|
||||||
|
<item name="android:paddingEnd">16dp</item>
|
||||||
|
<item name="android:paddingStart">16dp</item>
|
||||||
|
<item name="android:paddingTop">12dp</item>
|
||||||
|
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
||||||
|
<item name="textSize">primary</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="DrawerRow">
|
<style name="DrawerRow">
|
||||||
<item name="android:layout_height">48dp</item>
|
<item name="android:layout_height">48dp</item>
|
||||||
<item name="android:layout_width">match_parent</item>
|
<item name="android:layout_width">match_parent</item>
|
||||||
|
|||||||
Reference in New Issue
Block a user