diff --git a/qksms/src/main/java/com/moez/QKSMS/presentation/compose/ComposeActivity.kt b/qksms/src/main/java/com/moez/QKSMS/presentation/compose/ComposeActivity.kt index 53410a2a..42afc6f9 100644 --- a/qksms/src/main/java/com/moez/QKSMS/presentation/compose/ComposeActivity.kt +++ b/qksms/src/main/java/com/moez/QKSMS/presentation/compose/ComposeActivity.kt @@ -2,6 +2,7 @@ package com.moez.QKSMS.presentation.compose import android.app.AlertDialog import android.content.res.ColorStateList +import android.graphics.PorterDuff import android.os.Bundle import android.support.v7.widget.LinearLayoutManager import android.support.v7.widget.RecyclerView @@ -101,28 +102,30 @@ class ComposeActivity : QkActivity(), ComposeView { messageList.layoutManager = layoutManager messageList.adapter = messageAdapter + messageBackground.backgroundTintMode = PorterDuff.Mode.MULTIPLY + val states = arrayOf( intArrayOf(android.R.attr.state_enabled), intArrayOf(-android.R.attr.state_enabled)) disposables += Observables - .combineLatest(colors.theme, colors.textTertiary, { theme, textTertiary -> - ColorStateList(states, intArrayOf(theme, textTertiary)) + .combineLatest(colors.textPrimaryOnTheme, colors.textTertiaryOnTheme, { primary, tertiary -> + ColorStateList(states, intArrayOf(primary, tertiary)) }) - .subscribe { tintList -> send.imageTintList = tintList } + .subscribe { tintList -> sendIcon.imageTintList = tintList } + + disposables += colors.theme + .subscribe { color -> send.setBackgroundTint(color) } disposables += colors.textSecondary .subscribe { color -> attach.setTint(color) } - disposables += colors.background - .subscribe { color -> composeBar.setBackgroundColor(color) } + disposables += colors.bubble + .subscribe { color -> messageBackground.setBackgroundTint(color) } disposables += colors.composeBackground .subscribe { color -> window.decorView.setBackgroundColor(color) } - disposables += colors.field - .subscribe { color -> message.setBackgroundTint(color) } - window.callback = ComposeWindowCallback(window.callback, this) } @@ -170,6 +173,7 @@ class ComposeActivity : QkActivity(), ComposeView { if (message.text.toString() != state.draft) message.setText(state.draft) send.isEnabled = state.canSend + sendIcon.isEnabled = state.canSend } override fun onCreateOptionsMenu(menu: Menu?): Boolean { diff --git a/qksms/src/main/res/drawable-xxxhdpi/rounded_rectangle_shadow.9.png b/qksms/src/main/res/drawable-xxxhdpi/rounded_rectangle_shadow.9.png new file mode 100644 index 00000000..b79d1665 Binary files /dev/null and b/qksms/src/main/res/drawable-xxxhdpi/rounded_rectangle_shadow.9.png differ diff --git a/qksms/src/main/res/drawable/ic_insert_photo_black_24dp.xml b/qksms/src/main/res/drawable/ic_insert_photo_black_24dp.xml new file mode 100644 index 00000000..b2018595 --- /dev/null +++ b/qksms/src/main/res/drawable/ic_insert_photo_black_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/qksms/src/main/res/layout/compose_activity.xml b/qksms/src/main/res/layout/compose_activity.xml index 50b41860..3eee77fd 100644 --- a/qksms/src/main/res/layout/compose_activity.xml +++ b/qksms/src/main/res/layout/compose_activity.xml @@ -4,7 +4,8 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - android:orientation="vertical"> + android:orientation="vertical" + tools:background="@color/backgroundLight"> + android:layout_weight="1" + android:clipChildren="false" + android:clipToPadding="false"> + tools:listitem="@layout/message_list_item_in" /> + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - \ No newline at end of file diff --git a/qksms/src/main/res/values/colors.xml b/qksms/src/main/res/values/colors.xml index b11090e0..c80f7945 100644 --- a/qksms/src/main/res/values/colors.xml +++ b/qksms/src/main/res/values/colors.xml @@ -8,7 +8,7 @@ #FFFFFF #1d262b - #F2F2F2 + #ECEFF1 #192025 #0C000000