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. FAQ; Action listener on TEXT VIEW


how can i put action listener on textview plz detail tell me

Ali Murtaza

Research Assistant
Data Virtulization Ware House
PUCIT, Lahore, Pakistan


2. The public key in the certificate cannot be used for ENCRYPT_MODE


I am trying to establish a SSL connection and send messages using it.
I use MINA for this however i get the following error:

Caused by: java.security.InvalidKeyException: The public key in the
certificate cannot be used for ENCRYPT_MODE
     at javax.crypto.Cipher.init(Cipher.java:815)
     at javax.crypto.Cipher.init(Cipher.java:747)

I found out in the Cipher class that this exception is thrown if I
want to use the certificate for encryption and the certificate has set
extension "critical" but doesn't have extension "encipherOnly".

I tried both - removing extension critical and setting it together
with encipherOnly for the key that I am using. Both throw the same
exception.Even though it doesnt make any sense.

Interesting is that the same key works on my java server running on
windows machine. Isn't it possible that there is some bug in android
that is causing this? Is there any workaround for this?

Thank you



3. FAQ: On fields and text

4. Removing application shortcut from Home

5. how to add progress bar with media Player??????

6. Making a Skype Call

7. listen for changes made in ContactMethod table