Hi Dianne,
Say I wasn't trying to imitate the ProgressBar class but I merely wanted to
know what version of the view class I extend when I *extend View*? I totally
understand and appreciate that ProgressBar has access to private APIs but if
I extend the ProgressBar in the SDK I have a different set of methods to
those available in the source I have from git. I just want to know what
version of ProgressBar is in 1.5-r3.

Many thanks,

Gav

On Wed, Sep 2, 2009 at 5:51 PM, Dianne Hackborn <[email protected]> wrote:

> You very often can't just copy code out of the framework, because it by
> definition has full access to private APIs (since it is also the thing that
> contains the private APIs).  You'll need to make any necessary changes to
> get it to compile cleanly against the SDK.
>
>
> On Wed, Sep 2, 2009 at 3:13 AM, Gavin Aiken <[email protected]>wrote:
>
>> Hey All,
>> I was hoping someone could give me instructions to obtain the *exact *source
>> code for the current SDK. What I have so far is as discussed here;
>>
>>
>> http://androidforums.com/android-developers/1045-source-code-android-jar.html
>>
>> By using commands such as;
>>
>> repo init -u git://android.git.kernel.org/platform/manifest.git -b
>> android-sdk-1.5_r3
>> jar cvf ../android-src.jar -C core/java .
>> ...
>> etc.
>>
>> My issue is that the source is still inconsistent, some extra methods are
>> available and some are not. For example, I want to make a progress bar with
>> two sliders (To select a range) but the version of Progress bar I have;
>>
>>
>> http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/widget/ProgressBar.java<http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/widget/ProgressBar.java;>
>>
>> I cannot mimic (as an initial implementation), despite using the same
>> package and extending View I do not have access to 'mMinWidth' for example.
>> In addition the progress bar uses methods of the class StateListDrawable
>> which are not available in this SDK (e.g. getStateSet(int i)).
>>
>> It's obvious that there's an inconsistency between the source I have and
>> that which was compiled into the android SDK but I don't know why given my
>> GIT repo commands. Can someone link to the version of ProgressBar which was
>> shipped with android-sdk-1.5_r3? Has anyone managed to get the branch which
>> maps directly to this release?
>>
>> This might well be due my inexperience with Git, please let me know if
>> anyone has this set up correctly and I will try again. I seem, in all
>> honesty, to have the head revision still.
>>
>> Thanks in advance!
>>
>> Gavin
>>
>>
>>
>>
>>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> [email protected]
>
> 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.
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to