簡體   English   中英

水平滾動視圖滾動更改選項卡焦點

[英]Horizontal scrollview scroll changes tab focus

我在水平scrollview中有一個選項卡小部件。 我有的問題是,當我在滾動視圖中滾動時,選項卡小部件中的當前選項卡會更改,並且因為執行了此ontabchange事件處理程序。

為了阻止這個,我試圖處理滾動視圖的ontouchevent,它滾動選項卡並返回true。 但不能完全做到這一點。

有人可以幫忙嗎?

提前致謝!

在選項卡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>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM