How can I do a chain with n ViewFlippers, where one view flipper points to
the next one e the last one points to the first one?
public MyFlipper extends ViewFlipper(){
private MyFlipper nextFlipper;
}
I can do it programatically, but i want to set who is the next in XML
layout... is that possible?
I tried to use the attrs.xml and use the id in myFlipper
<resources>
<declare-styleable name="Card" >
<attr name="nextCard" format="integer"/>
</declare-styleable>
</resources>
And the layout like this..
<AbsoluteLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:test="test"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<MyFlipper
android:id="@+id/card01"
android:layout_x="10px"
android:layout_y="10px"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
test:nextCard="@id/card02"
>
<ImageView
android:id="@+id/card01f"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
</ImageView>
<ImageView
android:id="@+id/card01b"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
</ImageView>
</MyFlipper>
<MyFlipper
android:id="@+id/card02"
android:layout_x="10px"
android:layout_y="90px"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
test:nextCard="@id/card01"
>
<ImageView
android:id="@+id/card02f"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
</ImageView>
<ImageView
android:id="@+id/card02b"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
</ImageView>
</MyFlipper>
</AbsolutLayout>
I tried to revovery the nextCard id in the MyFlipper constructor, but no
way...
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en