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. Regd: difference between protool buffer implementations

Hello,

Can someone please clarify the difference between the standard protocol
buffer implementation (com.google.protobuf) and the one used in android
framework (com.google.common.io.protocol).

1) Are these any different?

2) Since there seems to be no "protoc" for the android framework
implementation, what is the procedure to use this implementation?

3) Will Protocol buffers created using one implementation, not work with the
other and vice versa?

Greatly appreciate your feedback.

Regards,
Rahul Prasad

-- 

2. how can a widget use my own custom View ? for example " com.yulong.launcher.website.LinearLayout "



You cannot use custom Views in app widgets.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android App Developer Books: http://commonsware.com/books

-- 

3. how can a widget use my own custom View ? for example " com.yulong.launcher.website.LinearLayout "

4. Gaming on android - somewhat disappointing...

5. intercept an outgoing call

6. downloading a file programatically

7. How to build apk from multiple Eclipse projects?