Toast size on Galaxy Nexus

点点圈 提交于 2019-12-04 03:31:58

问题


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


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




回答2:


you may need to use a Custom ToastView




回答3:


Maybe this is a theme problem... Can you try to implement Using Holo while supporting Android 2.x in this post ?




回答4:


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.



来源:https://stackoverflow.com/questions/8794519/toast-size-on-galaxy-nexus

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!