0

目前水平滚动条只有在用户与之交互时才可见。但我希望滚动条应该一直闪烁,以便用户知道右边有一些项目。我不想让它一直可见。如果有人对此有解决方案,请告诉我。

水平滚动条

<HorizontalScrollView 
        android:id="@+id/featured_horizontal"
        android:layout_below="@id/featured_bar"
        android:layout_marginTop="8dp"

                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content">
4

1 回答 1

0
     Timer timer = new Timer();
        timer.schedule(new TimerTask() {

            @Override
            public void run() {


             runOnUiThread(new Runnable() { 

    @Override 
    public void run() { 
    horScrollViewOG.scrollBy(1, 0); 
    horScrollViewOG.scrollBy(-1, 0); 
    } 
    });
            }
        }, 0, 1000);

Check this, it will scroll the list view programtically, which will display the scroll bar
于 2013-05-02T07:23:46.193 回答