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:

flipper=(ViewFlipper)findViewById(R.id.details);


Here is my new code:

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


thanks
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. how to draw objects in openGl with delay

Hi,

I want to draw say some squares after delay,ie if i need to draw 3
squares,i should get the square1 first,then after some delay square 2
second and so on.I used thread.sleep(msec),but what I get is , i get
all the three squares after the delay specified,i use something like
this:

                                gl.glPushMatrix();
                gl.glTranslatef(1.0f, 1.8f, 0);
                object.draw(gl);
                square.update();
                gl.glPopMatrix();
                try{
thread.sleep(100);
}
catch
{
s.o.p("_");
}

                gl.glPushMatrix();
                gl.glTranslatef(.2f, .8f, 0);
                square.draw(gl);

                ..............................so on

Can somebody help please???

-- 

2. widget doesn't fresh on verizon droid, but works fine on HTC eris.

What you should look for:
If you use a background service, check Logcat for something like
"Process <YourWidgetService> (pid <...>) has died" to see if the OS is
pulling the plug on your widget's background service.




> 

3. Change the playback rate of a track in real time

4. Listening for Bluetooth events and AVRCP profile

5. Cara mematikan cell info display Spica

6. (HELP) Semua aplikasi jd force close

7. Could I skip the droiddoc make to minimize the build time?how to?