Skip to content

Commit

Permalink
适配Fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
chiemy committed Aug 31, 2014
1 parent 0dcd9ca commit 3068dd1
Show file tree
Hide file tree
Showing 7 changed files with 312 additions and 194 deletions.
55 changes: 30 additions & 25 deletions res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,33 +1,38 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.cviewpager.MainActivity" >

android:layout_height="match_parent" >

<com.example.cviewpager.JellyViewPager
android:id="@+id/myViewPager1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true" >
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/handle"
>

</com.example.cviewpager.JellyViewPager>

<Button
android:id="@+id/preBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
<LinearLayout
android:id="@+id/handle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:onClick="onClick"
android:text="上一页" />
>
<Button
android:id="@+id/preBtn"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:onClick="onClick"
android:text="上一页" />

<Button
android:id="@+id/nextBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:onClick="onClick"
android:text="下一页" />
</RelativeLayout>
<Button
android:id="@+id/nextBtn"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:onClick="onClick"
android:text="下一页" />
</LinearLayout>

</RelativeLayout>
Loading

0 comments on commit 3068dd1

Please sign in to comment.