space and room card layout changed in explore rooms, space invite dialog, room invite dialog
This commit is contained in:
parent
0391684334
commit
9dccc398b4
|
@ -41,7 +41,8 @@ class SpaceCardRenderer @Inject constructor(
|
||||||
fun render(spaceSummary: RoomSummary?,
|
fun render(spaceSummary: RoomSummary?,
|
||||||
peopleYouKnow: List<User>,
|
peopleYouKnow: List<User>,
|
||||||
matrixLinkCallback: TimelineEventController.UrlClickCallback?,
|
matrixLinkCallback: TimelineEventController.UrlClickCallback?,
|
||||||
inCard: FragmentMatrixToRoomSpaceCardBinding) {
|
inCard: FragmentMatrixToRoomSpaceCardBinding,
|
||||||
|
showDescription: Boolean) {
|
||||||
if (spaceSummary == null) {
|
if (spaceSummary == null) {
|
||||||
inCard.matrixToCardContentVisibility.isVisible = false
|
inCard.matrixToCardContentVisibility.isVisible = false
|
||||||
inCard.matrixToCardButtonLoading.isVisible = true
|
inCard.matrixToCardButtonLoading.isVisible = true
|
||||||
|
@ -70,6 +71,8 @@ class SpaceCardRenderer @Inject constructor(
|
||||||
inCard.matrixToMemberPills.isVisible = false
|
inCard.matrixToMemberPills.isVisible = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inCard.matrixToCardDescText.isVisible = showDescription
|
||||||
|
|
||||||
renderPeopleYouKnow(inCard, peopleYouKnow.map { it.toMatrixItem() })
|
renderPeopleYouKnow(inCard, peopleYouKnow.map { it.toMatrixItem() })
|
||||||
}
|
}
|
||||||
inCard.matrixToCardDescText.movementMethod = createLinkMovementMethod(object : TimelineEventController.UrlClickCallback {
|
inCard.matrixToCardDescText.movementMethod = createLinkMovementMethod(object : TimelineEventController.UrlClickCallback {
|
||||||
|
|
|
@ -170,7 +170,7 @@ class SpaceDirectoryFragment @Inject constructor(
|
||||||
?: getString(R.string.space_explore_activity_title)
|
?: getString(R.string.space_explore_activity_title)
|
||||||
}
|
}
|
||||||
|
|
||||||
spaceCardRenderer.render(state.currentRootSummary, emptyList(), this, views.spaceCard)
|
spaceCardRenderer.render(state.currentRootSummary, emptyList(), this, views.spaceCard, showDescription = false)
|
||||||
views.addOrCreateChatRoomButton.isVisible = state.canAddRooms
|
views.addOrCreateChatRoomButton.isVisible = state.canAddRooms
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -118,7 +118,7 @@ class SpaceInviteBottomSheet : VectorBaseBottomSheetDialogFragment<BottomSheetIn
|
||||||
views.inviterMxid.isVisible = false
|
views.inviterMxid.isVisible = false
|
||||||
}
|
}
|
||||||
|
|
||||||
spaceCardRenderer.render(summary, state.peopleYouKnow.invoke().orEmpty(), null, views.spaceCard)
|
spaceCardRenderer.render(summary, state.peopleYouKnow.invoke().orEmpty(), null, views.spaceCard, showDescription = true)
|
||||||
|
|
||||||
views.spaceCard.matrixToCardMainButton.button.text = getString(R.string.action_accept)
|
views.spaceCard.matrixToCardMainButton.button.text = getString(R.string.action_accept)
|
||||||
views.spaceCard.matrixToCardSecondaryButton.button.text = getString(R.string.action_decline)
|
views.spaceCard.matrixToCardSecondaryButton.button.text = getString(R.string.action_decline)
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:minHeight="200dp"
|
android:minHeight="200dp"
|
||||||
android:padding="16dp"
|
android:padding="@dimen/layout_horizontal_margin"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:visibility="visible">
|
tools:visibility="visible">
|
||||||
|
|
||||||
|
@ -19,11 +19,9 @@
|
||||||
android:layout_width="60dp"
|
android:layout_width="60dp"
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="20dp"
|
||||||
android:importantForAccessibility="no"
|
|
||||||
android:elevation="4dp"
|
android:elevation="4dp"
|
||||||
|
android:importantForAccessibility="no"
|
||||||
android:transitionName="profile"
|
android:transitionName="profile"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_bias="0"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:src="@sample/room_round_avatars" />
|
tools:src="@sample/room_round_avatars" />
|
||||||
|
@ -31,21 +29,23 @@
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/matrixToCardNameText"
|
android:id="@+id/matrixToCardNameText"
|
||||||
style="@style/Widget.Vector.TextView.Subtitle"
|
style="@style/Widget.Vector.TextView.Subtitle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/layout_vertical_margin"
|
android:layout_marginStart="@dimen/layout_horizontal_margin"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textAlignment="textStart"
|
android:textAlignment="textStart"
|
||||||
android:textColor="?vctr_content_primary"
|
android:textColor="?vctr_content_primary"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintTop_toBottomOf="@id/matrixToCardAvatar"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/matrixToCardAvatar"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/matrixToCardAvatar"
|
||||||
tools:text="@sample/rooms.json/data/name" />
|
tools:text="@sample/rooms.json/data/name" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/matrixToCardAliasText"
|
android:id="@+id/matrixToCardAliasText"
|
||||||
style="@style/Widget.Vector.TextView.Body"
|
style="@style/Widget.Vector.TextView.Body"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
|
@ -53,6 +53,8 @@
|
||||||
android:textAlignment="textStart"
|
android:textAlignment="textStart"
|
||||||
android:textColor="?vctr_content_secondary"
|
android:textColor="?vctr_content_secondary"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/matrixToCardNameText"
|
||||||
app:layout_constraintTop_toBottomOf="@id/matrixToCardNameText"
|
app:layout_constraintTop_toBottomOf="@id/matrixToCardNameText"
|
||||||
app:layout_goneMarginTop="0dp"
|
app:layout_goneMarginTop="0dp"
|
||||||
tools:text="@sample/rooms.json/data/alias"
|
tools:text="@sample/rooms.json/data/alias"
|
||||||
|
@ -65,7 +67,7 @@
|
||||||
android:importantForAccessibility="no"
|
android:importantForAccessibility="no"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/matrixToAccessText"
|
app:layout_constraintBottom_toBottomOf="@id/matrixToAccessText"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="@+id/matrixToCardNameText"
|
||||||
app:layout_constraintTop_toTopOf="@id/matrixToAccessText"
|
app:layout_constraintTop_toTopOf="@id/matrixToAccessText"
|
||||||
app:tint="?vctr_content_secondary"
|
app:tint="?vctr_content_secondary"
|
||||||
tools:ignore="MissingPrefix"
|
tools:ignore="MissingPrefix"
|
||||||
|
@ -75,7 +77,7 @@
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/matrixToAccessText"
|
android:id="@+id/matrixToAccessText"
|
||||||
style="@style/Widget.Vector.TextView.Body"
|
style="@style/Widget.Vector.TextView.Body"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
|
@ -89,6 +91,13 @@
|
||||||
tools:text="Public Space"
|
tools:text="Public Space"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Barrier
|
||||||
|
android:id="@+id/header_barrier"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:barrierDirection="bottom"
|
||||||
|
app:constraint_referenced_ids="matrixToAccessText, matrixToCardAvatar" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/matrixToMemberPills"
|
android:id="@+id/matrixToMemberPills"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -105,7 +114,7 @@
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0"
|
app:layout_constraintHorizontal_bias="0"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/matrixToAccessText">
|
app:layout_constraintTop_toBottomOf="@id/header_barrier">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/spaceChildMemberCountIcon"
|
android:id="@+id/spaceChildMemberCountIcon"
|
||||||
|
|
Loading…
Reference in New Issue