如何以编程方式更新搜寻栏?

问题描述 投票:-1回答:1

我有一个搜索栏,每完成1步,总步数为6,就必须更新进度。所以我想知道如何使用代码来实现这一点?

目前,我正在像seekbar.setProgress(1),2等等……但是它无法正常工作,因为我无法定义总步骤。所以请帮帮我。

android android-seekbar
1个回答
0
投票

在布局文件中,设置搜索栏的最大值。

  <SeekBar
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:max="6"
    />
© www.soinside.com 2019 - 2024. All rights reserved.