android-snackbar

bottom view below RecyclerView in CoordinatorLayout on android

走远了吗. 提交于 2021-02-11 14:56:52
问题 I switched from ConstraintLayout to CoordinatorLayout to avoid snackbar overlapping with my bottom view. While it worked very well in a screen with only a toolbar, RecyclerView and Floating button, in the second screen i am having a really hard time to add a view below the RecyclerView while avoiding it being overlapped with the RecyclerView My best solution yet (below) was to add paddingBottom attribute of about 80dp to the recyclerView. This looks like it solves the problem but when the

Deleting Card from RecyclerView and re-add it again

∥☆過路亽.° 提交于 2021-01-29 05:34:21
问题 I'm struggling to implement the funtionality to delete an entry of a recyclerview and re-add it again, if the user decided otherwise. For that I'm showing a Snackbar with an undo action. So the flow should be: The user sees a list of Cards which each show some values and an delete button. If the user presses the delete button, the card is deleted and a Snackbar is shown. If the user clicks undo on the Snackbar the Card should be re-added to the RecyclerView . Only if the Snackbar disappears

Snackbar stack will always show only the last snackbar

戏子无情 提交于 2020-06-09 05:22:47
问题 The Snackbar.make(...).show() will only show the last snackbar unlike toast the other snackbars are gone. for(int i = 1;i < 11;i++) { Snackbar.make(..., "number: " + i, Snackbar.LENGTH_SHORT).show(); } Sometimes when the snackbar should show after network task and one should show before network task, the seconds snackbar is never shown. Im using a coordinatorlayout. 回答1: Please refer the Android components docs: Snackbars automatically time out from the screen. For usability reasons,

Android : Error Snack bar not showing correctly with Map View

ⅰ亾dé卋堺 提交于 2020-02-04 07:17:46
问题 this is xml layout <android.support.design.widget.CoordinatorLayout android:id="@+id/map_location_picker_main_content" android:layout_width="match_parent" android:layout_height="match_parent"> <com.mapbox.mapboxsdk.maps.MapView android:id="@+id/map_view" android:layout_width="match_parent" android:layout_height="match_parent" /> </android.support.design.widget.CoordinatorLayout> and this is the output : I am using a CoordinatorLayout as a root of my xml file and mapbox layout for showing the

Snackbar slide animation causes the floating action button to jump unexpectedly

倖福魔咒の 提交于 2020-02-04 05:21:07
问题 I have a floating action button in my activity. It should move up a little bit when a snackbar appears. but when I change my snackbar animation to slide using the code: pressAgainToExitSnackBar.setAnimationMode(BaseTransientBottomBar.ANIMATION_MODE_SLIDE); The floating action button animation glitches for one frame or so. Like this: What am I doing wrong? PS: I am using this version of google material design library: implementation 'com.google.android.material:material:1.2.0-alpha03' 来源: