过去4天我一直在尝试各种选项,但没有成功,我目前的布局看起来像这样
<?xml version="1.0" encoding="utf-8" ?>
<android.support.design.widget.CoordinatorLayout xmlns: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/introLayout" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:background="@color/white" tools:context="com.example.android.IntroActivity">
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:id="@+id/intro_form" android:layout_width="fill_parent" android:layout_height="150dp" android:padding="10dp" android:weightSum="1">
<TextView android:id="@+id/txtLostpassword" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="top|end" android:autoLink="email" android:gravity="end" android:padding="40dp" android:text="@string/login_link"
android:textAppearance="?android:attr/textAppearanceSmall" android:textSize="@dimen/tw__login_btn_text_size" />
<ImageButton android:id="@+id/btnFindMe" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:layout_margin="10dip" android:background="@drawable/logo" />
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_below="@+id/introLoginOptions" android:layout_marginTop="10dp"
android:layout_weight="1" android:orientation="horizontal">
<android.support.design.widget.TabLayout android:id="@+id/tab_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/toolbar" android:background="?attr/colorPrimary" android:elevation="6dp" android:minHeight="?attr/actionBarSize"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" />
<android.support.v4.view.ViewPager android:id="@+id/pager" android:layout_width="match_parent" android:layout_height="fill_parent" android:layout_below="@id/tab_layout" />
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/introLoginOptions" android:layout_width="fill_parent" android:layout_height="150dp" android:orientation="horizontal">
<Button android:id="@+id/btnLoginFacebook" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginTop="20dip" android:background="@color/colorPrimary" android:text="@string/btn_continue_facebook"
android:textColor="@color/cardview_light_background" />
<Button android:id="@+id/btnLogin" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginTop="10dip" android:background="@color/colorPrimary" android:text="@string/btn_login" android:textColor="@color/cardview_light_background"
/>
</LinearLayout>
</RelativeLayout>
</android.support.design.widget.CoordinatorLayout>
我不确定这一切都会出错。所以代码方面的任何帮助都会非常棒。