R.drawable

by nisha.devit » Fri, 16 Oct 2009 20:50:54 GMT


Sponsored Links
 Hi,

How we can store image files(*.png) to the folder R.drawable at runtime?

-- 
Regards,
n!$h

--~--~---------~--~----~------------~-------~--~----~



R.drawable

by Farproc » Sat, 17 Oct 2009 00:09:29 GMT


 It's impossible but you can load an image using BitmapFactury at
runtime.



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. Android Service Problem

I'm new to using Services in Android I followed a tutorial, but the
service doesn't seem to be starting.

the problem I'm having is that the onServiceConnected method never
fires so mpInterface never gets assigned.
However, I can't seem to figure out why I've looked at several
examples and they all seem to be doing exactly what I am. What am I
missing?

INFO:

I'm using SDK v1.5

I'm using Eclipse which finds no errors

showAlert is a simple message box function I use for debugging in the
application

The application basically just needs to play audio files, but needs to
keep playing even if the user is doing other things on their phone (if
there is another way to achieve this I'm all ears)


CODE:

AndroidManifest.xml:

<service android:name=".NSService" />

NSPlayer.java:

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        conn = new CounterServiceConnection();
        this.bindService(new Intent(NSPlayer.this,NSService.class),
conn, Context.BIND_AUTO_CREATE);


......

    private NSSInterface mpInterface;
    private CounterServiceConnection conn;

    class CounterServiceConnection implements ServiceConnection {
        public void onServiceConnected(ComponentName name, IBinder
service) {
                // TODO Auto-generated method stub
                mpInterface = NSSInterface.Stub.asInterface((IBinder)service);
                showAlert("Just so you know","mpInterface was
bound","Ooook!");
        }

        public void onServiceDisconnected(ComponentName name) {
                // TODO Auto-generated method stub
                mpInterface = null;
                showAlert("Just so you know","mpInterface was
UNbound","Ooook!");
        }
    };


--~--~---------~--~----~------------~-------~--~----~

2. Custom Title Not Filling Whole Title Bar (help please)

I'm setting up an app to use a custom title so I can get the proper
logo into the title instead of just text, and to make it clean (since
the logo has a flat black background), I also want the whole title bar
to be black. My xml for the title is a framelayout to hold the logo
inside of a linearlayout to change the background color, and I'm
setting the title in OnCreate() as follows:

        protected void onCreate(Bundle savedInstanceState){
                super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
        setContentView(R.layout.main);
        getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,
R.layout.title);
        }

With this setup, the old gray from the old title bar still exists
around the edge of my custom title. Appears to be on the order of 3-4
px on the bottom and 8-10 px on each side. Any ideas about how to get
the black background to cover the entire area?

Thanks

-Rick

--~--~---------~--~----~------------~-------~--~----~

3. JSONObject .getInt() method doesn't handle a null

4. Eclipse Plugin allows Spaces in String.xml, but generated invalid R.java

5. Gyroscope and Tricorder Sensors in Android

6. G1 Mobile - External 'FREEDOM' QWERTY collapseable bluetooth keyboard

7. Problem using UserTask and AsyncTask