Click here to Skip to main content
15,911,039 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i am trying to develop an android application. this applications main activity contain an tabhost and each tab open intent. since each tab open different activities, one of the activities contain view flipper. i need to change views on flip on the phones. i done the code and but it doesn't work properly. can any one help me pls??????



any examples suggestions????

i will give a brief information about my app architecture

main activity contain a tabhost(tabbar). the tabwidget is placed in an scroll view.. so that it can scrolls horizontally to view all tabs.

when each tab pressd different activities shows on the tab content(wich is a frame layout)

TabSpec setContent = mytab.newTabSpec(tag).setIndicator(tabview).setContent(intent);


one activity is schedules. it contain a view flipper. i use onfling() function to flip each views.


schedules.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <ViewFlipper
        android:id="@+id/viewFlipper1"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" 
        android:inAnimation="@android:anim/slide_in_left"
        android:outAnimation="@android:anim/slide_out_right">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical" >
            <TextView 
                android:id="@+id/text1"
                android:layout_width="wrap_content" 
                android:layout_height="wrap_content"
                android:text="first" />
        </LinearLayout>
         <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical" >
            <TextView 
                android:id="@+id/text2"
                android:layout_width="wrap_content" 
                android:layout_height="wrap_content"
                android:text="second" />
        </LinearLayout>
       
    </ViewFlipper>

</LinearLayout>
Posted
Updated 25-Nov-12 16:07pm
v3
Comments
Chandrashekar SK 23-Nov-12 5:58am    
We can not guess what is wrong. Post your code here so that one can understand where you are going wrong..

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