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