我对Android开发颇为陌生,而我完全被难以理解的东西所困扰,这可能是一个非常简单的过程。HorizontalScrollView无法在仿真器上工作
我已经设置了一个水平滚动视图,其中包含一系列ImageViews
(充当按钮),位于linearlayout
内。但是,当我在模拟器上运行该项目只有第一个imageview
是易变的,我不能通过其他图像水平滚动
我搜索extensivley网络找到解决方案,但没有运气。
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
>
<HorizontalScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
>
<ImageView
android:id="@+id/cookanegg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:src="@drawable/cookanegg"
android:text="@string/button_1"
android:textSize="25dp"
android:textStyle="bold" />
<ImageView
android:id="@+id/cheffytips"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/button_2"
android:textSize="25dp"
android:textStyle="@drawable/chefstips" />
<ImageView
android:id="@+id/settings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/button_3"
android:textSize="25dp"
android:textStyle="@drawable/settings" />
</LinearLayout>
</HorizontalScrollView>
正是我缺少什么?
任何帮助将大规模赞赏!
非常感谢,
哈里森
为什么不使用图库呢? – fiddler 2012-07-16 12:05:36
@AndroSelva比y水平ScrollView存在吗?我已经完成水平ScrollView – Aamirkhan 2012-07-16 12:12:25