android - EditText with numeric keyboard and comma -
i want have edittextpreference accepts pattern consists of digits, comma , dash. inputfilter works standard keyboard not want standard numeric keyboard. can display digits can typed - dash , comma has no effect. how can have numeric keyboard digits, dash , comma? tried numeric* input types.
inputfilter[] filters = {new valuesinputfilter()}; edittext edittext = ((edittextpreference) findpreference(key)).getedittext(); edittext.setfilters(filters); <edittextpreference android:key="pref" android:inputtype="number" android:summary="%s" />
inputtype phone closest find when implementing this.
the fallback create own numerical keyboard, becomes quite simple it's 10 buttons plus backspace/accept depending on requirements. did when creating pin entry screen banking application.

Comments
Post a Comment