Looping thru interface elements

by gimpsta » Thu, 03 Sep 2009 09:23:11 GMT


Sponsored Links
 This is probably a very "newbie" question as i'm relatively new to the
android sdk, but figured this would be good place to ask.

Say you have a layout with several textviews that all have sequential
IDs (ie, tBox1, tBox2, tBox3, etc).  Is it possible to reference each
box in a loop?  Something like:

do {
iCount++;
View tvBox1 = findViewById(R.id.tBox[iCount]);
}
while (iCount < 10);


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



Looping thru interface elements

by Mark Murphy » Thu, 03 Sep 2009 09:33:34 GMT


 >

You could create a static array of the IDs and iterate over the array.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com 
Android App Developer Books:  http://commonsware.com/books.html 



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


Sponsored Links


Looping thru interface elements

by gimpsta » Thu, 03 Sep 2009 11:05:20 GMT


 Haha I thought of that right after I posted this.  Probably what I
will end up doing for now.

Thanks!



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



Other Threads

1. How often do you read feedback on your own apps?

About the same here.  I like to keep on top of any negatives or problems
that come through so I can address them on my apps website or in the
comments themselves if the app is free.  Great way to build up reputation
with the users that way.

Justin




> 

2. Update #4: Kloteran External Battery 4400mAh - Just Mobile Gum Pro & Gum Plu

List pemesan so far:

*Gum Plus*:
1. Fuad Jauhari
2. iki
3. Chippy
4. Indra S Adillah
5. Arimurti Pramuditta
6. Andremagis
7. Ahmad Fadlah
8. Deska Affif - *Lunas*
9.  Ronny Iskandar - *DP*
10. Maykel Herdianto - *DP*
11. Achmad A Trisatya - *DP*
12. Ketut Rutin - *Lunas*
13. Kusuma - *Lunas*
14. Jonathan
15. Jonathan
16. Geggoh Tinambunan - *DP*
17. Irsan R. - *Lunas*
18. Petrus Gunawan - *DP*
19. Bang Rachmat
20. Iyul Syaaf - *Lunas*
21. Saut Tambunan - *DP*
22. Fahruddin Arrazy
23. Albert Antonio
24. Herman Cahyadi - *Lunas*
25. iLman Ramli - *DP*
26. Anggra
27. Anggra
28. Iwan Gunawan - *DP*
29. Angga Ariansyah - *Lunas*
30. Petrus Suryadi - *DP*
31. Indra Hardani
32. Marcelinus Gozali - *DP*
33. Fahru Razi - *DP*
34. Salugu Widya Utama
35. ?


*Gum Pro*:
1. Budy Wuysang - *Lunas*
2. ?

(kalau ada salah nama atau udah bayar/DP tapi belum di list, silakan japri
ya)

=======================================================
Mau coba masukin battery, barangkali temen2 berminat :)

Sistemnya pre-order yah, jadi barang dipesan dulu (import), perkiraan 5-8
hari sampai di Jakarta (setelah penutupan kloteran).

Informasi produknya bisa dilihat disini:
* *Gum Plus*:
--- Produk: http://www.xtand.net/products/show/productid/9
--- Video: http://www.xtand.net/cms/id/8
--- Review:
http://www.ilounge.com/index.php/reviews/entry/just-mobile-gum-plus-mobile-battery-pack/

* *Gum Pro*:
--- Produk: http://www.xtand.net/products/show/productid/6
--- Review:
http://www.ilounge.com/index.php/reviews/entry/just-mobile-gum-and-gum-pro-portable-usb-power-packs/

Dalam reviewnya yang dipakai demo adalah iPhone, namun battery ini bisa
dipake untuk device apa saja, asalkan devicenya pake koneksi USB untuk
chargingnya.

Harga yang ditawarkan:
- Gum Plus : *Rp 575.000,-* (harga jual diluar kloteran *700rb*)
- Gum Pro : *Rp 475.000,-*  (harga jual diluar kloteran *600rb*)

Temen2 yang berminat cukup *DP 100rb* saja, sisanya dibayarkan setelah
barang sampai di Jakarta.
Pengiriman ke pemesan setelah pembayaran lunas :)
Free ongkos kirim untuk area Jabodetabek & Bandung only (maaf ya, karena
sudah mepet hehehe...)

Untuk pembelian dengan quantity tertentu, atau pemesanan produk Just Mobile
lainnya, silakan japri aja ya :)

Yang berminat silakan japri ke: *deska...@gmail.com*
Kloteran ditutup hari Minggu tanggal *07 Maret 2010* (*23:59 WIB*)

Hari Senin (*08 Maret 2010*) proses importnya.

Thank you....

---------------
Deska Affif
P: 088-1100-GAYA (4292) | Y!: GadgetGaya
www.gadgetgaya.com  |  Gadget Accessories Online Store

-- 
"Indonesian Android Community [id-android]" 

3. Undangan Talk Show di Malang

4. How do I determine in code what language resources are available

5. SDK Targets Not Loading In Eclipse

6. Your Android applications can now use a reliable atomic time source...

7. Your Android applications can now use a reliable atomic time source...