我對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