Hi, I'm currently making a SDK for a payment gateway, however I'm having some problems.
The project setup is supposed to be: *Library Project* DAO Classe SDK Server connectivity class *Application* UI Using the above Library project And from the library project I want to send some images (drawables) for example images for what credit cards are available for the payment. These credit cards can change depending on different settings so they need to be sent dynamically to the application using the SDK. I'm currently importing the library project by selecting the library project under properties in Eclipse (I need to do it with a Jar or something to make it closed source but one problem at a time). Now the problem I get is that I get a NullPointerException when I try to set the drawable from the SDK to an ImageView in the app. Here's some code: DAO Class from the SDK (this class extends Application): > case (MASTERCARD): > this._logo = getResources().getDrawable(R.drawable.mastercard_securecode); > break; This is in the constructor. And then there's a simple getter method to access the _logo varible, which is a Drawable. The R.drawable i refer to is a ressource located in the Library Projects res folder. In the application I then want to be able to do something like: > ImageView img = (ImageView) findViewById(R.id.imageView); img.setImageDrawable( DAOObjet.getLogo() ); So that whoever implements the SDK is able to decide how the UI should be implemented. However doing it this way I'm as said getting a NullPointerException on the line that serves the Drawable from the SDK (eg the line quoted above in the switch/case statement). I have a feeling I'm loading the ressource in a completely wrong way, but I dont know. Could someone assist me with this? That would be much appreciated! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en