我有一些類別,如圖1所示。我使用HorizontalScrollView
進行類別滾動,但當滾動滾動進度顯示在文本視圖底部時(顯示在圖片中)。實際上不想要顯示這個,也想要爲左右滾動兩個按鈕(如圖2所示)。我已經搜索了很多,但沒有這樣做,如果你有任何想法,請給我建議。 圖1 在Android中使用TextView自定義HorizontalSctollView
圖2
我有一些類別,如圖1所示。我使用HorizontalScrollView
進行類別滾動,但當滾動滾動進度顯示在文本視圖底部時(顯示在圖片中)。實際上不想要顯示這個,也想要爲左右滾動兩個按鈕(如圖2所示)。我已經搜索了很多,但沒有這樣做,如果你有任何想法,請給我建議。 圖1 在Android中使用TextView自定義HorizontalSctollView
圖2
將這個屬性在HorizontalScrollView
android:scrollbars="none" in your xml file for disable scrollbar as picture 1.
<HorizontalScrollView android:id="@+id/horizontalScroll"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:scrollbars="none" >
嘗試下面的XML的圖片2.解決方案的
<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="match_parent" >
<ImageView android:src="@drawable/ic_launcher"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_alignParentLeft="true"/>
<ImageView android:src="@drawable/ic_launcher"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_alignParentRight="true"/>
<HorizontalScrollView android:id="@+id/horizontalScroll"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:scrollbars="none"
android:fadingEdgeLength="20dp">
</HorizontalScrollView>
</RelativeLayout>
檢查這個link。
試試這個屬性android:scrollbars="none"
,看看它是否工作。 =)
可以刪除滾動條只需在HorizontalScrollView定義書面方式:
android:scrollbars="none"
感謝@Chirag支持其工作,但告訴我一件事無花果2。我們不得不在單擊onleft左滾動顯示文本和右鍵。所以如何做到這一點.. – Dilip
我的問題是不隱藏arrow.I只需滾動點擊數組button.o如果你有任何想法,請建議我 – Dilip
@Dilip檢查我的新鏈接。 –