I want to display my pages as a book, and when we move from one page to another it should look like book reviewing. For an example see the below screensho开发者_如何学JAVAt
Can you give me some suggestions on this design and animation functionality?
Are you looking for this ?
Code for this layout
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:scrollbars="horizontal|vertical">
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center_vertical" >
<Button android:id="@+id/btnNext" android:layout_width="wrap_content"
android:layout_centerVertical="true" android:layout_height="wrap_content"
android:background="@drawable/icon" android:layout_alignParentRight="true" />
<Button android:id="@+id/btnBack" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:background="@drawable/icon"
android:layout_centerVertical="true" android:layout_alignParentLeft="true" />
<LinearLayout android:layout_width="fill_parent" android:layout_centerVertical="true"
android:gravity="center_horizontal" android:layout_height="fill_parent"
android:layout_toLeftOf="@id/btnNext" android:layout_toRightOf="@id/btnBack"
android:orientation="horizontal">
<RelativeLayout android:id="@+id/layRight"
android:layout_width="150dp" android:layout_height="250dp"></RelativeLayout>
<RelativeLayout android:id="@+id/layLeft"
android:layout_width="150dp" android:layout_height="250dp"></RelativeLayout>
</LinearLayout>
</RelativeLayout>
</ScrollView>
精彩评论