parent
32f5bd5336
commit
3432db37d9
3 changed files with 7 additions and 3 deletions
|
@ -12,7 +12,8 @@
|
||||||
<android.support.v7.widget.RecyclerView
|
<android.support.v7.widget.RecyclerView
|
||||||
android:id="@+id/recycler_view"
|
android:id="@+id/recycler_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent"
|
||||||
|
android:scrollbars="vertical" />
|
||||||
|
|
||||||
<TextView android:id="@android:id/empty"
|
<TextView android:id="@android:id/empty"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -9,7 +9,8 @@
|
||||||
<android.support.v7.widget.RecyclerView
|
<android.support.v7.widget.RecyclerView
|
||||||
android:id="@+id/media_grid"
|
android:id="@+id/media_grid"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent"
|
||||||
|
android:scrollbars="vertical" />
|
||||||
|
|
||||||
<TextView android:id="@+id/no_images"
|
<TextView android:id="@+id/no_images"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -162,7 +162,9 @@ public class ContactSelectionListFragment extends Fragment
|
||||||
public void onLoadFinished(Loader<Cursor> loader, Cursor data) {
|
public void onLoadFinished(Loader<Cursor> loader, Cursor data) {
|
||||||
((CursorRecyclerViewAdapter) recyclerView.getAdapter()).changeCursor(data);
|
((CursorRecyclerViewAdapter) recyclerView.getAdapter()).changeCursor(data);
|
||||||
emptyText.setText(R.string.contact_selection_group_activity__no_contacts);
|
emptyText.setText(R.string.contact_selection_group_activity__no_contacts);
|
||||||
if (recyclerView.getAdapter().getItemCount() > 20) {
|
boolean useFastScroller = (recyclerView.getAdapter().getItemCount() > 20);
|
||||||
|
recyclerView.setVerticalScrollBarEnabled(!useFastScroller);
|
||||||
|
if (useFastScroller) {
|
||||||
fastScroller.setVisibility(View.VISIBLE);
|
fastScroller.setVisibility(View.VISIBLE);
|
||||||
fastScroller.setRecyclerView(recyclerView);
|
fastScroller.setRecyclerView(recyclerView);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue