dynamically add view to view flipper

by Andy Droid » Sat, 05 Sep 2009 09:38:57 GMT

Sponsored Links
 Trying to dynamically add a view to a ViewFlipper.  I want to extend
ViewFlipper so I can modify it.  Here is the code.  The child does get
added, but it doesn't show up.  Any ideas?  thanks

public class DCMFlipper extends ViewFlipper {

        DCMFlipper(Context context){
                TextView tv = new TextView(context);
                tv.setLayoutParams(new ViewGroup.LayoutParams
                tv.setText("THIS IS A TEST");

dynamically add view to view flipper

by nimph » Sat, 05 Sep 2009 09:50:52 GMT

 Something like this should do it:

     setDisplayedChild(getDisplayedChild() + 1);



Sponsored Links

Other Threads

1. Two questions.

Hi all,

I have two questions, which i would like to learn from you.

1. Is there any stored procedure support in the sqlite database of
Android? and any docs on doing this?

2. Is there any way my Android progam can know the data in the Android
native data set have been changed? like contacts, calllog, and
calendar?  that is, once the data inside the Android native database
have been changed, can my program be notified? and how to do it?

Thank you.



2. Programming The UI

How do you guys find the learning curve for programming the UI?




3. Reg. Updgrade System App from Android Market

4. Android browser cannot automatically submit forms

5. Messaging: Multiple Thread Delete

6. "Discard" button in Compose screen of Google Mail

7. Camera app in Sprint htc phone