how to make a view drawable

by Saurav Mukherjee » Fri, 29 May 2009 15:16:53 GMT

Sponsored Links
 i have a custom view on which i have drawn some lines(to represent a grid)
i want to use it as a background to another view!!!


how to make a view drawable

by schwiz » Fri, 29 May 2009 17:31:28 GMT

 in xml its android:background="@drawable/background"
or in the oncreate for your canvas call setBackgroundREsource

i think :)

On May 29, 2:16am, Saurav Mukherjee <>


Sponsored Links

Other Threads

1. R: ADT with eclipse 3.6

Hi Giampaolo!

There are no problems with Helios and ADT 0.9.9.

In Helios use:

in "Help/Install New Software..." section for install the ADT.


Giuseppe Palmeri

--- Sab 6/11/10, Giampaolo Tomassoni <> ha scritto:


2. Drawing views in an AsyncTask

It takes some time to draw my views so I want to put up a progress
dialog while I do it. I set up the code like this:

public class MyActivityClass {

      protected void onCreate(Bundle savedInstanceState) {
          setContentView( R.layout.myView );

        protected void doBuild( Bundle savedInstanceState ){
            ScreenBuilder builder = new ScreenBuilder();

        private class ScreenBuilder extends AsyncTask<Bundle , Integer ,
LinearLayout > {

                protected LinearLayout doInBackground(Bundle... SIS) {
                        LinearLayout topLevelLayout = new
                    doDraw( SIS[0] , topLevelLayout ); // Adds a bunch of
child views
                        return topLevelLayout;
                protected void onPostExecute(LinearLayout topLevelLayout) {

This works the first time through, where savedInstanceState is null.
But when there is a configuration change, like rotation and
savedInstanceState is not null, the dismissDialog call does not work.
The progress dialog remains on the screen. This is true even if doDraw
is stubbed so that I'm not doing anything with the savedInstanceState.

Any ideas why this behavior might occur?


3. AVD suddenly can't reach the internet

4. Icecast client, what's the best approach?

5. unable to dismiss a progress dialog

6. Tomcat on Android

7. Need indocomtech Info---