Android: Layout Overlap With The Touch Screen Icons
I have a simple LinearLayout. The layout is being overlapped by the touch icons at the bottom of the device and emulator. Copy
Or, if you want it in a particular activity rather than entire project, you can use like this also:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Window window = getWindow();
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
window.setStatusBarColor(getResources().getColor(android.R.color.transparent));
}
Solution 2:
Add android:fitsSystemWindows="true"
in your linear layout attribute.
Solution 3:
use scrollview instead of LinearLayout.check following code.
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/scrollView">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
</LinearLayout>
</ScrollView>
Post a Comment for "Android: Layout Overlap With The Touch Screen Icons"