forked from upstream-mirrors/quik
Implement new compose bar style, fix QK Reply compose bar size
This commit is contained in:
@@ -130,8 +130,8 @@ class ComposeActivity : QkThemedActivity(), ComposeView {
|
|||||||
|
|
||||||
theme
|
theme
|
||||||
.doOnNext { loading.setTint(it.theme) }
|
.doOnNext { loading.setTint(it.theme) }
|
||||||
.doOnNext { send.setBackgroundTint(it.theme) }
|
.doOnNext { attach.setBackgroundTint(it.theme) }
|
||||||
.doOnNext { send.setTint(it.textPrimary) }
|
.doOnNext { attach.setTint(it.textPrimary) }
|
||||||
.doOnNext { messageAdapter.theme = it }
|
.doOnNext { messageAdapter.theme = it }
|
||||||
.autoDisposable(scope())
|
.autoDisposable(scope())
|
||||||
.subscribe { messageList.scrapViews() }
|
.subscribe { messageList.scrapViews() }
|
||||||
|
|||||||
@@ -18,28 +18,25 @@
|
|||||||
*/
|
*/
|
||||||
package com.moez.QKSMS.feature.qkreply
|
package com.moez.QKSMS.feature.qkreply
|
||||||
|
|
||||||
import androidx.lifecycle.ViewModelProvider
|
|
||||||
import androidx.lifecycle.ViewModelProviders
|
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.view.Window
|
import android.view.Window
|
||||||
import android.view.WindowManager
|
import android.view.WindowManager
|
||||||
|
import androidx.lifecycle.ViewModelProvider
|
||||||
|
import androidx.lifecycle.ViewModelProviders
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import com.jakewharton.rxbinding2.view.clicks
|
import com.jakewharton.rxbinding2.view.clicks
|
||||||
import com.jakewharton.rxbinding2.widget.textChanges
|
import com.jakewharton.rxbinding2.widget.textChanges
|
||||||
import com.moez.QKSMS.R
|
import com.moez.QKSMS.R
|
||||||
import com.moez.QKSMS.common.androidxcompat.scope
|
|
||||||
import com.moez.QKSMS.common.base.QkThemedActivity
|
import com.moez.QKSMS.common.base.QkThemedActivity
|
||||||
import com.moez.QKSMS.common.util.extensions.autoScrollToStart
|
import com.moez.QKSMS.common.util.extensions.autoScrollToStart
|
||||||
import com.moez.QKSMS.common.util.extensions.resolveThemeColor
|
import com.moez.QKSMS.common.util.extensions.resolveThemeColor
|
||||||
import com.moez.QKSMS.common.util.extensions.setBackgroundTint
|
import com.moez.QKSMS.common.util.extensions.setBackgroundTint
|
||||||
import com.moez.QKSMS.common.util.extensions.setTint
|
|
||||||
import com.moez.QKSMS.common.util.extensions.setVisible
|
import com.moez.QKSMS.common.util.extensions.setVisible
|
||||||
import com.moez.QKSMS.feature.compose.MessagesAdapter
|
import com.moez.QKSMS.feature.compose.MessagesAdapter
|
||||||
import com.uber.autodispose.kotlin.autoDisposable
|
|
||||||
import dagger.android.AndroidInjection
|
import dagger.android.AndroidInjection
|
||||||
import io.reactivex.subjects.PublishSubject
|
import io.reactivex.subjects.PublishSubject
|
||||||
import io.reactivex.subjects.Subject
|
import io.reactivex.subjects.Subject
|
||||||
@@ -69,13 +66,6 @@ class QkReplyActivity : QkThemedActivity(), QkReplyView {
|
|||||||
window.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
|
window.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
|
||||||
viewModel.bindView(this)
|
viewModel.bindView(this)
|
||||||
|
|
||||||
theme
|
|
||||||
.autoDisposable(scope())
|
|
||||||
.subscribe { theme ->
|
|
||||||
send.setBackgroundTint(theme.theme)
|
|
||||||
send.setTint(theme.textPrimary)
|
|
||||||
}
|
|
||||||
|
|
||||||
toolbar.clipToOutline = true
|
toolbar.clipToOutline = true
|
||||||
|
|
||||||
adapter.autoScrollToStart(messages)
|
adapter.autoScrollToStart(messages)
|
||||||
@@ -88,7 +78,7 @@ 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))
|
||||||
composeBackground.setBackgroundTint(resolveThemeColor(R.attr.composeBackground))
|
composeBackground.setBackgroundTint(resolveThemeColor(R.attr.composeBackground))
|
||||||
composeBackgroundGradient.setBackgroundTint(resolveThemeColor(R.attr.composeBackground))
|
composeBackground2.setBackgroundTint(resolveThemeColor(R.attr.composeBackground))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<?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/>.
|
||||||
|
-->
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
|
||||||
|
<solid android:color="@color/white" />
|
||||||
|
|
||||||
|
<corners android:radius="22dp" />
|
||||||
|
|
||||||
|
</shape>
|
||||||
@@ -20,7 +20,8 @@
|
|||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
tools:background="?attr/bubbleColor">
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/thumbnailBounds"
|
android:id="@+id/thumbnailBounds"
|
||||||
@@ -28,8 +29,8 @@
|
|||||||
android:layout_height="56dp"
|
android:layout_height="56dp"
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="8dp"
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="16dp"
|
||||||
android:background="@drawable/rounded_rectangle_2dp">
|
android:background="@drawable/rounded_rectangle_4dp">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/thumbnail"
|
android:id="@+id/thumbnail"
|
||||||
@@ -45,7 +46,8 @@
|
|||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_gravity="top|end"
|
android:layout_gravity="top|end"
|
||||||
android:layout_margin="2dp"
|
android:layout_marginEnd="2dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
android:background="@drawable/circle"
|
android:background="@drawable/circle"
|
||||||
android:backgroundTint="?attr/bubbleColor"
|
android:backgroundTint="?attr/bubbleColor"
|
||||||
android:src="@drawable/ic_cancel_black_24dp"
|
android:src="@drawable/ic_cancel_black_24dp"
|
||||||
|
|||||||
@@ -24,7 +24,8 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:animateLayoutChanges="true"
|
android:animateLayoutChanges="true"
|
||||||
android:background="?attr/composeBackground"
|
android:background="?attr/composeBackground"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical"
|
||||||
|
tools:context="com.moez.QKSMS.feature.compose.ComposeActivity">
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/messageList"
|
android:id="@+id/messageList"
|
||||||
@@ -149,7 +150,7 @@
|
|||||||
android:id="@+id/composeBar"
|
android:id="@+id/composeBar"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:constraint_referenced_ids="composeBackground, messageBackground, attachments, attach, attachSeparator, message, counter, send" />
|
app:constraint_referenced_ids="composeBackground, messageBackground, attachments, attach, message, counter, send" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/composeBackground"
|
android:id="@+id/composeBackground"
|
||||||
@@ -162,29 +163,79 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="@id/messageBackground" />
|
app:layout_constraintTop_toTopOf="@id/messageBackground" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/gallery"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_marginBottom="12dp"
|
||||||
|
android:background="@drawable/circle"
|
||||||
|
android:contentDescription="@string/compose_gallery_cd"
|
||||||
|
android:elevation="4dp"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:src="@drawable/ic_insert_photo_black_24dp"
|
||||||
|
android:tint="?android:attr/textColorSecondary"
|
||||||
|
android:visibility="visible"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/camera"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/attach"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/attach" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/camera"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:background="@drawable/circle"
|
||||||
|
android:contentDescription="@string/compose_camera_cd"
|
||||||
|
android:elevation="4dp"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:src="@drawable/ic_camera_alt_black_24dp"
|
||||||
|
android:tint="?android:attr/textColorSecondary"
|
||||||
|
android:visibility="visible"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/attach"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/attach"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/attach" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/attach"
|
||||||
|
android:layout_width="44dp"
|
||||||
|
android:layout_height="44dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:background="@drawable/circle"
|
||||||
|
android:contentDescription="@string/compose_attach_cd"
|
||||||
|
android:elevation="4dp"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:src="@drawable/ic_add_black_24dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
tools:backgroundTint="@color/tools_theme"
|
||||||
|
tools:tint="@color/textPrimaryDark" />
|
||||||
|
|
||||||
<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:background="@drawable/rounded_rectangle_shadow"
|
android:layout_marginBottom="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:background="@drawable/rounded_rectangle_22dp"
|
||||||
android:backgroundTint="?attr/bubbleColor"
|
android:backgroundTint="?attr/bubbleColor"
|
||||||
|
android:elevation="4dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@id/send"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toEndOf="@id/attach"
|
||||||
app:layout_constraintTop_toTopOf="@id/attachments" />
|
app:layout_constraintTop_toTopOf="@id/attachments" />
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/attachments"
|
android:id="@+id/attachments"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:clipChildren="false"
|
android:clipChildren="false"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
|
android:elevation="4dp"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingEnd="8dp"
|
android:paddingEnd="8dp"
|
||||||
android:paddingStart="8dp"
|
android:paddingStart="8dp"
|
||||||
android:paddingTop="8dp"
|
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
app:layout_constraintBottom_toTopOf="@id/message"
|
app:layout_constraintBottom_toTopOf="@id/message"
|
||||||
app:layout_constraintEnd_toEndOf="@id/messageBackground"
|
app:layout_constraintEnd_toEndOf="@id/messageBackground"
|
||||||
@@ -192,92 +243,46 @@
|
|||||||
app:layout_constraintTop_toTopOf="@id/messageBackground"
|
app:layout_constraintTop_toTopOf="@id/messageBackground"
|
||||||
tools:listitem="@layout/attachment_list_item" />
|
tools:listitem="@layout/attachment_list_item" />
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/attach"
|
|
||||||
android:layout_width="44dp"
|
|
||||||
android:layout_height="44dp"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:contentDescription="@string/compose_attach_cd"
|
|
||||||
android:padding="10dp"
|
|
||||||
android:src="@drawable/ic_add_circle_black_24dp"
|
|
||||||
android:tint="?android:attr/textColorSecondary"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/message"
|
|
||||||
app:layout_constraintStart_toStartOf="@id/messageBackground" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/camera"
|
|
||||||
android:layout_width="44dp"
|
|
||||||
android:layout_height="44dp"
|
|
||||||
android:background="?attr/selectableItemBackground"
|
|
||||||
android:contentDescription="@string/compose_camera_cd"
|
|
||||||
android:padding="10dp"
|
|
||||||
android:src="@drawable/ic_camera_alt_black_24dp"
|
|
||||||
android:tint="?android:attr/textColorSecondary"
|
|
||||||
android:visibility="gone"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/message"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/attach" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/gallery"
|
|
||||||
android:layout_width="44dp"
|
|
||||||
android:layout_height="44dp"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:background="?attr/selectableItemBackground"
|
|
||||||
android:contentDescription="@string/compose_gallery_cd"
|
|
||||||
android:padding="10dp"
|
|
||||||
android:src="@drawable/ic_insert_photo_black_24dp"
|
|
||||||
android:tint="?android:attr/textColorSecondary"
|
|
||||||
android:visibility="gone"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/message"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/camera" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:id="@+id/attachSeparator"
|
|
||||||
android:layout_width="1dp"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:layout_marginBottom="8dp"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:background="?android:attr/divider"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/message"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/gallery"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/attachments" />
|
|
||||||
|
|
||||||
<com.moez.QKSMS.common.widget.QkEditText
|
<com.moez.QKSMS.common.widget.QkEditText
|
||||||
android:id="@+id/message"
|
android:id="@+id/message"
|
||||||
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_marginBottom="8dp"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
|
android:elevation="4dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:hint="@string/compose_hint"
|
android:hint="@string/compose_hint"
|
||||||
android:inputType="textLongMessage|textCapSentences|textMultiLine"
|
android:inputType="textLongMessage|textCapSentences|textMultiLine"
|
||||||
android:maxLines="6"
|
android:maxLines="6"
|
||||||
android:minHeight="44dp"
|
android:minHeight="44dp"
|
||||||
android:padding="12dp"
|
android:paddingBottom="12dp"
|
||||||
|
android:paddingEnd="16dp"
|
||||||
|
android:paddingStart="16dp"
|
||||||
|
android:paddingTop="12dp"
|
||||||
android:textColorHint="?android:attr/textColorTertiary"
|
android:textColorHint="?android:attr/textColorTertiary"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/messageBackground"
|
app:layout_constraintBottom_toBottomOf="@id/messageBackground"
|
||||||
app:layout_constraintEnd_toStartOf="@id/sim"
|
app:layout_constraintEnd_toStartOf="@id/sim"
|
||||||
app:layout_constraintStart_toEndOf="@id/attachSeparator" />
|
app:layout_constraintStart_toStartOf="@id/messageBackground" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/sim"
|
android:id="@+id/sim"
|
||||||
android:layout_width="44dp"
|
android:layout_width="44dp"
|
||||||
android:layout_height="44dp"
|
android:layout_height="44dp"
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
|
android:contentDescription="@string/compose_sim_cd"
|
||||||
|
android:elevation="4dp"
|
||||||
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/message"
|
app:layout_constraintBottom_toBottomOf="@id/messageBackground"
|
||||||
app:layout_constraintEnd_toEndOf="@id/messageBackground" />
|
app:layout_constraintEnd_toStartOf="@id/send" />
|
||||||
|
|
||||||
<com.moez.QKSMS.common.widget.QkTextView
|
<com.moez.QKSMS.common.widget.QkTextView
|
||||||
android:id="@+id/simIndex"
|
android:id="@+id/simIndex"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
|
android:elevation="4dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textColor="?android:attr/textColorPrimaryInverse"
|
android:textColor="?android:attr/textColorPrimaryInverse"
|
||||||
android:textSize="14dp"
|
android:textSize="14dp"
|
||||||
@@ -294,6 +299,7 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="4dp"
|
android:layout_marginBottom="4dp"
|
||||||
|
android:elevation="4dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
app:layout_constraintBottom_toTopOf="@id/send"
|
app:layout_constraintBottom_toTopOf="@id/send"
|
||||||
app:layout_constraintEnd_toEndOf="@id/send"
|
app:layout_constraintEnd_toEndOf="@id/send"
|
||||||
@@ -306,17 +312,14 @@
|
|||||||
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_marginBottom="8dp"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:background="@drawable/circle"
|
|
||||||
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"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
android:tint="?android:textColorSecondary"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintBottom_toBottomOf="@id/messageBackground"
|
||||||
tools:backgroundTint="@color/tools_theme"
|
app:layout_constraintEnd_toEndOf="@id/messageBackground"
|
||||||
tools:tint="@color/textPrimaryDark" />
|
tools:backgroundTint="@color/tools_theme" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?><!--
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
~ Copyright (C) 2017 Moez Bhatti <moez.bhatti@gmail.com>
|
~ Copyright (C) 2017 Moez Bhatti <moez.bhatti@gmail.com>
|
||||||
~
|
~
|
||||||
~ This file is part of QKSMS.
|
~ This file is part of QKSMS.
|
||||||
@@ -41,14 +42,15 @@
|
|||||||
android:paddingBottom="8dp"
|
android:paddingBottom="8dp"
|
||||||
android:paddingTop="8dp"
|
android:paddingTop="8dp"
|
||||||
app:layout_constrainedHeight="true"
|
app:layout_constrainedHeight="true"
|
||||||
app:layout_constraintBottom_toTopOf="@id/message"
|
app:layout_constraintBottom_toBottomOf="@id/composeBackground"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHeight_max="220dp"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/toolbar"
|
app:layout_constraintTop_toBottomOf="@id/toolbar"
|
||||||
tools:listitem="@layout/message_list_item_in" />
|
tools:listitem="@layout/message_list_item_in" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/composeBackgroundGradient"
|
android:id="@+id/composeBackground"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="8dp"
|
android:layout_height="8dp"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
@@ -56,60 +58,51 @@
|
|||||||
android:backgroundTint="?attr/composeBackground"
|
android:backgroundTint="?attr/composeBackground"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="@id/message" />
|
app:layout_constraintTop_toTopOf="@id/messageBackground" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/composeBackground"
|
android:id="@+id/composeBackground2"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="8dp"
|
||||||
android:background="@drawable/rounded_rectangle_bottom_4dp"
|
android:layout_marginTop="8dp"
|
||||||
|
android:background="@drawable/rectangle"
|
||||||
android:backgroundTint="?attr/composeBackground"
|
android:backgroundTint="?attr/composeBackground"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/composeBackgroundGradient" />
|
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:background="@drawable/rounded_rectangle_shadow"
|
android:layout_marginBottom="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:background="@drawable/rounded_rectangle_22dp"
|
||||||
android:backgroundTint="?attr/bubbleColor"
|
android:backgroundTint="?attr/bubbleColor"
|
||||||
android:backgroundTintMode="multiply"
|
android:elevation="4dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@id/send"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="@id/messagePadding" />
|
app:layout_constraintTop_toTopOf="@id/message" />
|
||||||
|
|
||||||
<!-- The padding inside the messageBackground view is broken, probably because of 9patch weirdness -->
|
|
||||||
<View
|
|
||||||
android:id="@+id/messagePadding"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="8dp"
|
|
||||||
android:paddingEnd="8dp"
|
|
||||||
android:paddingStart="8dp"
|
|
||||||
android:paddingTop="8dp"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/message"
|
|
||||||
app:layout_constraintEnd_toEndOf="@id/messageBackground"
|
|
||||||
app:layout_constraintStart_toStartOf="@id/messageBackground"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/messageBackground" />
|
|
||||||
|
|
||||||
<com.moez.QKSMS.common.widget.QkEditText
|
<com.moez.QKSMS.common.widget.QkEditText
|
||||||
android:id="@+id/message"
|
android:id="@+id/message"
|
||||||
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_marginBottom="8dp"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
|
android:elevation="4dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:hint="@string/compose_hint"
|
android:hint="@string/compose_hint"
|
||||||
android:inputType="textLongMessage|textCapSentences|textMultiLine"
|
android:inputType="textLongMessage|textCapSentences|textMultiLine"
|
||||||
android:maxLines="6"
|
android:maxLines="6"
|
||||||
android:minHeight="44dp"
|
android:minHeight="44dp"
|
||||||
android:padding="12dp"
|
android:paddingBottom="12dp"
|
||||||
|
android:paddingEnd="16dp"
|
||||||
|
android:paddingStart="16dp"
|
||||||
|
android:paddingTop="12dp"
|
||||||
android:textColorHint="?android:attr/textColorTertiary"
|
android:textColorHint="?android:attr/textColorTertiary"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/messageBackground"
|
app:layout_constraintBottom_toBottomOf="@id/messageBackground"
|
||||||
app:layout_constraintEnd_toStartOf="@id/sim"
|
app:layout_constraintEnd_toStartOf="@id/sim"
|
||||||
@@ -119,18 +112,20 @@
|
|||||||
android:id="@+id/sim"
|
android:id="@+id/sim"
|
||||||
android:layout_width="44dp"
|
android:layout_width="44dp"
|
||||||
android:layout_height="44dp"
|
android:layout_height="44dp"
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
|
android:contentDescription="@string/compose_sim_cd"
|
||||||
|
android:elevation="4dp"
|
||||||
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/message"
|
app:layout_constraintBottom_toBottomOf="@id/messageBackground"
|
||||||
app:layout_constraintEnd_toEndOf="@id/messageBackground" />
|
app:layout_constraintEnd_toStartOf="@id/send" />
|
||||||
|
|
||||||
<com.moez.QKSMS.common.widget.QkTextView
|
<com.moez.QKSMS.common.widget.QkTextView
|
||||||
android:id="@+id/simIndex"
|
android:id="@+id/simIndex"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
|
android:elevation="4dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textColor="?android:attr/textColorPrimaryInverse"
|
android:textColor="?android:attr/textColorPrimaryInverse"
|
||||||
android:textSize="14dp"
|
android:textSize="14dp"
|
||||||
@@ -147,6 +142,7 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="4dp"
|
android:layout_marginBottom="4dp"
|
||||||
|
android:elevation="4dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
app:layout_constraintBottom_toTopOf="@id/send"
|
app:layout_constraintBottom_toTopOf="@id/send"
|
||||||
app:layout_constraintEnd_toEndOf="@id/send"
|
app:layout_constraintEnd_toEndOf="@id/send"
|
||||||
@@ -159,17 +155,14 @@
|
|||||||
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_marginBottom="8dp"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
android:background="@drawable/circle"
|
|
||||||
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"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
android:tint="?android:textColorSecondary"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintBottom_toBottomOf="@id/messageBackground"
|
||||||
tools:backgroundTint="@color/tools_theme"
|
app:layout_constraintEnd_toEndOf="@id/messageBackground"
|
||||||
tools:tint="@color/textPrimaryDark" />
|
tools:backgroundTint="@color/tools_theme" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
|
|||||||
Reference in New Issue
Block a user