不確定から水平方向の進行状況を示すバーに変更しようとしていますが、未確定部分がうまく動作しない場合はプログレスバーが機能しません。Android水平方向の確定ProgressBarが実行されていません
動きがないと表示されます。 私を助けてください。
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/check"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<ProgressBar
android:id="@+id/my_progressBar"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:indeterminate="false"
android:max="100"
android:progress="10"/>
</LinearLayout>
</android.support.design.widget.CoordinatorLayout>
と私はMainActivity.javaに次を追加しました:
ProgressBar progressBar = (ProgressBar) findViewById(R.id.my_progressBar);
progressBar.setProgress(20);
進捗状況は20で開始され、増加しませんか? – Diekrul
@Diekrulはいそれはそこにとどまり、増加しません – user3518835