Android numberpicker锁应用程序
我正在尝试使用android.widget.NumberPicker,但将范围限制为0-5。然而,这似乎导致我的应用程序被锁定。最初,向上/向下按钮不可用,突出显示该框会使一个框出现,但按几次会导致应用程序停止响应Android numberpicker锁应用程序,android,numberpicker,Android,Numberpicker,我正在尝试使用android.widget.NumberPicker,但将范围限制为0-5。然而,这似乎导致我的应用程序被锁定。最初,向上/向下按钮不可用,突出显示该框会使一个框出现,但按几次会导致应用程序停止响应 final NumberPicker numerOnePicker = (NumberPicker) findViewById(R.id.numericOnePicker); numerOnePicker.setMinValue(0); numerO
final NumberPicker numerOnePicker = (NumberPicker) findViewById(R.id.numericOnePicker);
numerOnePicker.setMinValue(0);
numerOnePicker.setMaxValue(4);
XML如下所示:
<LinearLayout android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="horizontal"
android:paddingTop="20dp">
<NumberPicker
android:id="@+id/numericOnePicker"
android:layout_width="55dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical"/>
投票通过,对我来说,只有当我将NumberPicker.setWrapSelectorWheel设置为false时,才会出现这种情况。我从LogCat得到的唯一问题指示是发送的“GC_并发释放”消息流。