Adds tint to arrow
This commit is contained in:
parent
0faeada1c6
commit
39e892dc08
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
package im.vector.app.features.home
|
package im.vector.app.features.home
|
||||||
|
|
||||||
|
import android.content.res.ColorStateList
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
|
@ -24,12 +25,14 @@ import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.view.animation.DecelerateInterpolator
|
import android.view.animation.DecelerateInterpolator
|
||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
|
import androidx.core.widget.ImageViewCompat
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
import com.airbnb.mvrx.activityViewModel
|
import com.airbnb.mvrx.activityViewModel
|
||||||
import com.airbnb.mvrx.fragmentViewModel
|
import com.airbnb.mvrx.fragmentViewModel
|
||||||
import com.airbnb.mvrx.withState
|
import com.airbnb.mvrx.withState
|
||||||
import com.google.android.material.badge.BadgeDrawable
|
import com.google.android.material.badge.BadgeDrawable
|
||||||
|
import com.google.android.material.color.MaterialColors
|
||||||
import im.vector.app.AppStateHandler
|
import im.vector.app.AppStateHandler
|
||||||
import im.vector.app.R
|
import im.vector.app.R
|
||||||
import im.vector.app.RoomGroupingMethod
|
import im.vector.app.RoomGroupingMethod
|
||||||
|
@ -356,17 +359,19 @@ class HomeDetailFragment @Inject constructor(
|
||||||
|
|
||||||
private fun onGroupChange(groupSummary: GroupSummary?) {
|
private fun onGroupChange(groupSummary: GroupSummary?) {
|
||||||
hideModal()
|
hideModal()
|
||||||
if (groupSummary == null) {
|
// if (groupSummary == null) {
|
||||||
views.backButtonLayout.isVisible = false
|
// views.backButtonLayout.isVisible = false
|
||||||
views.groupToolbarSpaceTitleView.isVisible = false
|
// views.groupToolbarSpaceTitleView.isVisible = false
|
||||||
views.groupToolbarSpaceTitleView.text = getString(R.string.all_chats)
|
// views.groupToolbarSpaceTitleView.text = getString(R.string.all_chats)
|
||||||
views.groupToolbarTitleView.text = getString(R.string.all_chats)
|
// ImageViewCompat.setImageTintList(views.toolbarChevron, ColorStateList.valueOf(resources.getColor(R.color.palette_element_green)))
|
||||||
} else {
|
// views.groupToolbarTitleView.text = getString(R.string.all_chats)
|
||||||
views.backButtonLayout.isVisible = true
|
// } else {
|
||||||
views.groupToolbarSpaceTitleView.isVisible = true
|
// views.backButtonLayout.isVisible = true
|
||||||
views.groupToolbarSpaceTitleView.text = groupSummary.displayName
|
// views.groupToolbarSpaceTitleView.isVisible = true
|
||||||
views.groupToolbarTitleView.text = groupSummary.displayName
|
// views.groupToolbarSpaceTitleView.text = groupSummary.displayName
|
||||||
}
|
// views.groupToolbarTitleView.text = groupSummary.displayName
|
||||||
|
// ImageViewCompat.setImageTintList(views.toolbarChevron, ColorStateList.valueOf(MaterialColors.getColor(views.toolbarChevron, R.attr.vctr_message_text_color)))
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun onSpaceChange(spaceSummary: RoomSummary?) {
|
private fun onSpaceChange(spaceSummary: RoomSummary?) {
|
||||||
|
@ -379,6 +384,7 @@ class HomeDetailFragment @Inject constructor(
|
||||||
views.groupToolbarSpaceTitleView.text = getString(R.string.all_chats)
|
views.groupToolbarSpaceTitleView.text = getString(R.string.all_chats)
|
||||||
views.groupToolbarTitleView.text = getString(R.string.all_chats)
|
views.groupToolbarTitleView.text = getString(R.string.all_chats)
|
||||||
views.spaceAvatar.isVisible = false
|
views.spaceAvatar.isVisible = false
|
||||||
|
ImageViewCompat.setImageTintList(views.toolbarChevron, ColorStateList.valueOf(resources.getColor(R.color.palette_element_green)))
|
||||||
} else {
|
} else {
|
||||||
views.backButtonLayout.isVisible = true
|
views.backButtonLayout.isVisible = true
|
||||||
views.groupToolbarSpaceTitleView.isVisible = true
|
views.groupToolbarSpaceTitleView.isVisible = true
|
||||||
|
@ -386,6 +392,7 @@ class HomeDetailFragment @Inject constructor(
|
||||||
views.groupToolbarTitleView.text = spaceSummary.displayName
|
views.groupToolbarTitleView.text = spaceSummary.displayName
|
||||||
views.spaceAvatar.isVisible = true
|
views.spaceAvatar.isVisible = true
|
||||||
avatarRenderer.render(spaceSummary.toMatrixItem(), views.spaceAvatar)
|
avatarRenderer.render(spaceSummary.toMatrixItem(), views.spaceAvatar)
|
||||||
|
ImageViewCompat.setImageTintList(views.toolbarChevron, ColorStateList.valueOf(MaterialColors.getColor(views.toolbarChevron, R.attr.vctr_message_text_color)))
|
||||||
|
|
||||||
spaceSummary.spaceParents?.firstOrNull()?.let { directParent ->
|
spaceSummary.spaceParents?.firstOrNull()?.let { directParent ->
|
||||||
views.backButtonText.text = directParent.roomSummary?.name ?: getString(R.string.all_chats)
|
views.backButtonText.text = directParent.roomSummary?.name ?: getString(R.string.all_chats)
|
||||||
|
|
|
@ -84,13 +84,6 @@ class SpaceListModalFragment : VectorBaseFragment<FragmentSpaceListModalBinding>
|
||||||
viewModel.setSpace(it)
|
viewModel.setSpace(it)
|
||||||
binding.headerText.isVisible = it == null
|
binding.headerText.isVisible = it == null
|
||||||
binding.headerTextLayout.isVisible = it == null
|
binding.headerTextLayout.isVisible = it == null
|
||||||
if (it == null) {
|
|
||||||
binding.noSpacesYetText.text = getString(R.string.no_spaces_yet)
|
|
||||||
binding.noSpacesYetMessage.text = getString(R.string.no_spaces_yet_message)
|
|
||||||
} else {
|
|
||||||
binding.noSpacesYetText.text = getString(R.string.no_subspaces_yet)
|
|
||||||
binding.noSpacesYetMessage.text = getString(R.string.no_subspaces_yet_message)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun invalidate() {
|
override fun invalidate() {
|
||||||
|
|
|
@ -133,12 +133,11 @@
|
||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
android:importantForAccessibility="no"
|
android:importantForAccessibility="no"
|
||||||
android:rotation="180"
|
android:src="@drawable/ic_back_24dp"
|
||||||
android:src="@drawable/ic_arrow_right"
|
android:layout_marginTop="16dp"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/back_button_text"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="@id/back_button_text"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:tint="@color/palette_element_green" />
|
app:tint="?attr/vctr_message_text_color" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/back_button_text"
|
android:id="@+id/back_button_text"
|
||||||
|
@ -147,6 +146,7 @@
|
||||||
android:layout_marginStart="6dp"
|
android:layout_marginStart="6dp"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:text="@string/chats"
|
android:text="@string/chats"
|
||||||
|
android:visibility="gone"
|
||||||
android:textColor="@color/palette_element_green"
|
android:textColor="@color/palette_element_green"
|
||||||
android:textSize="17sp"
|
android:textSize="17sp"
|
||||||
app:layout_constraintStart_toEndOf="@id/back_button_chevron"
|
app:layout_constraintStart_toEndOf="@id/back_button_chevron"
|
||||||
|
@ -193,7 +193,7 @@
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
android:importantForAccessibility="no"
|
android:importantForAccessibility="no"
|
||||||
android:src="@drawable/ic_arrow_right"
|
android:src="@drawable/ic_arrow_right"
|
||||||
app:tint="@color/palette_element_green" />
|
app:tint="@color/palette_element_green"/>
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue