Rewrite ConversationInfo screen

Fixes #1413
This commit is contained in:
Moez Bhatti
2020-01-11 14:03:17 -05:00
parent f8a00d73da
commit ea2edbb8fe
12 changed files with 322 additions and 324 deletions
@@ -17,91 +17,11 @@
~ You should have received a copy of the GNU General Public License
~ along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
-->
<androidx.core.widget.NestedScrollView 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"
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutManager="android.support.v7.widget.LinearLayoutManager"
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/items"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recipients"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:paddingBottom="8dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:layout_height="72dp"
tools:listitem="@layout/conversation_recipient_list_item" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="8dp"
android:background="?android:attr/divider" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
app:icon="@drawable/ic_people_black_24dp"
app:title="@string/info_name" />
<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/info_notifications" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/archive"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:icon="@drawable/ic_archive_black_24dp"
app:title="@string/info_archive" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/block"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:icon="@drawable/ic_block_black_24dp"
app:title="@string/info_block" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/delete"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:icon="@drawable/ic_delete_white_24dp"
app:title="@string/info_delete" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="16dp"
android:background="?android:attr/divider" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/media"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="false"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:spanCount="3"
tools:listitem="@layout/conversation_media_list_item" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
android:clipChildren="false"
android:clipToPadding="false"
android:paddingTop="8dp"
android:paddingBottom="8dp" />
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2019 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/>.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="8dp"
android:background="?android:attr/divider" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/groupName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
app:icon="@drawable/ic_people_black_24dp"
app:title="@string/info_name" />
<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/info_notifications" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/archive"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:icon="@drawable/ic_archive_black_24dp"
app:title="@string/info_archive" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/block"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:icon="@drawable/ic_block_black_24dp"
app:title="@string/info_block" />
<com.moez.QKSMS.common.widget.PreferenceView
android:id="@+id/delete"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:icon="@drawable/ic_delete_white_24dp"
app:title="@string/info_delete" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="8dp"
android:background="?android:attr/divider" />
</LinearLayout>
@@ -22,11 +22,10 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.moez.QKSMS.common.widget.SquareImageView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
<com.moez.QKSMS.common.widget.SquareImageView
android:id="@+id/thumbnail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:background="?android:attr/divider"
android:scaleType="centerCrop"
tools:src="@tools:sample/backgrounds/scenic" />