ViewFlipper不与导航抽屉一起使用

时间:2015-10-14 12:10:47

标签: java c# android eclipse xamarin

我正在尝试在我的应用程序中集成导航抽屉和ViewFlipper,但它们似乎不能一起工作,代码的某些部分如下:

<android.support.v4.widget.DrawerLayout             xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:fab="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:elevation="@dimen/toolbar_elevation">
<LinearLayout
    android:id="@+id/trip_detail_bot_layout"
    android:orientation="horizontal"
    android:visibility="visible"
    android:layout_width="match_parent"
    android:layout_height="52dp"
    android:minHeight="52dp"
    android:background="#51A31B"
    android:gravity="center_vertical"
    android:layout_gravity="center_vertical">
    <ViewFlipper
        android:id="@+id/first_viewflipper"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <RelativeLayout
            android:id="@+id/first_swipe_layout"
            android:orientation="horizontal"
            android:visibility="visible"
            android:layout_width="match_parent"
            android:layout_height="52dp"
            android:minHeight="52dp"
            android:background="#51A31B"
            android:gravity="center_vertical"
            android:layout_gravity="center_vertical">
            <TextView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:textColor="#FFFEFF"
                android:id="@+id/trip_detail_bot_text"
                android:textSize="18dp"
                android:typeface="sans"
                android:text="SWIPE to start the trip"
                android:layout_marginLeft="8dp"
                android:layout_marginRight="42dp"
                android:layout_alignParentLeft="true"
                android:layout_centerVertical="true"
                android:gravity="center_vertical|left"
                android:textStyle="bold" />
            <ImageView
                android:id="@+id/pickuptime_image"
                android:gravity="center_vertical"
                android:background="@drawable/swipe_right_icon"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:layout_marginRight="8dp"
                android:layout_centerVertical="true" />
        </RelativeLayout>
    </ViewFlipper>
</LinearLayout>

当我删除&#34; android.support.v4.widget.DrawerLayout&#34;并使用ViewFlipper&#34; LinearLayout&#34;,它的工作..

如果有人解决它,请帮帮我.....

0 个答案:

没有答案