Note that there are some explanatory texts on larger screens.

plurals
  1. POusing R.drawable in titanium module for android
    text
    copied!<p>I am trying to create a module (native service for android) so that my appcelerator application can launch the native service. The service is running fine, and it creates a relativeLayout a system_overlay I am able to set that relativeLayout's background color, but ultimately i want to set its backgroundImage. I have a png that i want to use for that background named: bg_noti</p> <p>I have tried to do so in my native service class (inside the module project) like so: </p> <pre><code>String bg_name ="android.R.drawble.bg_noti"; try { notificationBar.setBackgroundResource(TiRHelper.getApplicationResource(bg_name)); } catch (ResourceNotFoundException e) { // TODO Auto-generated catch block Log.v(":::::::::::", "EXCEPTION:"+e); e.printStackTrace(); } </code></pre> <p>my understanding is that i need to place the png somewhere in the Titanium app project, but no matter where i put it it doesn't seem to make its way into the compiled app..</p> <p>i always get the exception that the resource is NOT found.</p> <p>i was following the example found here: <a href="http://developer.appcelerator.com/question/49671/android-r-references-in-appcelerator-module" rel="nofollow">http://developer.appcelerator.com/question/49671/android-r-references-in-appcelerator-module</a></p> <p>but they say to place the image in $APP_DIR/platform/android/res directory which doesn't exist.. i tried just creating it... but still doesn't work..</p> <p>can someone please inform me as to where i am actually suppose to place this image in the titanium app project so that the module can reference it.. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload