Question: In one scenario I have created linear layout inside `HorizontalScrollView` And problem is I am not able to disable its scroll bar I'v tried `scrollbarstyle` ; `scrollbarsize`, `setHorizontalScrollbarEnabled` but none of these method worked?

my xml code is :- 

```
<HorizontalScrollView
        android:id="@+id/horizontal_times"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/divider_one"
        android:layout_marginTop="8dp">

        <LinearLayout
            android:id="@+id/layout_times"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:orientation="horizontal"
            android:padding="16dp" />
    </HorizontalScrollView>`

```

Answer: 
Apply this property to scrollView in xml file.

```
android:scrollbars="none"

```

The following will remove the scrollbar in your scrollview programmatically:

```
HorizontalScrollView horizontalScrollView = (HorizontalScrollView)
                               findViewById(R.id.horizontalScrollView);

horizontalScrollView.setHorizontalScrollBarEnabled(false);

```
This attribute `android:scrollbars` can be used to remove scrollbars

Use the below code for reference

```
<HorizontalScrollView
    android:id="@+id/horizontal_times"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_below="@+id/divider_one"
    android:layout_marginTop="8dp"
    android:scrollbars="none">

    <LinearLayout
        android:id="@+id/layout_times"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:orientation="horizontal"
        android:padding="16dp" />
</HorizontalScrollView>

```