我有一个搜索栏,每完成1步,总步数为6,就必须更新进度。所以我想知道如何使用代码来实现这一点?
目前,我正在像seekbar.setProgress(1),2等等……但是它无法正常工作,因为我无法定义总步骤。所以请帮帮我。
在布局文件中,设置搜索栏的最大值。
<SeekBar android:layout_width="match_parent" android:layout_height="wrap_content" android:max="6" />