プログレスバーを設計して実装したい。しかし、私にはいくつかの問題があります。
このような私の進行状況バーのレイアウト
<ProgressBar
android:id="@+id/progress1"
style="@android:style/Widget.ProgressBar.Horizontal"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="5dp"
android:max="100"
android:maxHeight="5sp"
android:progress="45" />
MyActivity.java
ProgressBar pb1 = (ProgressBar) findViewById(R.id.progress1);
私の問題は約android:max
です。ユーザーの選択でそれを変更する方法はありますか。たとえば、ユーザーは最大値を 1500 に設定したいと思うかもしれません。プレーンテキストでやりたい。(ユーザーは自分の値をプレーン テキストに入力する必要があります)。
Java側でどのように実装できますか?