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. Detecting hiding of android keyboard

I've got an application where a button can be used to display the
onscreen keyboard (so that the user can interact with the

The button is positioned on top of a SurfaceView and when the button
is pressed the onscreen keyboard is displayed and the button is

I'm trying to determine whether there is an easier way to detect the
keyboard being hidden (so that I can redisplay the button) other than
looking for size changes in the SurfaceView.  Looking for size changes
and then searching for the keyboard is clunky.


2. Demo App


I want to release a demo version of my app.

I added a restriction that the app could only be used 5 times by
storing a counter in the db.

However a user can easily uninstall and install the demo again!

What the best way to manage this?


3. How to fix "Failed to connect to VOLD"

4. Getting the time of the outbound calls

5. GpsStatus

6. Make an "Emergency Call"

7. Router IP and Mac address