setInputMethod() is missing

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

setInputMethod() is missing

Postby c3r13e12u5 » Fri Oct 10, 2008 3:07 am

anybody can tell me how setInputMethod() was changed on SDK 1.0?
is this method still exists or it has been removed?
is there any way to set EditText only to receive numeric and to limit the number of inputs?

thanks.
c3r13e12u5
Developer
Developer
 
Posts: 28
Joined: Wed Oct 08, 2008 7:33 am

Top

Postby c3r13e12u5 » Mon Oct 13, 2008 11:47 am

I was trying to set limit maximum character on my EditText to 6 by using setInputMethod().
but since its already removed in SDK 1.0, I found another way written by PlusMinus by using setFilters().

setFilters() sample code:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. EditText et = new EditText(context);
  2. InputFilter[] filter = new InputFilter[1];
  3. filter[0] = new InputFilter.LengthFilter(6);
  4. et.setFilters(filter);
Parsed in 0.032 seconds, using GeSHi 1.0.8.4


source: http://www.anddev.org/edit_text_max_limit_charactars-t1925.html

Thanks.
c3r13e12u5
Developer
Developer
 
Posts: 28
Joined: Wed Oct 08, 2008 7:33 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 3 guests