Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I am trying to integrate a navigation drawer and ViewFlipper in my application , but they don’t seem to work together, some part of code is below :

HTML
<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:removed="#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:removed="#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:removed="@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" />
        </textview></relativelayout>
    </viewflipper>
</linearlayout>


When i removed "android.support.v4.widget.DrawerLayout" and using ViewFlipper inside "LinearLayout", its working..

Please help me if anybody have solution of it.....
Posted
Updated 15-Oct-15 0:26am
v3
Comments
Richard MacCutchan 15-Oct-15 4:48am    
What does "not working" mean?
Ranjit Bisht 15-Oct-15 6:28am    
When i removed "android.support.v4.widget.DrawerLayout" and using ViewFlipper inside "LinearLayout", its working... but ViewFlipper is not working with "android.support.v4.widget.DrawerLayout"... @Richard do you have any solution for it.
Richard MacCutchan 15-Oct-15 8:15am    
Sorry, solution to what?
Ranjit Bisht 15-Oct-15 9:36am    
I clearly explained above with code that i need to use android "ViewFlipper" control inside parent control i.e. "android.support.v4.widget.DrawerLayout" but it emit error all the time...
Richard MacCutchan 15-Oct-15 10:13am    
You have not clearly explained anything. All you have told us is that some control works sometimes and not others. Please do not expect us to guess what is happening on a system that we cannot see.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900