Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
circles-android
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Circles
circles-android
Commits
d1c47f97
Commit
d1c47f97
authored
1 year ago
by
Taras
Browse files
Options
Downloads
Patches
Plain Diff
Handle select users placeholder visibility
parent
51db68b4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/src/main/java/org/futo/circles/core/select_users/SelectUsersFragment.kt
+2
-0
2 additions, 0 deletions
...org/futo/circles/core/select_users/SelectUsersFragment.kt
core/src/main/res/layout/fragment_select_users.xml
+33
-26
33 additions, 26 deletions
core/src/main/res/layout/fragment_select_users.xml
with
35 additions
and
26 deletions
core/src/main/java/org/futo/circles/core/select_users/SelectUsersFragment.kt
+
2
−
0
View file @
d1c47f97
...
...
@@ -13,6 +13,7 @@ import org.futo.circles.core.databinding.FragmentSelectUsersBinding
import
org.futo.circles.core.extensions.getQueryTextChangeStateFlow
import
org.futo.circles.core.extensions.observeData
import
org.futo.circles.core.extensions.setIsVisible
import
org.futo.circles.core.model.NoResultsItem
import
org.futo.circles.core.select_users.list.search.InviteMembersSearchListAdapter
import
org.futo.circles.core.select_users.list.selected.SelectedUsersListAdapter
...
...
@@ -49,6 +50,7 @@ class SelectUsersFragment : Fragment(R.layout.fragment_select_users) {
private
fun
setupObservers
()
{
viewModel
.
searchUsersLiveData
.
observeData
(
this
)
{
items
->
binding
.
lSelectedItems
.
setIsVisible
(
items
.
firstOrNull
{
it
is
NoResultsItem
}
==
null
)
searchListAdapter
.
submitList
(
items
)
}
viewModel
.
selectedUsersLiveData
.
observeData
(
this
)
{
items
->
...
...
This diff is collapsed.
Click to expand it.
core/src/main/res/layout/fragment_select_users.xml
+
33
−
26
View file @
d1c47f97
...
...
@@ -17,36 +17,43 @@
app:layout_constraintTop_toTopOf=
"parent"
app:queryHint=
"@string/enter_name_or_id"
/>
<
androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/
rv
Selected
User
s"
<
FrameLayout
android:id=
"@+id/
l
Selected
Item
s"
android:layout_width=
"0dp"
android:layout_height=
"48dp"
android:orientation=
"horizontal"
app:layoutManager=
"androidx.recyclerview.widget.LinearLayoutManager"
android:layout_height=
"wrap_content"
android:visibility=
"gone"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/searchView"
/>
app:layout_constraintTop_toBottomOf=
"@id/searchView"
tools:visibility=
"visible"
>
<TextView
android:id=
"@+id/tvSelectedUsersPlaceholder"
style=
"@style/subheadline"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:text=
"@string/select_items_from_list_below"
app:layout_constraintBottom_toBottomOf=
"@id/rvSelectedUsers"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"@id/searchView"
app:layout_constraintTop_toTopOf=
"@id/rvSelectedUsers"
/>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rvSelectedUsers"
android:layout_width=
"match_parent"
android:layout_height=
"48dp"
android:orientation=
"horizontal"
app:layoutManager=
"androidx.recyclerview.widget.LinearLayoutManager"
/>
<View
android:id=
"@+id/selectedUserDivider"
android:layout_width=
"0dp"
android:layout_height=
"@dimen/divider_height"
android:background=
"@color/gray"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/rvSelectedUsers"
tools:visibility=
"visible"
/>
<TextView
android:id=
"@+id/tvSelectedUsersPlaceholder"
style=
"@style/subheadline"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"8dp"
android:text=
"@string/select_items_from_list_below"
/>
<View
android:id=
"@+id/selectedUserDivider"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/divider_height"
android:layout_gravity=
"bottom"
android:background=
"@color/gray"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/rvSelectedUsers"
/>
</FrameLayout>
<org.futo.circles.core.view.LoadingRecyclerView
android:id=
"@+id/rvUsers"
...
...
@@ -55,7 +62,7 @@
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/
s
elected
UserDivider
"
/>
app:layout_constraintTop_toBottomOf=
"@id/
lS
elected
Items
"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment