visual improvements
new icon
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 8.9 KiB |
@@ -11,6 +11,7 @@ import kotlinx.parcelize.Parcelize
|
|||||||
data class VkConversation(
|
data class VkConversation(
|
||||||
@PrimaryKey(autoGenerate = false)
|
@PrimaryKey(autoGenerate = false)
|
||||||
val id: Int,
|
val id: Int,
|
||||||
|
val ownerId: Int?,
|
||||||
val title: String?,
|
val title: String?,
|
||||||
val photo200: String?,
|
val photo200: String?,
|
||||||
val type: String,
|
val type: String,
|
||||||
@@ -22,7 +23,8 @@ data class VkConversation(
|
|||||||
val isMarkedUnread: Boolean,
|
val isMarkedUnread: Boolean,
|
||||||
val lastMessageId: Int,
|
val lastMessageId: Int,
|
||||||
val unreadCount: Int?,
|
val unreadCount: Int?,
|
||||||
val membersCount: Int?
|
val membersCount: Int?,
|
||||||
|
val isPinned: Boolean
|
||||||
) : Parcelable {
|
) : Parcelable {
|
||||||
@Ignore
|
@Ignore
|
||||||
var lastMessage: VkMessage? = null
|
var lastMessage: VkMessage? = null
|
||||||
|
|||||||
@@ -51,7 +51,9 @@ data class BaseVkConversation(
|
|||||||
isMarkedUnread = isMarkedUnread,
|
isMarkedUnread = isMarkedUnread,
|
||||||
lastMessageId = lastMessageId,
|
lastMessageId = lastMessageId,
|
||||||
unreadCount = unreadCount,
|
unreadCount = unreadCount,
|
||||||
membersCount = chatSettings?.membersCount
|
membersCount = chatSettings?.membersCount,
|
||||||
|
ownerId = chatSettings?.ownerId,
|
||||||
|
isPinned = sortId.majorId > 0
|
||||||
).apply { this.lastMessage = lastMessage }
|
).apply { this.lastMessage = lastMessage }
|
||||||
|
|
||||||
@Parcelize
|
@Parcelize
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import com.meloda.fast.database.dao.UsersDao
|
|||||||
VkUser::class,
|
VkUser::class,
|
||||||
VkGroup::class
|
VkGroup::class
|
||||||
],
|
],
|
||||||
version = 13,
|
version = 15,
|
||||||
exportSchema = false
|
exportSchema = false
|
||||||
)
|
)
|
||||||
abstract class AppDatabase : RoomDatabase() {
|
abstract class AppDatabase : RoomDatabase() {
|
||||||
|
|||||||
@@ -1,15 +1,19 @@
|
|||||||
package com.meloda.fast.screens.conversations
|
package com.meloda.fast.screens.conversations
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import android.content.res.ColorStateList
|
||||||
|
import android.graphics.drawable.ColorDrawable
|
||||||
import android.text.SpannableString
|
import android.text.SpannableString
|
||||||
import android.text.style.ForegroundColorSpan
|
import android.text.style.ForegroundColorSpan
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
|
import androidx.core.view.setPadding
|
||||||
import androidx.recyclerview.widget.DiffUtil
|
import androidx.recyclerview.widget.DiffUtil
|
||||||
import coil.load
|
import coil.load
|
||||||
import com.meloda.fast.R
|
import com.meloda.fast.R
|
||||||
import com.meloda.fast.api.UserConfig
|
import com.meloda.fast.api.UserConfig
|
||||||
|
import com.meloda.fast.api.VKConstants
|
||||||
import com.meloda.fast.api.VkUtils
|
import com.meloda.fast.api.VkUtils
|
||||||
import com.meloda.fast.api.model.VkConversation
|
import com.meloda.fast.api.model.VkConversation
|
||||||
import com.meloda.fast.api.model.VkGroup
|
import com.meloda.fast.api.model.VkGroup
|
||||||
@@ -76,6 +80,7 @@ class ConversationsAdapter constructor(
|
|||||||
} else null
|
} else null
|
||||||
|
|
||||||
val avatar = when {
|
val avatar = when {
|
||||||
|
conversation.ownerId == VKConstants.FAST_GROUP_ID -> null
|
||||||
conversation.isUser() && chatUser != null && !chatUser.photo200.isNullOrBlank() -> chatUser.photo200
|
conversation.isUser() && chatUser != null && !chatUser.photo200.isNullOrBlank() -> chatUser.photo200
|
||||||
conversation.isGroup() && chatGroup != null && !chatGroup.photo200.isNullOrBlank() -> chatGroup.photo200
|
conversation.isGroup() && chatGroup != null && !chatGroup.photo200.isNullOrBlank() -> chatGroup.photo200
|
||||||
conversation.isChat() && !conversation.photo200.isNullOrBlank() -> conversation.photo200
|
conversation.isChat() && !conversation.photo200.isNullOrBlank() -> conversation.photo200
|
||||||
@@ -86,13 +91,36 @@ class ConversationsAdapter constructor(
|
|||||||
binding.avatarPlaceholder.isVisible = avatar == null
|
binding.avatarPlaceholder.isVisible = avatar == null
|
||||||
|
|
||||||
if (avatar == null) {
|
if (avatar == null) {
|
||||||
|
if (conversation.ownerId == VKConstants.FAST_GROUP_ID) {
|
||||||
|
binding.placeholderBack.setImageDrawable(
|
||||||
|
ColorDrawable(
|
||||||
|
ContextCompat.getColor(context, R.color.a1_400)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
binding.placeholder.imageTintList =
|
||||||
|
ColorStateList.valueOf(ContextCompat.getColor(context, R.color.a1_0))
|
||||||
|
binding.placeholder.setImageResource(R.drawable.ic_fast_logo)
|
||||||
|
binding.placeholder.setPadding(18)
|
||||||
|
} else {
|
||||||
|
binding.placeholderBack.setImageDrawable(
|
||||||
|
ColorDrawable(
|
||||||
|
ContextCompat.getColor(context, R.color.n1_50)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
binding.placeholder.imageTintList =
|
||||||
|
ColorStateList.valueOf(ContextCompat.getColor(context, R.color.n2_500))
|
||||||
|
binding.placeholder.setImageResource(R.drawable.ic_account_circle_cut)
|
||||||
|
binding.placeholder.setPadding(0)
|
||||||
binding.avatar.setImageDrawable(null)
|
binding.avatar.setImageDrawable(null)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
binding.avatar.load(avatar) { crossfade(200) }
|
binding.avatar.load(avatar) { crossfade(200) }
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.online.isVisible = chatUser?.online == true
|
binding.online.isVisible = chatUser?.online == true
|
||||||
|
|
||||||
|
binding.pin.isVisible = conversation.isPinned
|
||||||
|
|
||||||
val actionMessage = VkUtils.getActionConversationText(
|
val actionMessage = VkUtils.getActionConversationText(
|
||||||
message = message,
|
message = message,
|
||||||
youPrefix = youPrefix,
|
youPrefix = youPrefix,
|
||||||
@@ -157,10 +185,8 @@ class ConversationsAdapter constructor(
|
|||||||
prefix.length + coloredMessage.length,
|
prefix.length + coloredMessage.length,
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
|
|
||||||
binding.message.text = spanMessage
|
binding.message.text = spanMessage
|
||||||
// } else {
|
|
||||||
// binding.message.text = messageText
|
|
||||||
// }
|
|
||||||
|
|
||||||
binding.title.text =
|
binding.title.text =
|
||||||
getItem(position).title ?: chatUser?.toString() ?: chatGroup?.name ?: "..."
|
getItem(position).title ?: chatUser?.toString() ?: chatGroup?.name ?: "..."
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import androidx.core.view.isVisible
|
|||||||
import androidx.fragment.app.viewModels
|
import androidx.fragment.app.viewModels
|
||||||
import androidx.navigation.fragment.findNavController
|
import androidx.navigation.fragment.findNavController
|
||||||
import coil.load
|
import coil.load
|
||||||
|
import com.google.android.material.appbar.AppBarLayout
|
||||||
import com.google.android.material.snackbar.Snackbar
|
import com.google.android.material.snackbar.Snackbar
|
||||||
import com.meloda.fast.R
|
import com.meloda.fast.R
|
||||||
import com.meloda.fast.api.UserConfig
|
import com.meloda.fast.api.UserConfig
|
||||||
@@ -19,6 +20,7 @@ import com.meloda.fast.base.viewmodel.VKEvent
|
|||||||
import com.meloda.fast.databinding.FragmentConversationsBinding
|
import com.meloda.fast.databinding.FragmentConversationsBinding
|
||||||
import com.meloda.fast.util.AndroidUtils
|
import com.meloda.fast.util.AndroidUtils
|
||||||
import dagger.hilt.android.AndroidEntryPoint
|
import dagger.hilt.android.AndroidEntryPoint
|
||||||
|
import kotlin.math.abs
|
||||||
|
|
||||||
@AndroidEntryPoint
|
@AndroidEntryPoint
|
||||||
class ConversationsFragment :
|
class ConversationsFragment :
|
||||||
@@ -57,6 +59,19 @@ class ConversationsFragment :
|
|||||||
UserConfig.vkUser.observe(viewLifecycleOwner) {
|
UserConfig.vkUser.observe(viewLifecycleOwner) {
|
||||||
it?.let { user -> binding.avatar.load(user.photo200) { crossfade(100) } }
|
it?.let { user -> binding.avatar.load(user.photo200) { crossfade(100) } }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
binding.appBar.addOnOffsetChangedListener(AppBarLayout.OnOffsetChangedListener { appBarLayout, verticalOffset ->
|
||||||
|
if (verticalOffset <= -100) {
|
||||||
|
binding.avatarContainer.alpha = 0f
|
||||||
|
return@OnOffsetChangedListener
|
||||||
|
}
|
||||||
|
|
||||||
|
val alpha = 1 - abs(verticalOffset * 0.01).toFloat()
|
||||||
|
|
||||||
|
// println("offset: $verticalOffset; alpha: $alpha")
|
||||||
|
|
||||||
|
binding.avatarContainer.alpha = alpha
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onEvent(event: VKEvent) {
|
override fun onEvent(event: VKEvent) {
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:pathData="M13.3062,5.676L10.7577,9.5805C10.5295,9.9302 10.7804,10.3936 11.198,10.3936H13.3062V5.676Z"
|
||||||
|
android:strokeAlpha="0.7"
|
||||||
|
android:fillColor="#ffffff"
|
||||||
|
android:fillAlpha="0.7"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M11.3743,2.4787C11.9457,1.6031 13.3062,2.0078 13.3062,3.0534V13.6065H6.0532C5.218,13.6065 4.7162,12.6797 5.1727,11.9803L11.3743,2.4787ZM10.7577,9.5805L13.3062,5.6759V10.3936H11.198C10.7804,10.3936 10.5295,9.9302 10.7577,9.5805Z"
|
||||||
|
android:strokeAlpha="0.5"
|
||||||
|
android:fillColor="#ffffff"
|
||||||
|
android:fillType="evenOdd"
|
||||||
|
android:fillAlpha="0.5"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M11.1981,10.3936C10.9034,10.3936 10.6918,10.1629 10.6729,9.9042V10.4785H10.6784V20.9467C10.6784,21.9923 12.0389,22.397 12.6104,21.5214L18.8119,12.0197C19.2684,11.3203 18.7666,10.3936 17.9314,10.3936H11.1981Z"
|
||||||
|
android:fillColor="#ffffff"/>
|
||||||
|
</vector>
|
||||||
@@ -3,15 +3,23 @@
|
|||||||
android:height="108dp"
|
android:height="108dp"
|
||||||
android:viewportWidth="108"
|
android:viewportWidth="108"
|
||||||
android:viewportHeight="108">
|
android:viewportHeight="108">
|
||||||
<group android:scaleX="0.09830191"
|
<group android:scaleX="0.0684812"
|
||||||
android:scaleY="0.09830191"
|
android:scaleY="0.0684812"
|
||||||
android:translateX="20.34005"
|
android:translateX="31.503925"
|
||||||
android:translateY="20.34">
|
android:translateY="27.977142">
|
||||||
<path
|
<path
|
||||||
android:pathData="M342.414,342.415m-342.38,0a342.38,342.38 0,1 1,684.76 0a342.38,342.38 0,1 1,-684.76 0"
|
android:pathData="M371.796,170.753L288.208,298.822C280.722,310.291 288.951,325.49 302.648,325.49H371.796V170.753Z"
|
||||||
android:fillColor="#4284f4"/>
|
android:strokeAlpha="0.7"
|
||||||
|
android:fillColor="#ffffff"
|
||||||
|
android:fillAlpha="0.7"/>
|
||||||
<path
|
<path
|
||||||
android:pathData="M342.418,654.833a314.72,314.72 0,0 1,-62.962 -6.347,310.7 310.7,0 0,1 -111.711,-47.008 313.323,313.323 0,0 1,-113.189 -137.453,310.833 310.833,0 0,1 -18.2,-58.643 315.461,315.461 0,0 1,0 -125.925,310.708 310.708,0 0,1 47.008,-111.711 313.326,313.326 0,0 1,137.453 -113.189,310.835 310.835,0 0,1 58.643,-18.2 315.458,315.458 0,0 1,125.925 0,310.7 310.7,0 0,1 111.711,47.008 313.328,313.328 0,0 1,113.189 137.453,310.862 310.862,0 0,1 18.2,58.643 315.461,315.461 0,0 1,0 125.925,310.7 310.7,0 0,1 -47.008,111.711 313.326,313.326 0,0 1,-137.453 113.189,310.821 310.821,0 0,1 -58.643,18.2A314.716,314.716 0,0 1,342.418 654.833ZM253.557,300.385 L250.657,304.168 319.233,372.743L241.372,591.305l234.582,-302.1L348.992,289.205L345.004,300.405l-51.659,-51.658 -2.916,3.767 52.82,52.82L339.004,317.256l-55.6,-55.6 -2.916,3.784 56.762,56.747 -4.248,11.925 -59.545,-59.545 -2.9,3.784 60.69,60.69 -4.248,11.925L263.504,287.475l-2.9,3.784 64.632,64.633 -4.248,11.926ZM243.626,313.295 L240.709,317.079 297.964,374.333h6.684l-61.022,-61.038ZM233.679,326.222 L230.762,329.989 275.106,374.333h6.7ZM223.731,339.132h0l-2.9,3.767 31.418,31.433h6.7l-35.217,-35.2ZM213.784,352.042 L210.884,355.826 229.391,374.333h6.7l-22.306,-22.29ZM203.852,364.953 L200.936,368.737 206.547,374.337h6.684ZM303.226,235.832 L300.374,239.599 349.112,289.176 350.812,284.226ZM313.226,222.921h0l-2.9,3.768 45.573,45.573 1.733,-4.95 -44.407,-44.392ZM323.174,209.995 L320.257,213.778 361.843,255.363 363.577,250.413 323.177,209.995ZM333.121,197.084h0l-2.916,3.783 37.58,37.581 1.734,-4.95 -36.4,-36.414ZM343.068,184.173h0l-2.916,3.784 33.577,33.577 1.733,-4.95 -32.395,-32.411ZM353,171.262 L350.1,175.046 379.673,204.619 381.407,199.669 353.001,171.262ZM362.947,158.352h0l-2.9,3.767 25.569,25.585 1.734,-4.95 -24.4,-24.4ZM372.894,145.441 L369.978,149.208 391.559,170.789 393.308,165.839ZM382.842,132.514 L379.925,136.298 397.502,153.875 399.252,148.925 382.842,132.514ZM392.773,119.604 L389.873,123.388 403.446,136.961 405.196,132.011 392.774,119.605ZM402.72,106.694 L399.82,110.478 409.388,120.047 411.138,115.112ZM412.668,93.783 L409.768,97.567 415.333,103.132 417.083,98.197 412.67,93.783Z"
|
android:pathData="M308.429,65.884C327.174,37.164 371.796,50.438 371.796,84.733V430.872H133.9C106.507,430.872 90.048,400.474 105.02,377.536L308.429,65.884ZM288.208,298.822L371.796,170.753V325.49H302.648C288.951,325.49 280.722,310.291 288.208,298.822Z"
|
||||||
android:fillColor="#fff"/>
|
android:strokeAlpha="0.5"
|
||||||
|
android:fillColor="#ffffff"
|
||||||
|
android:fillType="evenOdd"
|
||||||
|
android:fillAlpha="0.5"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M302.648,325.49C292.984,325.49 286.042,317.924 285.421,309.439V328.275H285.604V671.629C285.604,705.925 330.226,719.198 348.97,690.478L552.38,378.827C567.352,355.888 550.893,325.49 523.5,325.49H302.648Z"
|
||||||
|
android:fillColor="#ffffff"/>
|
||||||
</group>
|
</group>
|
||||||
</vector>
|
</vector>
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:fillType="evenOdd"
|
||||||
|
android:pathData="M19,12.87c0,-0.47 -0.34,-0.85 -0.8,-0.98C16.93,11.54 16,10.38 16,9V4l1,0c0.55,0 1,-0.45 1,-1c0,-0.55 -0.45,-1 -1,-1H7C6.45,2 6,2.45 6,3c0,0.55 0.45,1 1,1l1,0v5c0,1.38 -0.93,2.54 -2.2,2.89C5.34,12.02 5,12.4 5,12.87V13c0,0.55 0.45,1 1,1h4.98L11,21c0,0.55 0.45,1 1,1c0.55,0 1,-0.45 1,-1l-0.02,-7H18c0.55,0 1,-0.45 1,-1V12.87z" />
|
||||||
|
</vector>
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
|
android:id="@+id/appBar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:elevation="0dp">
|
app:elevation="0dp">
|
||||||
@@ -25,9 +26,9 @@
|
|||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?actionBarSize"
|
android:layout_height="?actionBarSize"
|
||||||
android:background="@color/n1_50"
|
android:background="?android:windowBackground"
|
||||||
android:elevation="0dp"
|
android:elevation="0dp"
|
||||||
app:layout_collapseMode="pin"
|
app:layout_collapseMode="parallax"
|
||||||
app:menu="@menu/fragment_conversations" />
|
app:menu="@menu/fragment_conversations" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
@@ -37,11 +38,13 @@
|
|||||||
android:elevation="0dp" />
|
android:elevation="0dp" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:id="@+id/avatarContainer"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom|end"
|
android:layout_gravity="bottom|end"
|
||||||
android:layout_margin="30dp"
|
android:layout_margin="30dp"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal"
|
||||||
|
app:layout_collapseParallaxMultiplier="0.5">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
@@ -49,7 +52,7 @@
|
|||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:background="?selectableItemBackgroundBorderless"
|
android:background="?selectableItemBackgroundBorderless"
|
||||||
android:src="@drawable/ic_search"
|
android:src="@drawable/ic_search"
|
||||||
android:tint="@color/a1_500" />
|
android:tint="?colorSecondary3Variant" />
|
||||||
|
|
||||||
<com.meloda.fast.widget.CircleImageView
|
<com.meloda.fast.widget.CircleImageView
|
||||||
android:id="@+id/avatar"
|
android:id="@+id/avatar"
|
||||||
@@ -96,13 +99,11 @@
|
|||||||
android:layout_gravity="end|bottom"
|
android:layout_gravity="end|bottom"
|
||||||
android:layout_margin="16dp"
|
android:layout_margin="16dp"
|
||||||
android:src="@drawable/ic_baseline_create_24"
|
android:src="@drawable/ic_baseline_create_24"
|
||||||
app:backgroundTint="@color/a2_200"
|
|
||||||
app:elevation="3dp"
|
app:elevation="3dp"
|
||||||
app:fabSize="normal"
|
app:fabSize="normal"
|
||||||
app:layout_behavior="com.google.android.material.behavior.HideBottomViewOnScrollBehavior"
|
app:layout_behavior="com.google.android.material.behavior.HideBottomViewOnScrollBehavior"
|
||||||
app:pressedTranslationZ="1dp"
|
app:pressedTranslationZ="1dp"
|
||||||
app:shapeAppearanceOverlay="@style/RoundedView.56"
|
app:shapeAppearanceOverlay="@style/RoundedView.56"
|
||||||
app:tint="@color/a2_700"
|
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|||||||
@@ -195,7 +195,7 @@
|
|||||||
android:layout_gravity="bottom"
|
android:layout_gravity="bottom"
|
||||||
android:layout_margin="12dp"
|
android:layout_margin="12dp"
|
||||||
android:background="@drawable/ic_message_panel_background"
|
android:background="@drawable/ic_message_panel_background"
|
||||||
android:backgroundTint="@color/a1_0"
|
android:backgroundTint="?colorSurface"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:elevation="3dp"
|
android:elevation="3dp"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
@@ -220,7 +220,7 @@
|
|||||||
android:layout_marginEnd="18dp"
|
android:layout_marginEnd="18dp"
|
||||||
android:background="?selectableItemBackgroundBorderless"
|
android:background="?selectableItemBackgroundBorderless"
|
||||||
android:src="@drawable/ic_baseline_attach_file_24"
|
android:src="@drawable/ic_baseline_attach_file_24"
|
||||||
android:tint="@color/a1_500" />
|
android:tint="?colorOnSurface" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<androidx.appcompat.widget.AppCompatImageButton
|
||||||
android:id="@+id/action"
|
android:id="@+id/action"
|
||||||
@@ -230,7 +230,7 @@
|
|||||||
android:layout_marginEnd="20dp"
|
android:layout_marginEnd="20dp"
|
||||||
android:background="?selectableItemBackgroundBorderless"
|
android:background="?selectableItemBackgroundBorderless"
|
||||||
android:src="@drawable/ic_round_mic_24"
|
android:src="@drawable/ic_round_mic_24"
|
||||||
android:tint="@color/a1_500" />
|
android:tint="?colorOnSurface" />
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|||||||
@@ -38,11 +38,13 @@
|
|||||||
android:visibility="gone">
|
android:visibility="gone">
|
||||||
|
|
||||||
<com.meloda.fast.widget.CircleImageView
|
<com.meloda.fast.widget.CircleImageView
|
||||||
|
android:id="@+id/placeholderBack"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:src="@color/n1_50" />
|
android:src="@color/n1_50" />
|
||||||
|
|
||||||
<com.meloda.fast.widget.CircleImageView
|
<com.meloda.fast.widget.CircleImageView
|
||||||
|
android:id="@+id/placeholder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:src="@drawable/ic_account_circle_cut"
|
android:src="@drawable/ic_account_circle_cut"
|
||||||
@@ -69,7 +71,34 @@
|
|||||||
android:layout_height="14dp"
|
android:layout_height="14dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:src="@drawable/ic_online_pc"
|
android:src="@drawable/ic_online_pc"
|
||||||
app:tint="@color/a3_200" />
|
app:tint="?colorSecondary2" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/pin"
|
||||||
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:layout_gravity="start|top"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
|
<com.meloda.fast.widget.CircleImageView
|
||||||
|
android:layout_width="18dp"
|
||||||
|
android:layout_height="18dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:background="@drawable/ic_back"
|
||||||
|
android:backgroundTint="@color/n2_500"
|
||||||
|
android:elevation="0.5dp" />
|
||||||
|
|
||||||
|
<com.meloda.fast.widget.CircleImageView
|
||||||
|
android:id="@+id/pinIcon"
|
||||||
|
android:layout_width="14dp"
|
||||||
|
android:layout_height="14dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:elevation="1dp"
|
||||||
|
android:src="@drawable/ic_round_push_pin_24"
|
||||||
|
app:tint="@color/n2_0" />
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
@@ -137,7 +166,7 @@
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:fontFamily="@font/google_sans_regular"
|
android:fontFamily="@font/google_sans_regular"
|
||||||
android:maxLines="2"
|
android:maxLines="2"
|
||||||
android:textColor="@color/n1_900"
|
android:textColor="?textColorPrimary"
|
||||||
android:textSize="22sp"
|
android:textSize="22sp"
|
||||||
tools:text="Title" />
|
tools:text="Title" />
|
||||||
|
|
||||||
@@ -150,10 +179,10 @@
|
|||||||
android:layout_marginEnd="4dp"
|
android:layout_marginEnd="4dp"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:background="@drawable/ic_back"
|
android:background="@drawable/ic_back"
|
||||||
android:backgroundTint="@color/a1_600"
|
android:backgroundTint="?colorSecondary3"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:minWidth="18dp"
|
android:minWidth="18dp"
|
||||||
android:textColor="@color/a1_0"
|
android:textColor="?colorOnSecondary3"
|
||||||
android:textSize="10sp"
|
android:textSize="10sp"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:text="12"
|
tools:text="12"
|
||||||
@@ -171,7 +200,7 @@
|
|||||||
android:alpha="0.5"
|
android:alpha="0.5"
|
||||||
android:fontFamily="@font/roboto_regular"
|
android:fontFamily="@font/roboto_regular"
|
||||||
android:gravity="end|center_vertical"
|
android:gravity="end|center_vertical"
|
||||||
android:textColor="@color/n2_500"
|
android:textColor="?textColorSecondaryVariant"
|
||||||
tools:text="20:00" />
|
tools:text="20:00" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@@ -198,7 +227,7 @@
|
|||||||
android:layout_marginEnd="4dp"
|
android:layout_marginEnd="4dp"
|
||||||
android:src="@drawable/ic_baseline_attach_file_24"
|
android:src="@drawable/ic_baseline_attach_file_24"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:tint="@color/n2_500"
|
app:tint="?textColorSecondaryVariant"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
<com.google.android.material.textview.MaterialTextView
|
||||||
@@ -208,7 +237,7 @@
|
|||||||
android:alpha="0.7"
|
android:alpha="0.7"
|
||||||
android:fontFamily="@font/roboto_regular"
|
android:fontFamily="@font/roboto_regular"
|
||||||
android:maxLines="2"
|
android:maxLines="2"
|
||||||
android:textColor="@color/n1_900"
|
android:textColor="?textColorPrimary"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
tools:text="Message" />
|
tools:text="Message" />
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 13 KiB |
@@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
|
||||||
|
<color name="a1_0">@android:color/system_accent1_0</color>
|
||||||
|
<color name="a1_400">@android:color/system_accent1_400</color>
|
||||||
|
<color name="a1_500">@android:color/system_accent1_500</color>
|
||||||
|
<color name="a1_600">@android:color/system_accent1_600</color>
|
||||||
|
|
||||||
|
<color name="a2_200">@android:color/system_accent2_200</color>
|
||||||
|
<color name="a2_700">@android:color/system_accent2_700</color>
|
||||||
|
|
||||||
|
<color name="a3_200">@android:color/system_accent3_200</color>
|
||||||
|
<color name="a3_700">@android:color/system_accent3_700</color>
|
||||||
|
|
||||||
|
<color name="n1_10">@android:color/system_neutral1_10</color>
|
||||||
|
<color name="n1_50">@android:color/system_neutral1_50</color>
|
||||||
|
<color name="n1_100">@android:color/system_neutral1_100</color>
|
||||||
|
<color name="n1_800">@android:color/system_neutral1_800</color>
|
||||||
|
<color name="n1_900">@android:color/system_neutral1_900</color>
|
||||||
|
|
||||||
|
<color name="n2_0">@android:color/system_neutral2_0</color>
|
||||||
|
<color name="n2_10">@android:color/system_neutral2_10</color>
|
||||||
|
<color name="n2_100">@android:color/system_neutral2_100</color>
|
||||||
|
<color name="n2_500">@android:color/system_neutral2_500</color>
|
||||||
|
|
||||||
|
</resources>
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
|
||||||
|
<color name="colorBackground">@color/n1_900</color>
|
||||||
|
|
||||||
|
<color name="colorPrimary">@color/colorBackground</color>
|
||||||
|
<color name="colorPrimaryVariant">@color/colorBackground</color>
|
||||||
|
<color name="colorOnPrimary">@color/n1_900</color>
|
||||||
|
|
||||||
|
<color name="colorSecondary">@color/a2_100</color>
|
||||||
|
<color name="colorSecondaryVariant">@color/a2_700</color>
|
||||||
|
<color name="colorOnSecondary">@color/a2_700</color>
|
||||||
|
|
||||||
|
<color name="textColorPrimary">@color/n1_100</color>
|
||||||
|
<color name="textColorSecondary">@color/n1_100</color>
|
||||||
|
|
||||||
|
<color name="colorSurface">@color/a1_0</color>
|
||||||
|
|
||||||
|
</resources>
|
||||||
@@ -2,19 +2,26 @@
|
|||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||||
<item name="android:statusBarColor">@color/n1_50</item>
|
|
||||||
<item name="android:navigationBarColor">@color/n1_50</item>
|
|
||||||
<item name="android:windowBackground">@color/n1_50</item>
|
|
||||||
<item name="colorAccent">@color/a1_500</item>
|
|
||||||
<item name="colorPrimary">@color/n1_50</item>
|
|
||||||
|
|
||||||
<item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
|
|
||||||
<item name="dialogCornerRadius">12dp</item>
|
|
||||||
|
|
||||||
<item name="android:windowAnimationStyle">@style/AppTheme.ActivityAnimation</item>
|
<item name="android:windowAnimationStyle">@style/AppTheme.ActivityAnimation</item>
|
||||||
|
<item name="android:statusBarColor">@color/colorPrimaryVariant</item>
|
||||||
|
<item name="android:navigationBarColor">@color/colorPrimaryVariant</item>
|
||||||
|
<item name="android:windowBackground">@color/colorBackground</item>
|
||||||
<item name="android:navigationBarDividerColor" tools:targetApi="o_mr1">
|
<item name="android:navigationBarDividerColor" tools:targetApi="o_mr1">
|
||||||
@android:color/transparent
|
@android:color/transparent
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
|
<item name="colorPrimary">@color/colorPrimary</item>
|
||||||
|
<item name="colorPrimaryVariant">@color/colorPrimaryVariant</item>
|
||||||
|
<item name="colorOnPrimary">@color/colorOnPrimary</item>
|
||||||
|
|
||||||
|
<item name="colorSecondary">@color/colorSecondary</item>
|
||||||
|
<item name="colorSecondaryVariant">@color/colorSecondaryVariant</item>
|
||||||
|
<item name="colorOnSecondary">@color/colorOnSecondary</item>
|
||||||
|
|
||||||
|
<item name="android:windowLightStatusBar">true</item>
|
||||||
|
|
||||||
|
<item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
|
||||||
|
|
||||||
|
<item name="dialogCornerRadius">12dp</item>
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -2,11 +2,15 @@
|
|||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<color name="a1_0">@android:color/system_accent1_0</color>
|
<color name="a1_0">@android:color/system_accent1_0</color>
|
||||||
|
<color name="a1_200">@android:color/system_accent1_200</color>
|
||||||
|
<color name="a1_400">@android:color/system_accent1_400</color>
|
||||||
<color name="a1_500">@android:color/system_accent1_500</color>
|
<color name="a1_500">@android:color/system_accent1_500</color>
|
||||||
<color name="a1_600">@android:color/system_accent1_600</color>
|
<color name="a1_600">@android:color/system_accent1_600</color>
|
||||||
|
|
||||||
|
<color name="a2_100">@android:color/system_accent2_100</color>
|
||||||
<color name="a2_200">@android:color/system_accent2_200</color>
|
<color name="a2_200">@android:color/system_accent2_200</color>
|
||||||
<color name="a2_700">@android:color/system_accent2_700</color>
|
<color name="a2_700">@android:color/system_accent2_700</color>
|
||||||
|
<color name="a1_1000">@android:color/system_accent2_1000</color>
|
||||||
|
|
||||||
<color name="a3_200">@android:color/system_accent3_200</color>
|
<color name="a3_200">@android:color/system_accent3_200</color>
|
||||||
<color name="a3_700">@android:color/system_accent3_700</color>
|
<color name="a3_700">@android:color/system_accent3_700</color>
|
||||||
|
|||||||
@@ -1,6 +1,18 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
|
<attr name="textColorPrimary" format="color"/>
|
||||||
|
<attr name="textColorSecondary" format="color"/>
|
||||||
|
<attr name="textColorSecondaryVariant" format="color"/>
|
||||||
|
|
||||||
|
<attr name="colorSecondary2" format="color" />
|
||||||
|
<attr name="colorSecondary2Variant" format="color" />
|
||||||
|
<attr name="colorOnSecondary2" format="color" />
|
||||||
|
|
||||||
|
<attr name="colorSecondary3" format="color" />
|
||||||
|
<attr name="colorSecondary3Variant" format="color" />
|
||||||
|
<attr name="colorOnSecondary3" format="color" />
|
||||||
|
|
||||||
<attr name="fullScreenDialogTheme" format="reference" />
|
<attr name="fullScreenDialogTheme" format="reference" />
|
||||||
|
|
||||||
<declare-styleable name="CircleImageView">
|
<declare-styleable name="CircleImageView">
|
||||||
|
|||||||
@@ -1,13 +1,42 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
|
<color name="colorBackground">@color/n1_50</color>
|
||||||
|
|
||||||
|
<color name="colorPrimary">@color/colorBackground</color>
|
||||||
|
<color name="colorPrimaryVariant">@color/colorBackground</color>
|
||||||
|
<color name="colorOnPrimary">@color/n1_900</color>
|
||||||
|
|
||||||
|
<color name="colorSecondary">@color/a2_200</color>
|
||||||
|
<color name="colorSecondaryVariant">@color/a2_700</color>
|
||||||
|
<color name="colorOnSecondary">@color/a2_700</color>
|
||||||
|
|
||||||
|
<color name="colorSecondary2">@color/a3_200</color>
|
||||||
|
<color name="colorSecondary2Variant">@color/a3_100</color>
|
||||||
|
<color name="colorOnSecondary2">@color/a3_700</color>
|
||||||
|
|
||||||
|
<color name="colorSecondary3">@color/a1_600</color>
|
||||||
|
<color name="colorSecondary3Variant">@color/a1_500</color>
|
||||||
|
<color name="colorOnSecondary3">@color/a1_0</color>
|
||||||
|
|
||||||
|
<color name="textColorPrimary">@color/n1_900</color>
|
||||||
|
<color name="textColorSecondary">@color/n1_900</color>
|
||||||
|
<color name="textColorSecondaryVariant">@color/n2_500</color>
|
||||||
|
|
||||||
|
<color name="colorSurface">@color/a1_0</color>
|
||||||
|
|
||||||
<color name="a1_0">#FFFFFF</color>
|
<color name="a1_0">#FFFFFF</color>
|
||||||
|
<color name="a1_200">#B1C6FA</color>
|
||||||
|
<color name="a1_400">#4184F5</color>
|
||||||
<color name="a1_500">#3771DF</color>
|
<color name="a1_500">#3771DF</color>
|
||||||
<color name="a1_600">#2559BC</color>
|
<color name="a1_600">#2559BC</color>
|
||||||
|
<color name="a1_1000">#000000</color>
|
||||||
|
|
||||||
|
<color name="a2_100">#DCE1F7</color>
|
||||||
<color name="a2_200">#C0C6DA</color>
|
<color name="a2_200">#C0C6DA</color>
|
||||||
<color name="a2_700">#414757</color>
|
<color name="a2_700">#414757</color>
|
||||||
|
|
||||||
|
<color name="a3_100">#F8D6FC</color>
|
||||||
<color name="a3_200">#DEBAE5</color>
|
<color name="a3_200">#DEBAE5</color>
|
||||||
<color name="a3_700">#583C61</color>
|
<color name="a3_700">#583C61</color>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<color name="ic_launcher_background">#4284F4</color>
|
<color name="ic_launcher_background">#4184F5</color>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -2,23 +2,42 @@
|
|||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||||
<item name="android:statusBarColor">@color/n1_50</item>
|
|
||||||
<item name="android:navigationBarColor">@color/n1_50</item>
|
|
||||||
<item name="android:windowBackground">@color/n1_50</item>
|
|
||||||
<item name="colorAccent">@color/a1_500</item>
|
|
||||||
<item name="colorPrimary">@color/n1_50</item>
|
|
||||||
|
|
||||||
<item name="android:windowLightStatusBar">true</item>
|
|
||||||
<item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
|
|
||||||
<item name="dialogCornerRadius">12dp</item>
|
|
||||||
|
|
||||||
<item name="android:windowAnimationStyle">@style/AppTheme.ActivityAnimation</item>
|
<item name="android:windowAnimationStyle">@style/AppTheme.ActivityAnimation</item>
|
||||||
|
<item name="android:statusBarColor">@color/colorPrimaryVariant</item>
|
||||||
|
<item name="android:navigationBarColor">@color/colorPrimaryVariant</item>
|
||||||
|
<item name="android:windowBackground">@color/colorBackground</item>
|
||||||
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">true</item>
|
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">true</item>
|
||||||
<item name="android:navigationBarDividerColor" tools:targetApi="o_mr1">
|
<item name="android:navigationBarDividerColor" tools:targetApi="o_mr1">
|
||||||
@android:color/transparent
|
@android:color/transparent
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
|
<item name="colorPrimary">@color/colorPrimary</item>
|
||||||
|
<item name="colorPrimaryVariant">@color/colorPrimaryVariant</item>
|
||||||
|
<item name="colorOnPrimary">@color/colorOnPrimary</item>
|
||||||
|
|
||||||
|
<item name="colorSecondary">@color/colorSecondary</item>
|
||||||
|
<item name="colorSecondaryVariant">@color/colorSecondaryVariant</item>
|
||||||
|
<item name="colorOnSecondary">@color/colorOnSecondary</item>
|
||||||
|
|
||||||
|
<item name="colorSecondary2">@color/colorSecondary2</item>
|
||||||
|
<item name="colorSecondary2Variant">@color/colorSecondary2Variant</item>
|
||||||
|
<item name="colorOnSecondary2">@color/colorOnSecondary2</item>
|
||||||
|
|
||||||
|
<item name="colorSecondary3">@color/colorSecondary3</item>
|
||||||
|
<item name="colorSecondary3Variant">@color/colorSecondary3Variant</item>
|
||||||
|
<item name="colorOnSecondary3">@color/colorOnSecondary3</item>
|
||||||
|
|
||||||
|
<item name="textColorPrimary">@color/textColorPrimary</item>
|
||||||
|
<item name="textColorSecondary">@color/textColorSecondary</item>
|
||||||
|
<item name="textColorSecondaryVariant">@color/textColorSecondaryVariant</item>
|
||||||
|
|
||||||
|
<item name="colorSurface">@color/colorSurface</item>
|
||||||
|
|
||||||
|
<item name="android:windowLightStatusBar">true</item>
|
||||||
|
|
||||||
|
<item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
|
||||||
|
|
||||||
|
<item name="dialogCornerRadius">12dp</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||