Portrait/Landscape mode

by UJ » Wed, 01 Apr 2009 02:23:52 GMT


Sponsored Links
 Hello folks,

When we try to implement orientation in AP layer,
we can set "android:screenOrientation" parameter in
AndroidManifest.xml file or call "setRequestOrientation()" method of
Activity class.

Can every experts tell me when I set the
"android:screenOrientation" parameter, which process will read this
configuration, pass to where and which process will do the rotation
(maybe graphic driver?)

Please give me some tips how to trace this flow.

Thanks everybody.
UJ




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



Portrait/Landscape mode

by Jean-Baptiste Queru » Wed, 01 Apr 2009 02:34:11 GMT


 What are you trying to achieve?

JBQ






-- 
Jean-Baptiste M. "JBQ" Queru
Android Engineer, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

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


Sponsored Links


Portrait/Landscape mode

by Dianne Hackborn » Wed, 01 Apr 2009 05:26:06 GMT


 I am starting to get tired of this question. :/  You can look at
ActivityManagerService, WindowManagerService, and PhoneWindowManager (and
down in to SurfaceFlinger if desired) to see the involved code.






-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

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.

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



Portrait/Landscape mode

by UJ » Wed, 01 Apr 2009 07:44:10 GMT


 Thanks your reply. =)

I want to know if I need to modified graphic driver in my new device.
I want to do display rotation on other x86 platform.
I can boot up the android OS, but I cannot rotate my application >.<

In android emulator, I find some codes in "goldfish_fb.c" seems to do
the display rotation.

So, the SurfaceFlinger will call graphic driver to do the display
rotation?





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



Portrait/Landscape mode

by Jean-Baptiste Queru » Wed, 01 Apr 2009 12:56:45 GMT


 You're in the wrong group. This question belongs in android-porting.

JBQ

2009/4/1 UJ <ujhu...@gmail.com>:





-- 
Jean-Baptiste M. "JBQ" Queru
Android Engineer, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

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



Other Threads

1. How to update the UI from service

Need service wich retrive data by http and then return them to
activity for update list view. How i can do this. I don't know return
retrived data. Please help.

public class RequestService extends Service {

    private NotificationManager nm;
    private Timer timer;
    public static final long POLL_INTERVAL = 15000;
    public static final long DELAY_EXECUTION = 500;

    private static Occ MAIN_ACTIVITY;

    private static final String TAG =
RequestService.class.getSimpleName();

        private TimerTask task = new TimerTask(){
        @Override
        public void run()
        {
                refreshRequests();
        }
    };

    @Override
    public void onCreate() {
        this.timer = new Timer();
        this.timer.schedule(this.task, RequestService.DELAY_EXECUTION,
RequestService.POLL_INTERVAL);
        this.nm = (NotificationManager) getSystemService
(Context.NOTIFICATION_SERVICE);
    }

    public String getInputSream(String uri)
    {
        String myString = null;
        try{
          URL url = new URL(uri);

          URLConnection urlConn = url.openConnection();

          InputStream is = urlConn.getInputStream();
          BufferedInputStream bis = new BufferedInputStream(is);

          ByteArrayBuffer baf = new ByteArrayBuffer(50);
          int current = 0;
          while((current = bis.read()) != -1){
                baf.append((byte)current);
          }

          myString = new String(baf.toByteArray());

        }catch(Exception e){
           return null;
        }
        return myString;
    }

    private void refreshRequests()
    {
        Prefs pref = new Prefs(this.getBaseContext());
        String response = this.getInputSream(pref.getServer().concat("?
action=request"));
        try {
            SAXParserFactory spf = SAXParserFactory.newInstance();
            SAXParser sp = spf.newSAXParser();
            XMLReader xr = sp.getXMLReader();
            RequestHandler handler = new RequestHandler
(this.getBaseContext(), null);
            xr.setContentHandler(handler);
            xr.parse(new InputSource(new StringReader(response)));
            List<Request> requests = handler.getRequests();
            .....
            .....
        } catch (Exception e) {
            Log.e(TAG, " " + TAG + " ERROR - " + e);
        }
    }
}

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

2. color lookup table

Hi,

Does android use a color look up table ? if yes I wanted to see the
entries in color lookup table and access them. Anybodies has any
ideas. I am very new to android sorry if this looks like a silly
question.

Regards,
Ace
--~--~---------~--~----~------------~-------~--~----~

3. How to turn off camera sound on G1?

4. reduce list view font size

5. ADC deadline drawing near

6. Upload a valid APK ADC2

7. Questions about ImageView.setImageMatrix