XML レイアウトからNumberPickerの最小値、最大値、およびデフォルト値を設定する方法はありますか?
私はアクティビティコード内からそれをやっています:
np = (NumberPicker) findViewById(R.id.np);
np.setMaxValue(120);
np.setMinValue(0);
np.setValue(30);
XML は、動作ではなくプロパティを定義するため、明らかにより適切です。
XML レイアウトを使用してこれらを設定する方法はありますか?