how do I extract an AttributeSet from an xml file

by Andy Droid » Fri, 04 Sep 2009 09:33:31 GMT

Sponsored Links
 I would like to extend ViewFlipper, so that I can override some of the
functions.  I borrowed some code from the Flipper Demo in Murphy's
Busy Coders book.

I made my own class that extends it, but I have to pass in an
AttributeSet, when I instantiate it.  How do I get that from my xml?

Here is the original code:


Here is my new code:

AttributeSet myAttributeSet  = ??;
myExtendedViewFlipper flipper = new myExtendedViewFlipper ( this,


Other Threads

1. "Sorry, this video is not available." when tapping on an embedded YouTube video from the Android browser

I believe Youtube re-encodes video to the Android-supported format on
its own schedule.  If it hasn't done your video yet, it won't be
available in the Android native player.  I don't know if there is a way
to guarantee that it is re-encoded.


2. problem using softkeyboard with custom views

hi all ,

I am developing an app which can both act as a painting app as well as
text writing notepad.
i have created a my custom view by extending a class like ....

public class MyView extends TextView {

now i want to hook to the system's soft keyboard which i do it by

  InputMethodManager imm = (InputMethodManager)getSystemService

Also i have specified in androidmanifest.xml to use softkeyboard.
i have also specified the inputype of the view and set it as
editable..... but i am not able to do that please help me out i m
badly stuck .please let me know if i am missing anything  .i would
really appreciate if you can send a small code snippet to support the
working code.

Thanks in advance


3. Soft keyboard won't open on custom view in landscape mode?

4. Application Development using C

5. Developing android applications

6. <WTA> about app YM di android...

7. simultaneous video playback and camera record