mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 11:38:51 +01:00
Updated colours
This commit is contained in:
@@ -49,11 +49,11 @@ class MessagesAdapter(data: OrderedRealmCollection<Message>?) : RealmRecyclerVie
|
||||
when (viewType) {
|
||||
VIEWTYPE_ME -> {
|
||||
layoutRes = R.layout.message_list_item_out
|
||||
bubbleColor = themeManager.color
|
||||
bubbleColor = themeManager.bubbleColor
|
||||
}
|
||||
else -> {
|
||||
layoutRes = R.layout.message_list_item_in
|
||||
bubbleColor = themeManager.bubbleColor
|
||||
bubbleColor = themeManager.color
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,13 +7,17 @@ import android.util.AttributeSet
|
||||
import android.view.View
|
||||
import android.widget.FrameLayout
|
||||
import com.moez.QKSMS.R
|
||||
import com.moez.QKSMS.common.di.AppComponentManager
|
||||
import com.moez.QKSMS.common.util.GlideApp
|
||||
import com.moez.QKSMS.common.util.extensions.getColorCompat
|
||||
import com.moez.QKSMS.common.util.ThemeManager
|
||||
import com.moez.QKSMS.data.model.Contact
|
||||
import kotlinx.android.synthetic.main.avatar_view.view.*
|
||||
import javax.inject.Inject
|
||||
|
||||
class AvatarView(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : FrameLayout(context, attrs, defStyleAttr) {
|
||||
|
||||
@Inject lateinit var themeManager: ThemeManager
|
||||
|
||||
var contact: Contact? = null
|
||||
set(value) {
|
||||
field = value
|
||||
@@ -25,13 +29,14 @@ class AvatarView(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : Fr
|
||||
|
||||
init {
|
||||
View.inflate(context, R.layout.avatar_view, this)
|
||||
AppComponentManager.appComponent.inject(this)
|
||||
}
|
||||
|
||||
override fun onFinishInflate() {
|
||||
super.onFinishInflate()
|
||||
setBackgroundResource(R.drawable.circle)
|
||||
clipToOutline = true
|
||||
backgroundTintList = ColorStateList.valueOf(context.getColorCompat(R.color.bubbleLight))
|
||||
backgroundTintList = ColorStateList.valueOf(themeManager.color)
|
||||
|
||||
if (!isInEditMode) {
|
||||
updateView()
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:background="@color/list_separator"
|
||||
tools:parentTag="com.moez.QKSMS.presentation.view.AvatarView">
|
||||
|
||||
<TextView
|
||||
@@ -14,6 +13,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/textPrimaryLight"
|
||||
tools:text="M" />
|
||||
|
||||
<ImageView
|
||||
|
||||
@@ -52,7 +52,9 @@
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="8dp"
|
||||
tools:text="Hey! How's it going?" />
|
||||
android:textColor="@color/textPrimaryLight"
|
||||
tools:backgroundTint="@color/tools_theme"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status"
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="8dp"
|
||||
android:textColor="@color/textPrimaryLight"
|
||||
tools:backgroundTint="#0BAE9F"
|
||||
android:textColor="@color/textPrimary"
|
||||
tools:backgroundTint="@color/white"
|
||||
tools:text="Hey! How's it going?" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -12,9 +12,12 @@
|
||||
|
||||
<color name="bubbleLight">#F4F4F4</color>
|
||||
|
||||
<color name="backgroundLight">#f8f8f8</color>
|
||||
<color name="backgroundLight">#F2F2F2</color>
|
||||
<color name="statusLight">#F1F1F1</color>
|
||||
|
||||
<color name="list_separator">#F2F2F2</color>
|
||||
<color name="row_selected">#F5F5F5</color>
|
||||
|
||||
<!-- This colour should only ever be used for attrs with the tools tag -->
|
||||
<color name="tools_theme">#008389</color>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user