Android Studio Project: bottom of UI is cut off

流过昼夜 提交于 2019-11-27 15:43:35

This is because you are using CoordinatorLayout with ListView. You can change your implementation to RecyclerView to achieve correct scroll.

or If you are tagetting above 5.0, you can use the following piece of code

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { listView.setNestedScrollingEnabled(true); }

I think CoordinatorLayout only works with the children of NestedScrollingChild.

Sherlock

I've had this happen to me before recently. I recommend posting your styles.xml as well.

The culprit for me was this line of code or something similar:

<item name="android:windowTranslucentStatus">true</item>

Here's the Question I posted with a similar issue: Layout is under StatusBar and Soft Keys

In Android Design Library, well, the FloatingActionButton supposed to be within the CoordinatorLayout, not within any other views ex: a Fragment view in one of the tabs above. so try adding your FloatingActionButton to your main_layout and then just communicate with the activity to show/hide the FAB and do the necessary clicks.

Krunal Patel

Put the below code in onCreateView, I think it will work.

View decorView = getWindow().getDecorView();
int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
decorView.setSystemUiVisibility(uiOptions);

Changing the layout to RelativeLayout worked for me. Then added this line in viewPager tag :

android:layout_below="@id/appbar"

Voilla..!!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!