我正在尝试制作一个可滚动的水平进度条。
因此,我将进度条放在水平滚动视图中并将进度条最小宽度设置为 1000(它是我的屏幕宽度的两倍)。
但我仍然无法滚动滚动条...
XML:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.pkg.pkg2.scrollableprogressbar.MainActivity">
<HorizontalScrollView
android:layout_width="1000dp"
android:layout_height="wrap_content"
android:measureAllChildren="true"
android:background="#e3ece5">
<ProgressBar
style="@android:style/Widget.DeviceDefault.Light.ProgressBar.Horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="visible"
android:id="@+id/progressBar"
android:progress="50"
android:minWidth="1000dp"/>
</HorizontalScrollView>
</LinearLayout>
任何的想法?谢谢!