滚动时如何在数字选择器中显示更多项目/数字,因为它仅显示3个数字。这是我的代码
private bool isListVisible;
void OnTapGestureRecognizerTapped(object sender, EventArgs args)
{
isListVisible = !isListVisible;
listSection.IsVisible = !isListVisible;
}
答案 0 :(得分:1)
我更改了您的代码,请尝试此操作,这会有所帮助
NumberPicker starttime = findViewById(R.id.timeListview);
String[] time = {"12:00 AM", "12:30 AM", "01:00 AM", "01:30 AM", "02:00 AM", "02:30 AM", "03:00 AM","11:00 PM", "11:30 PM"};
starttime.setMinValue(0);
starttime.setMaxValue(time.length-1);
starttime.setDisplayedValues(time);
starttime.setWrapSelectorWheel(true);