The link is to the web interface to the official public repository. You can use it to browse through all of the source there. It starts here with a list of all of the projects:
http://android.git.kernel.org/ Most of the Android-specific Java frameworks are in the "frameworks/base" project: http://android.git.kernel.org/?p=platform/frameworks/base.git;a=summary On Fri, Dec 18, 2009 at 6:43 PM, Brion Emde <[email protected]> wrote: > Hi Dianne, > > You give a link to Android source code here. I'm still pretty new and > haven't found a central resource to look at source code. > > Now it seems that there must be such, as you have just "given some > away". > > I'm on Windows, which apparently makes me unable to actually clone the > Git tree and look at it directly. > > Is there something I'm missing that you could point me to that would > let me examine the source and tests? > > Thank you > > On Dec 18, 5:24 pm, Dianne Hackborn <[email protected]> wrote: > > You might want to use this: > > > > http://developer.android.com/reference/android/view/OrientationEventL... > > > > If it doesn't exactly serve your needs, just copy the code into your own > app > > and tweak as desired: > > > > http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;... > > > > For example there is a much more specialized version of this that the > window > > manager uses for rotating the screen: > > > > http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;... > > > > On Fri, Dec 18, 2009 at 10:50 AM, Mark Wyszomierski <[email protected] > >wrote: > > > > > > > > > > > > > Hi, > > > > > I'm trying to detect landscape vs portrait orientation with the > > > following: > > > > > public void onSensorChanged(SensorEvent event) { > > > float pitch = event.values[2]; > > > if (pitch <= 45 && pitch >= -45) { > > > // portrait > > > } > > > else if (pitch < -45) { > > > // landscape > > > } > > > else if (pitch > 45) { > > > // landscape > > > } > > > } > > > > > anyone have something more robust? It works pretty well, except if the > > > phone is in a landscape orientation, and the user starts to 'flatten' > > > it out, starts thinking it's in the portrait orientation again, > > > > > Thanks > > > > > -- > > > 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]<android-developers%[email protected]><android-developers%2Bunsubs > [email protected]> > > > For more options, visit this group at > > >http://groups.google.com/group/android-developers?hl=en > > > > -- > > 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. > -- 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

