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


 


<Ctrl>-<F12>

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com 
Android Training in Sweden --  http://www.sotrium.com/training.php 

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



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

 http://androidguys.com/?tag=android-rotation 





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



Other Threads

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

Hi:

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
prompt.

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

Thanks;
Gus

-- 

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(R.id.lvLista);
list.setAdapter(rA);



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;
        }

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

        @Override
        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(R.id.tvNome);
                t.setText(cur.getString(1));/*
                t = (TextView) v.findViewById(R.id.tvIndirizzo);
                t.setText(cur.getString(2));
        }

}

-- 

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