mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-09 14:38:33 +00:00
Some tweaks to the camera FAB.
This commit is contained in:
parent
1ec45fe364
commit
cdfb88ea18
@ -59,14 +59,16 @@
|
||||
android:id="@+id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="150dp"
|
||||
android:scrollbars="vertical"
|
||||
android:nextFocusDown="@+id/fab"
|
||||
android:nextFocusForward="@+id/fab"
|
||||
android:clipToPadding="false"
|
||||
tools:listitem="@layout/conversation_list_item_view" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
<org.thoughtcrime.securesms.components.registration.PulsingFloatingActionButton
|
||||
android:id="@+id/camera_fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -117,7 +117,7 @@ public class ConversationListFragment extends Fragment
|
||||
private ImageView emptyImage;
|
||||
private TextView emptySearch;
|
||||
private PulsingFloatingActionButton fab;
|
||||
private FloatingActionButton cameraFab;
|
||||
private PulsingFloatingActionButton cameraFab;
|
||||
private Locale locale;
|
||||
private String queryFilter = "";
|
||||
private boolean archive;
|
||||
@ -141,8 +141,13 @@ public class ConversationListFragment extends Fragment
|
||||
emptyImage = ViewUtil.findById(view, R.id.empty);
|
||||
emptySearch = ViewUtil.findById(view, R.id.empty_search);
|
||||
|
||||
if (archive) fab.hide();
|
||||
else fab.show();
|
||||
if (archive) {
|
||||
fab.hide();
|
||||
cameraFab.hide();
|
||||
} else {
|
||||
fab.show();
|
||||
cameraFab.show();
|
||||
}
|
||||
|
||||
reminderView.setOnDismissListener(() -> updateReminders(true));
|
||||
|
||||
@ -189,6 +194,7 @@ public class ConversationListFragment extends Fragment
|
||||
super.onPause();
|
||||
|
||||
fab.stopPulse();
|
||||
cameraFab.stopPulse();
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
|
||||
@ -382,6 +388,7 @@ public class ConversationListFragment extends Fragment
|
||||
emptySearch.setVisibility(View.INVISIBLE);
|
||||
emptyImage.setImageResource(EMPTY_IMAGES[(int) (Math.random() * EMPTY_IMAGES.length)]);
|
||||
fab.startPulse(3 * 1000);
|
||||
cameraFab.startPulse(3 * 1000);
|
||||
} else if ((cursor == null || cursor.getCount() <= 0) && !TextUtils.isEmpty(queryFilter)) {
|
||||
list.setVisibility(View.INVISIBLE);
|
||||
emptyState.setVisibility(View.GONE);
|
||||
@ -392,6 +399,7 @@ public class ConversationListFragment extends Fragment
|
||||
emptyState.setVisibility(View.GONE);
|
||||
emptySearch.setVisibility(View.INVISIBLE);
|
||||
fab.stopPulse();
|
||||
cameraFab.stopPulse();
|
||||
}
|
||||
|
||||
getListAdapter().changeCursor(cursor);
|
||||
|
Loading…
x
Reference in New Issue
Block a user