mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-11 18:10:44 +00:00
use proper color for out of office view
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
parent
a9168b3f9d
commit
ca4ace687c
@ -51,9 +51,11 @@ import androidx.activity.OnBackPressedCallback
|
|||||||
import androidx.activity.result.ActivityResult
|
import androidx.activity.result.ActivityResult
|
||||||
import androidx.activity.result.contract.ActivityResultContracts
|
import androidx.activity.result.contract.ActivityResultContracts
|
||||||
import androidx.appcompat.view.ContextThemeWrapper
|
import androidx.appcompat.view.ContextThemeWrapper
|
||||||
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.core.content.FileProvider
|
import androidx.core.content.FileProvider
|
||||||
import androidx.core.content.PermissionChecker
|
import androidx.core.content.PermissionChecker
|
||||||
import androidx.core.content.PermissionChecker.PERMISSION_GRANTED
|
import androidx.core.content.PermissionChecker.PERMISSION_GRANTED
|
||||||
|
import androidx.core.graphics.ColorUtils
|
||||||
import androidx.core.graphics.drawable.toBitmap
|
import androidx.core.graphics.drawable.toBitmap
|
||||||
import androidx.core.text.bold
|
import androidx.core.text.bold
|
||||||
import androidx.emoji2.text.EmojiCompat
|
import androidx.emoji2.text.EmojiCompat
|
||||||
@ -569,7 +571,7 @@ class ChatActivity :
|
|||||||
this.lifecycle.removeObserver(chatViewModel)
|
this.lifecycle.removeObserver(chatViewModel)
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("NotifyDataSetChanged", "SetTextI18n")
|
@SuppressLint("NotifyDataSetChanged", "SetTextI18n", "ResourceAsColor")
|
||||||
@Suppress("LongMethod")
|
@Suppress("LongMethod")
|
||||||
private fun initObservers() {
|
private fun initObservers() {
|
||||||
Log.d(TAG, "initObservers Called")
|
Log.d(TAG, "initObservers Called")
|
||||||
@ -1087,6 +1089,9 @@ class ChatActivity :
|
|||||||
}
|
}
|
||||||
is ChatViewModel.OutOfOfficeUIState.Success -> {
|
is ChatViewModel.OutOfOfficeUIState.Success -> {
|
||||||
binding.outOfOfficeContainer.visibility = View.VISIBLE
|
binding.outOfOfficeContainer.visibility = View.VISIBLE
|
||||||
|
val backgroundColor = ContextCompat.getColor(this, R.color.colorPrimary)
|
||||||
|
val setAlpha = ColorUtils.setAlphaComponent(backgroundColor, (0.2f * 255).toInt())
|
||||||
|
binding.outOfOfficeContainer.setCardBackgroundColor(setAlpha)
|
||||||
|
|
||||||
val startDateTimestamp: Long = uiState.userAbsence.startDate.toLong()
|
val startDateTimestamp: Long = uiState.userAbsence.startDate.toLong()
|
||||||
val endDateTimestamp: Long = uiState.userAbsence.endDate.toLong()
|
val endDateTimestamp: Long = uiState.userAbsence.endDate.toLong()
|
||||||
|
@ -127,15 +127,18 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<FrameLayout
|
<com.google.android.material.card.MaterialCardView
|
||||||
android:id="@+id/out_of_office_container"
|
android:id="@+id/out_of_office_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:visibility="visible">
|
tools:visibility="visible"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
app:cardCornerRadius="12dp">
|
||||||
|
|
||||||
|
|
||||||
<include layout="@layout/out_of_office_view" />
|
<include layout="@layout/out_of_office_view" />
|
||||||
</FrameLayout>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
<com.stfalcon.chatkit.messages.MessagesList
|
<com.stfalcon.chatkit.messages.MessagesList
|
||||||
android:id="@+id/messagesListView"
|
android:id="@+id/messagesListView"
|
||||||
@ -193,7 +196,9 @@
|
|||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:visibility="visible"
|
tools:visibility="visible"
|
||||||
app:background="@color/colorPrimary"
|
app:background="@color/colorPrimary"
|
||||||
|
android:clipToPadding="false"
|
||||||
app:cornerRadius="@dimen/button_corner_radius"
|
app:cornerRadius="@dimen/button_corner_radius"
|
||||||
|
|
||||||
app:icon="@drawable/ic_baseline_arrow_downward_24px" />
|
app:icon="@drawable/ic_baseline_arrow_downward_24px" />
|
||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
|
@ -9,14 +9,23 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxHeight="150dp"
|
android:maxHeight="150dp"
|
||||||
android:padding="12dp"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/out_of_office_view"
|
android:id="@+id/out_of_office_view">
|
||||||
style="@style/ScrollViewStyle">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="6dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/colorPrimary"/>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="8dp"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -25,7 +34,6 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:layout_marginTop ="8dp"
|
|
||||||
tools:text="Jane is out of office"/>
|
tools:text="Jane is out of office"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -52,4 +60,5 @@
|
|||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
tools:text="Hi, I am out of office this week. Please contact ....., ..........write very very very very very very very very very very very very very very very long message..................................................................................................................................if you have any issues."/>
|
tools:text="Hi, I am out of office this week. Please contact ....., ..........write very very very very very very very very very very very very very very very long message..................................................................................................................................if you have any issues."/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
Loading…
Reference in New Issue
Block a user