Screen density & screen layout size

by Chopcsu » Mon, 14 Dec 2009 08:34:51 GMT


Sponsored Links
 Hi,

I am having problems getting Android to use the correct resources.

I am trying to have it pick the correct resources across all densitys
and screen layouts & orientations.

So I have created the directory structure as follows


drawable
drawable-large
drawable-large-land
drawable-large-port
drawable-normal-hdpi
drawable-normal-mdpi
drawable-normal-ldpi
drawable-normal-land-hdpi
drawable-normal-land-mdpi
drawable-normal-land-ldpi
drawable-normal-port-hdpi
drawable-normal-port-mdpi
drawable-normal-port-ldpi
drawable-small
drawable-small-land
drawable-small-port

Since large screen layouts are always hi res screens (480x800,480x848)
and small screen layouts are always lowres(240x320,240x400 etc) i did
not include density descriptions in the directory naming.
And likewise since normal can be low,medium of high resolution
screens, I have included all the different density markers.

I am not sure if android likes me naming the directories like this
since when I load up the normal 320x480 screen,
It is selecting Hi-res resources and down-scaling them. I can see
nowhere in documentation that says this is what it will do so im am
quite confussed as this is what it seems like it is doing.

I am using

 <supports-screens
          android:largeScreens="true"
          android:normalScreens="true"
          android:smallScreens="true"
          android:anyDensity="true" />

Yet I am positive it is resizing the resources automatically for me.
Testing with 2.0 emulators.

When using the WVGA emulators, it uses the hdpi resources unscaled,
when using the 320x480 emulator, it is using the hdpi resources down-
scaled.

Any ideas on where I am going wrong?


--



Other Threads

1. problem downloading Android from windows

bash-3.2$ ../myRepo/repo init -u git://android.git.kernel.org/platform/manifest
.git
Traceback (most recent call last):
  File "../myRepo/repo", line 587, in <module>
    main(sys.argv[1:])
  File "../myRepo/repo", line 554, in main
    _Init(args)
  File "../myRepo/repo", line 173, in _Init
    _CheckGitVersion()
  File "../myRepo/repo", line 202, in _CheckGitVersion
    proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
  File "/cygdrive/c/cygwin/lib/python2.5/subprocess.py", line 593, in
__init__
    errread, errwrite)
  File "/cygdrive/c/cygwin/lib/python2.5/subprocess.py", line 1079, in
_execute_
child
    raise child_exception
OSError: [Errno 2] No such file or directory

Has anyone seen this before &&/|| know how to fix it?

Thanks much.

Paul
--~--~---------~--~----~------------~-------~--~----~

2. Andorid on Beagle : how to set dns server using setprop

Dear all,

I am running android on beagle board which is built from source via
NFS mounting.

My linux host machine ip setting is 10.7.143.3.

my bootargs is

console=ttyS2,115200n8 root=/dev/nfs rw nfsroot=10.7.143.3:/root/
harish_work/Beagle/android_FS ip=10.7.143.5::255.0.0.0
nolock,rsize=1024,wsize=1024 rootdelay=2 video=omapfb:mode:1024x...@60
init=/init


when booting up the beagle board, it prints following messages,

eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
IP-Config: Guessing netmask 255.0.0.0
IP-Config: Gateway not on directly connected network.
Waiting 2sec before mounting root device...
Looking up port of RPC 100003/2 on 10.7.143.3
Looking up port of RPC 100005/1 on 10.7.143.3
VFS: Mounted root (nfs filesystem).
Freeing init memory: 156K
Warning: unable to open an initial console.
init: cannot open '/initlogo.rle'
sh: can't access tty; job control turned off
# FAT: bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev mmcblk0.
warning: `rild' uses 32-bit capabilities (legacy support in use)


1) what's the error -> sh: can't access tty; job control turned off

2) how to provide initab in android file system.

3) how to set dns? I tried from wiki,

#setprop net.eth0.dns1 XX.XX.XX.XX

Then, when i tried to ping,

# ping google.com

ping: unknown host google.com

But i can ping my LAN ip (10.7.143.3), my beagle  board ip is
10.7.143.5.

How to fix this.

Regards,
HarishKumar.V
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. How to implement fish eye effect

4. How to prevent repositioning of a dialog

5. no fastboot binary for os x for adp1.1 as per guide

6. How to set the permission to open a dev fd?

7. Bitmap shift an area of a bitmap over