title: Building an android library and passing the client's R.java when making the library call, how?
body: <p>I would like to build a library and be able to distribute it as a jar without having to give the source. In the library, layouts are used for specifying the UI, however android doesn't seem to facilitate easily bundling a jar and distributing it, as it doesn't properly scope the resources (anything in '/res/*') in this jar file, the references made with R.xxxx within the jar don't work. 
  I can give the xml layouts and other resources to the client and ask them to put them into their resources directory, thus their R.java would have these references, now, how can the client pass this R.java to the library when invoking a method in the library? 
  Guess, answer to part of the question would be through answer to 'How to pass class in java?" 
  Yes, I am new to android and java too.</p>
  
  <p>Thanks,
  Krishna</p>