2012-09-14 127 views
0

我有一個水平滾動視圖內的選項卡小部件。我遇到的問題是,當我通過滾動視圖滾動時,選項卡窗口小部件中的當前選項卡更改,並且由於執行此ontabchange事件處理程序。水平滾動視圖滾動更改選項卡焦點

要停止這一點,我試圖處理scrollview滾動選項卡並返回true的ontouchevent。但不能很好地做到這一點。

有人可以幫忙嗎?

在此先感謝!

+0

退房這一點。 http://stackoverflow.com/questions/8035817/horizo​​ntalscrollview-inside-listview-minor-vertical-scroll-stops-horizo​​ntal-scr – Shiva

+0

我切換到福爾摩斯這解決了我的所有問題採取行動吧:) –

回答

0

試試這個選項卡中的XML

<HorizontalScrollView 
    android:layout_width="fill_parent" 
    android:layout_height="200dp"> 

    <LinearLayout 
     android:layout_width="wrap_content" 
     android:layout_height="200dp" 
     android:orientation="horizontal"> 

     <ImageView 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:src="@drawable/src" /> 

    </LinearLayout> 
</HorizontalScrollView>