Adds click listener to add space
This commit is contained in:
parent
89f69a1062
commit
19fcb6faf1
@ -51,6 +51,7 @@ class SpaceListModalFragment : VectorBaseFragment<FragmentSpaceListModalBinding>
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
sharedActionViewModel = activityViewModelProvider.get(HomeSharedActionViewModel::class.java)
|
||||
setupRecyclerView()
|
||||
setupAddSpace()
|
||||
}
|
||||
|
||||
private fun setupRecyclerView() {
|
||||
@ -63,6 +64,12 @@ class SpaceListModalFragment : VectorBaseFragment<FragmentSpaceListModalBinding>
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupAddSpace() {
|
||||
binding.addSpaceClickbox.setOnClickListener {
|
||||
println("Add space clicked")
|
||||
}
|
||||
}
|
||||
|
||||
override fun invalidate() {
|
||||
withState(viewModel) { state ->
|
||||
state.rootSpacesOrdered?.let {
|
||||
|
@ -5,8 +5,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_space_modal"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp">
|
||||
android:paddingTop="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/header_text"
|
||||
@ -47,6 +46,14 @@
|
||||
app:layout_constraintTop_toBottomOf="@id/bottom_divider"
|
||||
app:shapeAppearanceOverlay="@style/SpaceListModalImageShapeOverlay" />
|
||||
|
||||
<View
|
||||
android:id="@+id/add_space_clickbox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/ripple_selector_key_pf"
|
||||
app:layout_constraintTop_toBottomOf="@id/bottom_divider"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
@ -69,4 +76,9 @@
|
||||
app:layout_constraintStart_toEndOf="@id/add_space_icon_background"
|
||||
app:layout_constraintTop_toTopOf="@id/add_space_icon_background" />
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="16dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/add_space_icon_background" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@ -4,6 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/ripple_selector_key_pf"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="12dp">
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user