Problem running apps fullscreen in emulator - android

I've created a device targeting 2.1 and having a screen screen size of 480x800 (WVGA). Some apps, including the one I'm currently writing, as well as the ApiDemos example, won't run fullscreen. I've uploaded a screenshot here: http://img248.imageshack.us/img248/503/emulator.png
What could cause something like this? If I run these apps on my HTC Desire (which has the same resolution), they utilize the whole screen like they should.

Well I finally found a solution. In case anyone else comes across the same problem, the solution is to add the following to your AndroidManifest.xml:
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:anyDensity="true" />

<uses-sdk android:minSdkVersion="4"/>
<uses-sdk android:targetSdkVersion="10"/>
Putting sdk version in androidmanifext file will make it work too.

Related

Are the Android manifest device-filtering options broken or am I missing something?

I was trying to prevent users from downloading my app on devices that are clearly incapable of running it (it's a Unity3D game), and figured I'd use android:glEsVersion and screen size as a filter to get rid of the worst of them.
With the following two lines in my manifest, Google Play filters my list of compatible devices down to (a surprisingly low) 905 valid devices:
<supports-screens android:smallScreens="false" android:normalScreens="false" android:largeScreens="true" android:xlargeScreens="true" />
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
(Without them, I get 4489 valid devices)
One of the devices that gets removed is my own Nexus 5, but it has OpenGLES 3.0 support and a resolution way above the definition for "largeScreen", so it makes no sense to me at all.
Does anyone have any idea what's going on? GooglePlay does not say why a given device is excluded, so it's kind of hard to backtrace.
I don't think that will work, but did you try to add
android:anyDensity="true"
But in https://developer.android.com/guide/topics/graphics/opengl.html#manifest we can see :
If your application uses OpenGL features that are not available on all devices

Android buttons turn black when pressed (if supports-screens in in the AndroidManifest.xml)

I've built a test app to demonstrate the problem.
I have an Android app which has a couple of buttons with semi-transparent gradient background.
The problem is - when the button is pressed, the space under the button turns black (screenshot provided).
After a long time of searching for the cause i've found, that the problem is caused by this entry in the AndroidManifest.xml:
<supports-screens
android:anyDensity="false"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true" />
If i delete it, everything is ok. Anyone have any thoughts on this one?
P.S
I should mention, that this may be device specific, since i have a Samsung Galaxy S phone (i9000) but with android 4.3 flashed to it (don't judge me on that :D)
It is probably to do with the line
android:anyDensity="false"
According to the official documentation on supports-screens found at Supports Screens Element,
"you should not set it "false" unless you're absolutely certain that it's necessary for your application to work."
It then references the documentation on Supporting multiple screens which says that if it is false, the drawing operations can have unexpected behaviour. See Supporting Multiple Screens, point 2 on Auto-scaling of pixel dimensions and coordinates.
Hopefully this provides an explanation.

how to run android app only on phone ,not on tab

I have developed one android app which intended to run only on phone.But it also run on Tab
I have made changes in Manifest file as following-
<supports-screens
android:anyDensity="true"
android:largeScreens="false"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="false" />
But it doesn't work.
What is the way to setup android app using code which only run on phone, not on android tab.
Just add this line in the Manifest.xml :
<uses-feature android:name="android.hardware.telephony"/>
If the device has no dialer and a data network, this one will be excluded from GooglePlayStore.
Check this: Google Play Filtering
On the other hand, if you change the supports-screens property you will have problems with devices with high density displays.
Good luck!

Android Edit text and Button widget appears blurry in tablet

HI stackoverflow friends,
On recent days I am facing an issue in android layout. I have a made an app that needs to run on android phones and tablet. So I made independent layouts for phone and tablet as descrided in android developer document. But my edittext and button appears a blurry in tablet but it works perfectly in phones up to 2.3 .My design is same in both.During design time ,graphical layout show the correct as I need. On running on emulator and on actual device it appears as below. But It perfectly ok in phones(2.3).
Tablet layout.
Phone layout as I need
I have noticed that when my layout screen becomes large it becomes blurry feel.
I couldn't figure out what mistake happened to me.
UPDATED
In my Manifest.xml I have added
<uses-sdk android:minSdkVersion="4"
android:targetSdkVersion="13" />
<supports-screens
android:smallScreens="false"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens= "true"
android:anyDensity="true" />
But no effect.
Any help would be appreciable.
It might be in compatibility mode. From the documentation,
"...if your application does not successfully follow the guide to
Supporting Multiple Screens, then it might encounter some rendering
issues on larger screens."
The manifest needs to be adjusted to disable compatibility mode.
http://developer.android.com/guide/practices/screen-compat-mode.html
I figure out my issue. By setting theme in application element
android:theme="#android:style/Theme" in manifest.xml file.
<application
android:label="#string/app_name"
android:icon="#drawable/logo"
android:vmSafeMode="false"
android:theme="#android:style/Theme">
Thanks to all for supporting me.

Toast size on Galaxy Nexus

When I use toasts in my app, the size is very very small. But when another app displays a toast, the size is normal (like Advanced Task Killer, or SMS).
What do I have to do to get normally-sized toasts?
I have a Galaxy Nexus ICS=4.0.1, and my app is using SDK API level 7 (android 2.1+).
Thank you ! (x1000)
Adding
<supports-screens android:resizeable="true"
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:anyDensity="true"/>
to my manifest, solved my problem...
you may need to use a Custom ToastView
Maybe this is a theme problem... Can you try to implement Using Holo while supporting Android 2.x in this post ?
I finally fixed this by removing android:anyDensity="false" from my supports-screens element in my manifest. I'm not sure why I had it there in the first place, except that I started that app from one of my rather old apps instead of from scratch.
That setting also caused my activity to be realllllly small (order the order of 25px by 20px) when I ran with targetSdkVersion 14 or 15 on my nexus. Seems like a bug.

Categories

Resources