Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Custom Time Picker Dialog

$
0
0

Hello,

This code is not working on my device but it works on my device emulator.

Java.Lang.Class classForid = Java.Lang.Class.ForName("com.android.internal.R$id");
Java.Lang.Reflect.Field timePickerField = classForid.GetField("timePicker");

Java.Lang.Reflect.Field field = classForid.GetField("hour");
NumberPicker mHourSpinner = (NumberPicker)FindViewById(field.GetInt(null)); // <- This var is null. Why?

mHourSpinner.MinValue = 0;

mHourSpinner.MaxValue = _displayedHours.Length - 1;
mHourSpinner.SetDisplayedValues(_displayedHours);


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>