Compiling against a *REAL* android.jar in eclipse???

by Peter Carpenter » Tue, 28 Apr 2009 10:30:16 GMT


Sponsored Links
 Hello everyone,

 

I'd like to be able to extend classes like View and still have access to
the protected member variables.

Under the standard SDK's, android.jar is only a stub and so access to
the protected member variables is not found.  (And also all classes
tagged as {hide} are hidden)


Does anyone know of an easy way to get around/FIX this without going
linux?

 

Cheers,

 

Peter.


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



Compiling against a *REAL* android.jar in eclipse???

by Peter Carpenter » Tue, 28 Apr 2009 11:14:12 GMT


 Hi Dianne,

 

Thanks for replying.

 

I want to create custom GUI components and access things like
View.mScrollX which has no setFunction (to create a horizontally
scrolling view), and mBGDrawable which does have a set function - but
that does a whole heap of stuff I don't want it to do.

 

Essentially with the second option, I would like to have an image button
using all of the standard background drawables (but hide only the
default standard enabled state image).  I can't find API's that let me
do any of this cleanly.  The only way I can currently find is to
intercept the draw function and hide the background temporarily.  It
would be nicer to be able to either create my own StateListDrawable
using the existing button background drawables (which are not public) or
else have a removeState function in the StateListDrawable.

 

So essentially you are saying I shouldn't be doing this???

 

Cheers,


Peter.

 

________________________________

From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Dianne
Hackborn
Sent: Tuesday, 28 April 2009 1:02 PM
To: android-developers@googlegroups.com
Subject: [android-developers] Re: Compiling against a *REAL* android.jar
in eclipse???

 

Don't do that.  If you aren't writing an app but system code, use the
platform build system.

On Mon, Apr 27, 2009 at 7:29 PM, Peter Carpenter



Hello everyone,

 

I'd like to be able to extend classes like View and still have access to
the protected member variables.

Under the standard SDK's, android.jar is only a stub and so access to
the protected member variables is not found.  (And also all classes
tagged as {hide} are hidden)


Does anyone know of an easy way to get around/FIX this without going
linux?

 

Cheers,

 

Peter.

 

 




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see
and answer them.




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


Sponsored Links


Other Threads

1. When will star the Android Developer Challenge II ?

HI everybody,

I'm a french student in computer science and i miss the first Android
Developer Challenge,

I'm going to receive my G1 Phone in less than a week, and i'd like to
know when the second ADC will start, because all i can see is :
"This contest will launch after the first handsets built on the
platform become available in the second half of 2008"

But we are at the end of 2008 and i really don't want to miss
registrations.

Thanks for the answer, and sorry if i don't speak english that good.

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

2. onProviderEnabled / onProviderDisabled unexpected behavior

When enabling or disabling a provider in settings; it seems to trigger
a disable event for all providers, then an enable event for any
providers that are still checked. Is this the intended behavior? For
example, if network and gps are enabled, and I disable network - I get
this:

12-20 22:12:42.723: DEBUG/GPSgoTo(673): Provider disabled: gps
12-20 22:12:44.273: DEBUG/GPSgoTo(673): Provider disabled: network
12-20 22:12:44.533: DEBUG/GPSgoTo(673): Provider enabled: gps
12-20 22:12:49.563: DEBUG/GPSgoTo(673): Best Provider: gps

I use a message handler to delay figuring out what provider to use for
5 seconds so my app doesn't hang up with all the changes... but
shouldn't this just trigger a single onProviderDisabled("network")?

Does anyone else experience this problem?

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

3. What format is edit_text.xml, and how can I make one?

4. Media Player blocks IO

5. setStrokeCap(Paint.Cap.ROUND) yields square drawPoints()

6. my rotated bitmaps "unrotate" immediately after invoking setCenter() method

7. How to put a Translucent GL View on top of a 2D view?