#1403 - Fix height of QK Reply when displaying multiple messages or MMS

This commit is contained in:
moezbhatti
2019-04-13 19:31:54 -04:00
parent 34224a06e3
commit 20426e39fb
2 changed files with 32 additions and 42 deletions
@@ -79,8 +79,8 @@ class QkReplyActivity : QkThemedActivity(), QkReplyView {
toolbar.setBackgroundTint(resolveThemeColor(R.attr.colorPrimary)) toolbar.setBackgroundTint(resolveThemeColor(R.attr.colorPrimary))
background.setBackgroundTint(resolveThemeColor(R.attr.composeBackground)) background.setBackgroundTint(resolveThemeColor(R.attr.composeBackground))
messageBackground.setBackgroundTint(resolveThemeColor(R.attr.bubbleColor)) messageBackground.setBackgroundTint(resolveThemeColor(R.attr.bubbleColor))
composeBackground.setBackgroundTint(resolveThemeColor(R.attr.composeBackground)) composeBackgroundGradient.setBackgroundTint(resolveThemeColor(R.attr.composeBackground))
composeBackground2.setBackgroundTint(resolveThemeColor(R.attr.composeBackground)) composeBackgroundSolid.setBackgroundTint(resolveThemeColor(R.attr.composeBackground))
} }
} }
@@ -17,10 +17,10 @@
~ You should have received a copy of the GNU General Public License ~ You should have received a copy of the GNU General Public License
~ along with QKSMS. If not, see <http://www.gnu.org/licenses/>. ~ along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
--> -->
<androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/background" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/background"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
@@ -30,62 +30,53 @@
android:clipChildren="false" android:clipChildren="false"
android:clipToPadding="false" android:clipToPadding="false"
android:elevation="8dp" android:elevation="8dp"
android:maxHeight="320dp"
android:maxWidth="320dp" android:maxWidth="320dp"
android:maxHeight="320dp"
tools:context="com.moez.QKSMS.feature.qkreply.QkReplyActivity"> tools:context="com.moez.QKSMS.feature.qkreply.QkReplyActivity">
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/messages" android:id="@+id/messages"
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:clipToPadding="false" android:clipToPadding="false"
android:paddingBottom="8dp"
android:paddingTop="8dp" android:paddingTop="8dp"
android:paddingBottom="8dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constrainedHeight="true" app:layout_constrainedHeight="true"
app:layout_constraintBottom_toBottomOf="@id/composeBackground" app:layout_constraintBottom_toTopOf="@id/composeBackgroundSolid"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHeight_max="220dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/toolbar" app:layout_constraintTop_toBottomOf="@id/toolbar"
app:stackFromEnd="true" app:stackFromEnd="true"
tools:listitem="@layout/message_list_item_in" /> tools:listitem="@layout/message_list_item_in" />
<View <View
android:id="@+id/composeBackground" android:id="@+id/composeBackgroundGradient"
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="8dp" android:layout_height="8dp"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:background="@drawable/compose_bar_background" android:background="@drawable/compose_bar_background"
android:backgroundTint="?attr/composeBackground" android:backgroundTint="?attr/composeBackground"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintBottom_toTopOf="@id/composeBackgroundSolid" />
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/messageBackground" />
<View <View
android:id="@+id/composeBackground2" android:id="@+id/composeBackgroundSolid"
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="8dp" android:layout_height="0dp"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:background="@drawable/rectangle" android:background="@drawable/rounded_rectangle_bottom_4dp"
android:backgroundTint="?attr/composeBackground" android:backgroundTint="?attr/composeBackground"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="@id/message" />
app:layout_constraintTop_toTopOf="@id/messageBackground" />
<View <View
android:id="@+id/messageBackground" android:id="@+id/messageBackground"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:background="@drawable/rounded_rectangle_22dp" android:background="@drawable/rounded_rectangle_22dp"
android:backgroundTint="?attr/bubbleColor" android:backgroundTint="?attr/bubbleColor"
android:elevation="4dp" android:elevation="4dp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="@id/message"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="@id/send"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="@id/message"
app:layout_constraintTop_toTopOf="@id/message" /> app:layout_constraintTop_toTopOf="@id/message" />
<com.moez.QKSMS.common.widget.QkEditText <com.moez.QKSMS.common.widget.QkEditText
@@ -93,7 +84,8 @@
style="@style/TextPrimary" style="@style/TextPrimary"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_marginStart="8dp"
android:layout_marginBottom="8dp"
android:background="@null" android:background="@null"
android:elevation="4dp" android:elevation="4dp"
android:gravity="center_vertical" android:gravity="center_vertical"
@@ -101,14 +93,14 @@
android:inputType="textLongMessage|textCapSentences|textMultiLine" android:inputType="textLongMessage|textCapSentences|textMultiLine"
android:maxLines="6" android:maxLines="6"
android:minHeight="44dp" android:minHeight="44dp"
android:paddingBottom="12dp"
android:paddingEnd="16dp"
android:paddingStart="16dp" android:paddingStart="16dp"
android:paddingTop="12dp" android:paddingTop="12dp"
android:paddingEnd="16dp"
android:paddingBottom="12dp"
android:textColorHint="?android:attr/textColorTertiary" android:textColorHint="?android:attr/textColorTertiary"
app:layout_constraintBottom_toBottomOf="@id/messageBackground" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/sim" app:layout_constraintEnd_toStartOf="@id/sim"
app:layout_constraintStart_toStartOf="@id/messageBackground" /> app:layout_constraintStart_toStartOf="parent" />
<ImageView <ImageView
android:id="@+id/sim" android:id="@+id/sim"
@@ -120,7 +112,7 @@
android:padding="10dp" android:padding="10dp"
android:src="@drawable/ic_sim_card_black_24dp" android:src="@drawable/ic_sim_card_black_24dp"
android:tint="?android:attr/textColorSecondary" android:tint="?android:attr/textColorSecondary"
app:layout_constraintBottom_toBottomOf="@id/messageBackground" app:layout_constraintBottom_toBottomOf="@id/message"
app:layout_constraintEnd_toStartOf="@id/send" /> app:layout_constraintEnd_toStartOf="@id/send" />
<com.moez.QKSMS.common.widget.QkTextView <com.moez.QKSMS.common.widget.QkTextView
@@ -157,22 +149,22 @@
android:id="@+id/send" android:id="@+id/send"
android:layout_width="44dp" android:layout_width="44dp"
android:layout_height="44dp" android:layout_height="44dp"
android:layout_marginEnd="8dp"
android:contentDescription="@string/compose_send_cd" android:contentDescription="@string/compose_send_cd"
android:elevation="4dp" android:elevation="4dp"
android:padding="10dp" android:padding="10dp"
android:src="@drawable/ic_send_black_24dp" android:src="@drawable/ic_send_black_24dp"
android:tint="?android:textColorSecondary" android:tint="?android:textColorSecondary"
app:layout_constraintBottom_toBottomOf="@id/messageBackground" app:layout_constraintBottom_toBottomOf="@id/message"
app:layout_constraintEnd_toEndOf="@id/messageBackground" app:layout_constraintEnd_toEndOf="parent"
tools:backgroundTint="@color/tools_theme" /> tools:backgroundTint="@color/tools_theme" />
<androidx.appcompat.widget.Toolbar <androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar" android:id="@+id/toolbar"
style="@style/Toolbar" style="@style/Toolbar"
android:layout_width="match_parent"
android:background="@drawable/rounded_rectangle_top_4dp" android:background="@drawable/rounded_rectangle_top_4dp"
android:backgroundTint="?attr/colorPrimary" android:backgroundTint="?attr/colorPrimary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<com.moez.QKSMS.common.widget.QkTextView <com.moez.QKSMS.common.widget.QkTextView
@@ -183,11 +175,9 @@
</androidx.appcompat.widget.Toolbar> </androidx.appcompat.widget.Toolbar>
<View <View
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="8dp" android:layout_height="8dp"
android:background="@drawable/ab_shadow" android:background="@drawable/ab_shadow"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/toolbar" /> app:layout_constraintTop_toBottomOf="@id/toolbar" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>