EditText android:numeric attribute in Java

by Aldo Culquicondor » Wed, 22 Dec 2010 06:47:33 GMT


Sponsored Links
 Hi everybody:
I need to create EditText views dynamically, so i can't use XML, i
have to use Java.
The problem is that this EditText might worked just with numbers
(float), I mean, in XML it should have set the android:numeric
attribute like this:
android:numeric="integer|signed|decimal"
How do i do the same in java?

I think this is related with the setKeyListener() method, but i don't
know what to put as argument.

Thanks a lot...

-- 



Re: EditText android:numeric attribute in Java

by TreKing » Wed, 22 Dec 2010 12:46:12 GMT


 




Try:
 http://developer.android.com/reference/android/widget/TextView.html #setRawInputType(int)

 http://developer.android.com/reference/android/text/InputType.html #TYPE_CLASS_NUMBER
< http://developer.android.com/reference/android/text/InputType.html #TYPE_CLASS_NUMBER>
 http://developer.android.com/reference/android/text/InputType.html #TYPE_NUMBER_FLAG_SIGNED
< http://developer.android.com/reference/android/text/InputType.html #TYPE_NUMBER_FLAG_SIGNED>
 http://developer.android.com/reference/android/text/InputType.html #TYPE_NUMBER_FLAG_DECIMAL

-------------------------------------------------------------------------------------------------
TreKing < http://sites.google.com/site/rezmobileapps/treking> ; - Chicago
transit tracking app for Android-powered devices

-- 


Sponsored Links


Other Threads

1. Trik mengetik Cepat, minimal error di Android Phone

To All :

1.  Pake betterkeyboard > pregreen skin. (tak perlu T9)

2.  Cara mengetik dengan sedikit menslide tombol huruf.

regards,

Rudi W

--~--~---------~--~----~------------~-------~--~----~

2. Serat optik bawah laut Google, Solusinya, Google Voice di ponsel android

Dulu sempat muncul beritanya di detikinet. Tapi saya cari2 kok gak nemu lagi
yah. Tapi ada beberapa sumber lain nih soal itu.
http://www.fiberoptics4sale.com/wordpress/google-to-build-high-bandwidth-subsea-fiber-optic-cable-linking-the-united-states-and-japan/114/

<http://www.fiberoptics4sale.com/wordpress/google-to-build-high-bandwidth-subsea-fiber-optic-cable-linking-the-united-states-and-japan/114/>
http://www.usatoday.com/tech/world/2008-02-26-google-broadband-cable_N.htm

<http://www.usatoday.com/tech/world/2008-02-26-google-broadband-cable_N.htm>Dan
dari awal pembangunan fiber network itu memang sudah membuat cemas AT & T.
http://valleywag.gawker.com/302520/googles-fiber+optic-plans-spur-new-phone-talk


<http://valleywag.gawker.com/302520/googles-fiber+optic-plans-spur-new-phone-talk>
Regards,
Paulus T.

2009/8/14 Agus Hamonangan <agus.hamonan...@gmail.com>

> 

3. Using Android Phone, Feel like this.

4. Mo surfing dulu ahk, ikut Tjandra naek ojek Semarang - Jakarta, ampe ketinggalan berita terbaru

5. Ramalan Mama Lorens

6. Try it !

7. Befuddled about how to run Android program in emulator