what is ORIENTATION_SQUARE ?

by a a » Mon, 02 May 2011 08:39:53 GMT


Sponsored Links
 Dear all,

landscape, portrait, square.

public static final int ORIENTATION_LANDSCAPE
Since: API Level 1
Constant Value: 2 (0x00000002)
public static final int ORIENTATION_PORTRAIT
Since: API Level 1
Constant Value: 1 (0x00000001)
public static final int ORIENTATION_SQUARE


I can't imagine why square exist in the world? I never seen the phone
is a square screen, which height equal weight.

Can we necessary always to judge is it a square? If it exist, how can
we judge it's a landscape or portrait?

-- 



Re: what is ORIENTATION_SQUARE ?

by Dianne Hackborn » Mon, 02 May 2011 10:25:04 GMT


 It is not currently used, don't worry about it.







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

-- 


Sponsored Links


Other Threads

1. unzip

Hi,
I am trying to unzip a standard zip file.  I have copied a couple
standard java unzip classes from web searches but each time it creates
a JRE parsing error.  Does anyone have ideas on what is wrong or how I
can do differently?

Thanks,
Bob

Error:

# An unexpected error has been detected by Java Runtime Environment:
#
#  Internal Error (classFileParser.cpp:2924), pid=3624, tid=6748
#  Error: ShouldNotReachHere()
#
# Java VM: Java HotSpot(TM) Client VM (10.0-b23 mixed mode windows-
x86)
# An error report file with more information is saved as:
# G:\TestWebView\hs_err_pid3624.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp


Code:
public class Unzip
{
  public static void main(String[] args)
  {
    if (args.length != 1) {
      System.out.println("Usage: java Unzip zipfile");
      System.exit(1);
    }
    try {
      byte[] buf = new byte[4096];
      ZipInputStream in = new ZipInputStream(
                          new FileInputStream(args[0]));
      while (true) {
        //Nchsten Eintrag lesen
        ZipEntry entry = in.getNextEntry();
        if (entry == null) {
          break;
        }
        //Beschreibung ausgeben
        System.out.println(
          entry.getName() +
          " (" + entry.getCompressedSize() + "/" +
          entry.getSize() + ")"
        );
        //Ausgabedatei erzeugen
        FileOutputStream out = new FileOutputStream(
          entry.getName()
        );
        int len;
        while ((len = in.read(buf)) > 0) {
          out.write(buf, 0, len);
        }
        out.close();
        //Eintrag schlieen
        in.closeEntry();
      }
      in.close();
    } catch (IOException e) {
      System.err.println(e.toString());
    }
  }
}



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

2. help about SMS BroadcastReceiver conflict with GPS LOCATION_SERVICE

code is here:
public void onReceive(Context context, Intent intent)
{
                LocationManager lm = (LocationManager) context.getSystemService
(Context.LOCATION_SERVICE);

                loc = lm.getLastKnownLocation("gps").toString();

                PendingIntent dummyEvent = PendingIntent.getBroadcast(context, 
0,
new Intent("com.xxx.xxx.IGNORE_ME"), 0);
                mng.sendTextMessage(addr, null, loc, dummyEvent, dummyEvent);

}

the problem is:
sendTextMessage work well when the two above line is commented. but
when the two line is uncommented, sendTextMessage will trigger a null
point exception!
I think this issue is because the first line
(context.getSystemService) modify the state of "context".
so , can anyone help me?

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

3. execute unix command from an android app

4. Pick multiple contacts from the contacts application

5. SAXParser fails on some RSS feeds

6. what happened to Logcat inside eclipse?

7. The process...stopped unexpectedly. Please try again