Detect rotation of device

by XXL » Tue, 10 Feb 2009 06:40:35 GMT

Sponsored Links
 hi all
is it possible to detect if the device has been rotated?

if it is in horizontal or vertical position? like the WII controller

Thx guys


Detect rotation of device

by XXL » Wed, 11 Feb 2009 01:52:24 GMT

 one more..

if it is possible...
can the rotation be simulated in the programming IDE?

Sponsored Links

Detect rotation of device

by Mark Murphy » Wed, 11 Feb 2009 08:49:47 GMT



Mark Murphy (a Commons Guy) 
Android Training in Sweden -- 


Detect rotation of device

by srajpal » Thu, 12 Feb 2009 00:44:10 GMT

 here is a great set of tutorials that teach you about rotation on the
android system
shows you how to override and detect 


Other Threads

1. Can't debug/install applications into Tablet with Android 2.1 using ADB commands


I have a tablet with Android 2.1 and I'm able to query the device
issuing the adb devices command, for which I get the "0123456789ABCDEF
device" response (serial number and device state).
However, any other command such install, push, pull, or shell, I never
get a response. I mean, after issuing the command, nothing happens
until, after a while, I press ^C and it returns to the Windows Command

Any idea what could be wrong or how to debug what it's happening?



2. ListView and CursorAdapter

I've a problem to populate a listview from a cursor filled from db. I
can't understand why, newView and bindView are not called.
The stupid things is that I've already done this thing other times but
now doesn't work, and I can't undestand where is the problem.

this is my code:

_curAround is filled with a few records.

ListaAdapter rA = new ListaAdapter(this, _curAround, point);
ListView list = (ListView) findViewById(;

public class ListaAdapter extends CursorAdapter {
        private LayoutInflater mInflater;
        GeoPoint _MyPos;
        public ListaAdapter(Context context, Cursor c, GeoPoint mypos) {
                super(context, c);
                mInflater = LayoutInflater.from(context);
                _MyPos = mypos;

        public void bindView(View view, Context context, Cursor cursor) {
                Aggiorna(view, cursor);

        public View newView(Context context, Cursor cursor, ViewGroup parent)
           View v= mInflater.inflate(R.layout.item, null);
           Aggiorna(v, cursor);
           return v;

        void Aggiorna(View v, Cursor cur){
                FarmaCity.MyLog("Lista", "Nome:"+cur.getString(1));
                TextView t = (TextView) v.findViewById(;
                t = (TextView) v.findViewById(;



3. Encrypted JSON

4. Problems with the JavaBinder (!!! FAILED BINDER TRANSACTION!!!)

5. Cross Word Game

6. init: critical process Service Manager exited 4 times in 4 minutes

7. ListView item selected no longer functions with a button in the listviewitem