【发布时间】:2017-01-07 19:16:30
【问题描述】:
我正在尝试制作一个可滚动的水平进度条。
因此我将进度条放在水平滚动视图中并将进度条最小宽度设置为 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>
有什么想法吗? 谢谢!
【问题讨论】:
-
创建“可滚动”进度条没什么意义。你需要它做什么?
-
@pskink 我有扩展进度条的自定义进度条,我的滚动条上有标记..你知道如何让它可滚动吗?
标签: android android-progressbar android-scrollbar