How to make scrollview scroll always visible

Asked

Viewed 1,346 times

4

I have a horizontalScrollView and wanted to leave the scroll bar always the display.

           <HorizontalScrollView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="0.5"
            android:id="@+id/horizontalScrollView2" >

            <LinearLayout
                android:orientation="horizontal"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:id="@+id/categoria"
                android:layout_weight="0.5"
                >



            </LinearLayout>
        </HorizontalScrollView>

I have this Horizontalscrollview I put images inside it

imageButton.setImageBitmap(bMap);
imageButton.setId(Integer.parseInt(categorias.get(i).id));
layoutC.addView(imageButton);

works normally when you exceed the screen limit so you can drag to see other images , more was wanting to show the scroll bar , type that is in the browser

  • You only have a slider if what you have inside exceeds the limits on the screen.

  • but she doesn’t keep showing up even if she crossed the line

  • 1

    Put your code there so we can see what’s going on.

1 answer

7


In the XML file, add the code android:fadeScrollbars="false"

Browser other questions tagged

You are not signed in. Login or sign up in order to post.