Please do not inflate anything in com.android
. You have no idea whether that exists on any given Android device. Please note that the StackOverflow question and answer you cited is from 2009, which is very old for Android advice.
NumberPicker
was added to the Android SDK back in API Level 11. Here is one backport of it to older devices, though it is not currently maintained.