screen size of emulator?

by mmkr » Thu, 10 Sep 2009 11:04:56 GMT


Sponsored Links
 Hai,

How can i get the screen size of my emulator?
i used

Display display = ((WindowManager) getSystemService
(Context.WINDOW_SERVICE)).getDefaultDisplay();
        int width = display.getWidth();
        Log.i("width",""+width);

But it gives me different values each time. How to find the exact
value?
--~--~---------~--~----~------------~-------~--~----~



screen size of emulator?

by Dianne Hackborn » Thu, 10 Sep 2009 11:35:54 GMT


 You generally don't, your views get told the size they should be as part of
the view hierarchy layout.  Directly getting the size of the display is not
recommended, because it may have no relation to the actual space your UI has
available (such as if there are other screen decorations around, like a task
switcher or who knows what).






-- 
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. sync error -- local changes

Hi,

I am trying to sync with repo. I have done the sync for last march 5th
(first time). After that I build the source many time and today I
tried to sync with the repo. But I got the local changes error. This
is the error I got when I sync with the repo. Can any one tell me how
to resolve this.

...
....
........
 subcmds/status.py        |   11 ++-
 subcmds/sync.py          |   85 ++++++++++++-----
 subcmds/upload.py        |    3 -
 18 files changed, 919 insertions(+), 127 deletions(-)
 create mode 100644 progress.py
 create mode 100644 subcmds/branches.py
 create mode 100644 subcmds/checkout.py
 create mode 100644 subcmds/grep.py
 create mode 100644 subcmds/manifest.py
info: Restarting repo with latest version
Fetching projects: 100% (114/114), done.
Syncing work tree:  40% (45/112)  error: You have local changes to
'tools_v2/build/make/g++.mk'; cannot switch branches.
andr...@android-desktop:~/mydroid$

Thanks in advance,
rk
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. bottom Tabview

Hi,
       I am  created a Tab view ,in this the tabs are  in top side.
But i  need a tab view which  displays the tabs in the bottom ,can
anybody can give me a code or related link to this one.
--~--~---------~--~----~------------~-------~--~----~

3. Performance test cases

4. Writing PerformanceTestCases

5. SDK 1.5 on VISTA - start emulator with no success

6. Can't use the findViewById() in an second view

7. related scrollbar