[android-developers] catching a trackball event

2009-03-19 Thread djr
I have tried all day to capture a trackball event in a View. Basically I want to use the trackball to move a Sprite in a 2D game left and right. The onTouchEvent works perfectly well in the View to move the Sprite with my finger but it would be nicer and cleaner to use the trackball. The

[android-developers] Re: Can not install in eclipse

2009-03-30 Thread djr
The best place to go to install the ADT plugin is http://developer.android.com/sdk/1.1_r1/installing.html Go down to Eclipse 3.4 (Ganyamede) section and the site you want to add on is: http://dl-ssl.google.com/android/eclipse/ I don't have good success using the https:... site so use http

[android-developers] Re: How to switch the view from horizontal to Vertical ?

2009-04-02 Thread djr
setRequestedOrientation (ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); or whatever orientation you want. On Apr 2, 1:16 am, Eric zhu.yu...@zte.com.cn wrote: Hi,all How can I change the Android view from horizontal to Vertical by force? Can the view switch dynamicly?

[android-developers] Re: OpenGL What Cube Face Is Facing Me

2009-04-03 Thread djr
You can compute a normal to each face of the cube to determine direction. Here is a URL to the basics of the mathematics (http:// www.geocities.com/SiliconValley/2151/math3d.html). Look for code on the internet that computes normals in 3D. If your mathematics isn't good, this will be a problem.

[android-developers] Re: which layout is good for Quiz application

2009-04-03 Thread djr
Like all of us, you need to just start coding to get a feel for the various layouts and how they work. Without knowing what your quiz questions are going to look like, I've found the most flexible features for quiz like apps is using a table in a relative layout. If your quiz is multiple choice,

[android-developers] Convert accelerometer readings to degrees

2009-04-20 Thread djr
Does anyone know how to convert the accelerometer readings from g's to degrees? For example, if I want to use the x-axis readings and measure the tilt of the phone, flat would be 0g = 0 degrees and a 90 degree tilt to the right would be 1g (9.80665 m/sec^2). I can't come up with a formula for say

[android-developers] Re: running Ubuntu (virtual box) over WinXp

2009-07-29 Thread djr
I develop in Windows, Linux (SUSE 11.0), Parallels, and VirtualBox. The worst experience I have had is with VirtualBox. It seemed to crash on me quite often and I had trouble synching up my G1 with the VirtualBox environment after installing the USB driver. My guess is that I'm doing something