Swapping in and out ViewGroups (Layout) within a container ViewGroup.

by steele johnson » Sat, 31 Jan 2009 06:09:04 GMT


Sponsored Links
 Thanks for the help. I'll check out ViewFlipper.





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



Swapping in and out ViewGroups (Layout) within a container ViewGroup.

by steele johnson » Sat, 31 Jan 2009 06:39:27 GMT


 Hello,
ViewFlipper doesn't help either because I still need to add the layout
dynamically. The problem really comes down to this:

mInnerLayout = (LinearLayout) layout.inflate(
                                        R.layout.multiple_select, 
mContainerLayout);

How can I add mInnerLayout to mContainerLayout after it has been
removed?





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


Sponsored Links


Swapping in and out ViewGroups (Layout) within a container ViewGroup.

by steele johnson » Sat, 31 Jan 2009 06:51:28 GMT


 Ok, I figured it out.

When you use LayoutInflater.inflate(id, root), the return value will
be the inflated xml root if you _didn't_ provide the root, or it will
be the root if you did. To remedy the problem I was having, I simple
passed null for the root and then called mContainerLayout.addView
(mInnerLayout) and it worked. What was happen is that it was returning
the root and I thought it was the inner layout. ;)





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



Other Threads

1. Mainan baru: Nook Color (ebook reader/tablet ecclair)

ga nahan mo nanya :)

layarnya reflective ya - mantulin bayangan dan sinar? resolusinya berapa?
batere bisa berapa awet?

regards,

Bara Putra



2011/2/22 Nicolas Noviyanto <milis10...@gmail.com>


-- 
===============

2. Not recomend to upgrade --- Share : Nexus S setelah 2.3.3

Setelah 2 hari mencoba 2.3.3 di Nexus S saya, saya tidak merekomendasikan
untuk upgrade ke 2.3.3 dari 2.3.2 :(

Yang paling menganggu tentu saja warna yang terditorsi (menurut saya dan
bnyk pengguna lain nya) walau menurut google sendiri warna yang saat ini di
2.3.3 adalah yang sudah benar... *sigh*
Terlampir perbandingan nya, yg 2.3.3 sebelah kanan...

Memory yg cepet bgt kesedot juga agak mengganggu euy :(












jadi

-- 
===============

<<attachment: nexus-s-discolor-550x330.jpg>>

3. Testimoni

4. Galaxy TAB - GPS gak bisa lock

5. [Wtshare] Froyo and gingerbeard x8

6. Multiple TextViews vs Spannable

7. bitmap drawable resource gravity ignored in layer list?