如何使这样的搜寻具有阶段和对其移动的行动作出回应
答案 0 :(得分:1)
可以使用android进度条加载,你可以在这里使用文档, https://developer.android.com/reference/android/widget/ProgressBar.html。根据这些代码在这里,
public class MyActivity extends Activity {
private static final int PROGRESS = 0x1;
private ProgressBar mProgress;
private int mProgressStatus = 0;
private Handler mHandler = new Handler();
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.progressbar_activity);
mProgress = (ProgressBar) findViewById(R.id.progress_bar);
// Start lengthy operation in a background thread
new Thread(new Runnable() {
public void run() {
while (mProgressStatus < 100) {
mProgressStatus = doWork();
// Update the progress bar
mHandler.post(new Runnable() {
public void run() {
mProgress.setProgress(mProgressStatus);
}
});
}
}
}).start();
}
}
答案 1 :(得分:0)
我希望这是你一直在寻找的东西
https://material.google.com/components/steppers.html
您可以使用此库来满足您的要求 https://github.com/shivasurya/materialsteppers