mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-18 03:48:52 +01:00
#967 - Swipe conversation actions
This commit is contained in:
@@ -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="M5,13h14v-2L5,11v2zM3,17h14v-2L3,15v2zM7,7v2h14L21,7L7,7z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?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="@color/white" />
|
||||
<corners
|
||||
android:bottomLeftRadius="4dp"
|
||||
android:topLeftRadius="4dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -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="4dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?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="@color/white" />
|
||||
<corners
|
||||
android:bottomRightRadius="4dp"
|
||||
android:topRightRadius="4dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
+9
@@ -149,6 +149,15 @@
|
||||
app:title="@string/settings_delayed_title"
|
||||
tools:summary="No delay" />
|
||||
|
||||
<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/delivery"
|
||||
android:layout_width="match_parent"
|
||||
@@ -0,0 +1,308 @@
|
||||
<?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_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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/toolbar">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/right"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:foreground="?attr/selectableItemBackground">
|
||||
|
||||
<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/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>
|
||||
|
||||
<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: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/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" />
|
||||
|
||||
<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" />
|
||||
|
||||
<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" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</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>
|
||||
@@ -187,6 +187,18 @@
|
||||
<string name="settings_should_i_answer_title">Should I Answer?</string>
|
||||
<string name="settings_should_i_answer_summary">Automatically filter messages from unsolicited numbers by using the \"Should I Answer\" app</string>
|
||||
<string name="settings_delayed_title">Delayed sending</string>
|
||||
<string name="settings_swipe_actions">Swipe actions</string>
|
||||
<string name="settings_swipe_actions_summary">Configure swipe actions for conversations</string>
|
||||
<string name="settings_swipe_actions_right">Right swipe</string>
|
||||
<string name="settings_swipe_actions_left">Left swipe</string>
|
||||
<string name="settings_swipe_actions_change">CHANGE</string>
|
||||
<string-array name="settings_swipe_actions">
|
||||
<item>None</item>
|
||||
<item>Archive</item>
|
||||
<item>Delete</item>
|
||||
<item>Call</item>
|
||||
<item>Mark read</item>
|
||||
</string-array>
|
||||
<string name="settings_delivery_title">Delivery confirmations</string>
|
||||
<string name="settings_delivery_summary">Confirm that messages were sent successfully</string>
|
||||
<string name="settings_unicode_title">Strip accents</string>
|
||||
|
||||
Reference in New Issue
Block a user