0
나는 두 numberpickersfloat 값에서 두 NumberPickers setValue에하는 방법을
이NumberPicker np1 = (NumberPicker)container.findViewById(R.id.np1);
NumberPicker np2 = (NumberPicker)container.findViewById(R.id.np2);
예 : enter image description here
이 :
String sValue = np1.getValue() + "." + np2.getValue();
textView.settext(sValue);
예 60.5에 대한 대가
하지만 난 float 값을 다시 입력하는 방법을 알 수 없음
to 내 두 개의 numberPickers. 도와주세요. 당신의 숫자는 1 소수점이있을 것이다
감사합니다! 나는 안드로이드에 대한 의미. 하지만 당신의 대답이 나를 도왔습니다. float f = 60.5f; int left = (int) f; float f1 = (f - (float) left) * 10; int right = (int) f1; – Timweb