How to run a widget inside of an activity in Android?

Posted by user220755 on Stack Overflow See other posts from Stack Overflow or by user220755
Published on 2010-05-14T06:02:24Z Indexed on 2010/05/14 6:04 UTC
Read the original article Hit count: 171

Filed under:
|
|

I have a widget built to give the user the chance to choose the date (I did not build it, I am building on top of an open source software). Now, I need to display this widget inside of a class that extends the activity class in Android.

Let me show some code.

Let us say this is the activity class:

public class RandomClass extends Activity {

    public void onCreate(Bundle savedInstanceState) 
    {

    // I want to run the widget here when the class is created
    // (the activity is created)    

    }

}

The widget i want to run is a widget that lets the user choose the date. I know I code use one of Android's activities but I need to build on top of the code so I have to run it inside of the activity class I created.

Sorry if this is not clear, ask any questions and i will be more than glad to answer them and clarify.

© Stack Overflow or respective owner

Related posts about android

Related posts about android-sdk