我有一个看起来像这样的菜单http://flashspeaksactionscript.com/wp-content/uploads/2008/06/vert-menu18.jpg考虑到child
图片中的“3”,我希望能够刷一下“3”向左看能看到另一个项目。
这是我的xml代码:
<LinearLayout
android:id="@+id/llayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="45dp" >
<Button
android:id="@+id/Sum"
style="@style/SummaryButtons"
android:layout_width="100dp"
android:layout_height="100dp"
android:text="Item 1" />
<Button
android:id="@+id/nana"
style="@style/SummaryButtons"
android:layout_width="100dp"
android:layout_height="100dp"
android:text="Item 1" />
<Button
android:id="@+id/mama"
style="@style/SummaryButtons"
android:layout_width="100dp"
android:layout_height="100dp"
android:text="Item 1" />
</LinearLayout>
<LinearLayout
android:id="@+id/example_get_by_id"
android:layout_width
等等。这些是孩子们。例如,我希望能够滑动浏览这些按钮,只是因为我无法使用HorizontalScrollView
,因为我的应用程序由片段组成,并且已经具有浏览片段的滑动能力。这些片段的滑动功能并HorizontalScrollView
混合在一起,这就是为什么我需要能够Viewpager
用于单个项目而不是整个页面的原因。至少有一个例子吗?我什么也找不到。提前致谢。