Skip to content Skip to sidebar Skip to footer

Android Tabbed Activity Bottom Off Screen

anybody an idea why the bottom is off screen in a new generated tabbed activity in android? ViewPager is too long for the total screen

Solution 1:

Maybe this design will help in what you need, add:

<LinearLayoutandroid:id="@+id/test"android:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical"></LinearLayout>

in your xml:

<?xml version="1.0" encoding="utf-8"?><android.support.design.widget.CoordinatorLayoutxmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"xmlns:tools="http://schemas.android.com/tools"android:id="@+id/main_content"android:layout_width="match_parent"android:layout_height="match_parent"android:fitsSystemWindows="true"tools:context="com.comfylight.bulbtest.FooBar"><LinearLayoutandroid:id="@+id/test"android:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical"><android.support.design.widget.AppBarLayoutandroid:id="@+id/appbar"android:layout_width="match_parent"android:layout_height="wrap_content"android:paddingTop="@dimen/appbar_padding_top"android:theme="@style/AppTheme.NoActionBar.AppBarOverlay"><android.support.v7.widget.Toolbarandroid:id="@+id/toolbar"android:layout_width="match_parent"android:layout_height="?attr/actionBarSize"android:background="?attr/colorPrimary"app:layout_scrollFlags="scroll|enterAlways"app:popupTheme="@style/AppTheme.NoActionBar.PopupOverlay"></android.support.v7.widget.Toolbar><android.support.design.widget.TabLayoutandroid:id="@+id/tabs"android:layout_width="match_parent"android:layout_height="wrap_content" /></android.support.design.widget.AppBarLayout><android.support.v4.view.ViewPagerandroid:id="@+id/container"android:layout_width="match_parent"android:layout_height="match_parent"app:layout_behavior="@string/appbar_scrolling_view_behavior" /><android.support.design.widget.FloatingActionButtonandroid:id="@+id/fab"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_gravity="end|bottom"android:layout_margin="@dimen/fab_margin"android:src="@android:drawable/ic_dialog_email" /></LinearLayout></android.support.design.widget.CoordinatorLayout>

introducir la descripción de la imagen aquí

Post a Comment for "Android Tabbed Activity Bottom Off Screen"