Menu
  • HOME
  • TAGS

Floating Action Button not showing fully inside a fragment

android,android-fragments,floating-action-button,androiddesignsupport,android-coordinatorlayout

You should move your FAB inside the CoordinatorLayout. Something like this: <android.support.design.widget.CoordinatorLayout> <android.support.design.widget.AppBarLayout> <android.support.v7.widget.Toolbar app:layout_scrollFlags="scroll|enterAlways" /> <android.support.design.widget.TabLayout/> </android.support.design.widget.AppBarLayout> <android.support.v4.view.ViewPager app:layout_behavior="@string/appbar_scrolling_view_behavior" />...

Scrolling down triggers refresh instead of revealing the toolbar

android,swiperefreshlayout,android-coordinatorlayout

Seems like you have to enable/disable the SwipeRefreshLayout when the AppBarLayout offset changes, using AppBarLayout.OnOffsetChangedListener. See http://stackoverflow.com/a/30822119/795820...

Configure CoordinatorLayout from code

android,android-layout,android-coordinatorlayout

Taking one step back and building the entire view in plain xml, I realized that layout_below is not the property I needed for my use case: placing the content view below the app bar. I did not make this clear in my question though, as I assumed layout_below would be...

Set layout_anchor at runtime on FloatingActionButton

android,android-design-library,android-coordinatorlayout

If you have a FAB with the the app:layout_anchor attribute, and you want to set the visibility you should use something like this: CoordinatorLayout.LayoutParams params = (CoordinatorLayout.LayoutParams) fab.getLayoutParams(); params.setAnchorId(View.NO_ID); fab.setLayoutParams(params); fab.setVisibility(View.GONE); If you want to set theapp:layout_anchor dinamically you can use the same code: CoordinatorLayout.LayoutParams p = (CoordinatorLayout.LayoutParams) fab.getLayoutParams(); p.setAnchorId(xxxx);...

FloatingActionButton with SnackBar and CoordinatorLayout won't work with proguard

android,androiddesignsupport,android-coordinatorlayout,android-snackbar

Try this: # support design -dontwarn android.support.design.** -keep class android.support.design.** { *; } -keep interface android.support.design.** { *; } -keep public class android.support.design.R$* { *; } ...

How to set app:layout_scrollFlags for Toolbar programmatically

android,android-fragments,android-toolbar,android-coordinatorlayout

I'd strongly recommend against changing the scrolling flags based on what tab is selected - having the Toolbar automatically return (and the content move down) when scrolling to a non-recyclerview tab can be very jarring and probably not an interaction pattern you want (exasperated if your two RecyclerView tabs are...

Strange behaviour of the CoordinatorLayout in conjunction with ViewPager

android,android-viewpager,android-coordinatorlayout,android-appbarlayout

I was able to reproduce this on my API 16 device (still no issues on API 22). This is definitely a bug in the AppBarLayout, however, there is a quick work around. This is only an issue when the AppBarLayout becomes completely hidden. Add a view with 1dp height to...

CoordinatorLayout Toolbar invisible on enter until full height

android,android-toolbar,android-coordinatorlayout

I was having this same issue and the only thing I found that solved it was by having something else other than the toolbar inside the AppBarLayout. I placed an invisible view in my layout underneath the toolbar. Not the most ideal solution, but it worked. <android.support.design.widget.AppBarLayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="wrap_content"...

How to fix the position of a view inside a ViewPager and CoordinatorLayout

android,android-layout,android-design-library,android-coordinatorlayout,coordinator-layout

You should use a FAB in activity layout. .If you need different colors or actions you can define FAB in your fragment and set the color or the action for each fragment.

How to get Adview below Viewpager in CoordinatorLayout

android,android-recyclerview,android-coordinatorlayout

You can add ViewPager and AdView inside RelativeLayout and specify android:layout_above="@+id/adView" property to ViewPager so that adView doesn't block the ViewPager contents. Below layout should work fine <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.v4.view.ViewPager android:id="@+id/viewPager" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_above="@+id/adView"...

NestedScrollView and CoordinatorLayout. Issue on Scrolling

android,android-design-library,android-coordinatorlayout

This can also be observed in the cheesesquare demo when removing all but one card in the details fragment. I was able to solve this (for now) using this class: https://gist.github.com/EmmanuelVinas/c598292f43713c75d18e <android.support.v4.widget.NestedScrollView android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="com.evs.demo.layout.FixedScrollingViewBehavior"> ..... </android.support.v4.widget.NestedScrollView> ...

NestedScrollView (NSV) in CoordinatorLayout (CL): NSV Not at Top When Loaded

android,scrollview,material-design,android-coordinatorlayout

OK! After a solid DAY of debugging every single component of my layout and Fragment I identified what I believe is a bug. First, the issue: Turns out that having elements in your NSV's child view that change visibility to View.GONE upon runtime are causing the list to scroll down....