简体   繁体   中英

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

您可能需要使用自定义ToastView

也许这是一个主题问题...你可以尝试在这篇文章中 支持Android 2.x时实现使用Holo吗?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM