Android的Toast通知太小冰淇淋三明治明治、太小、冰淇淋、通知

2023-09-05 08:06:20 作者:活到老浪到老

有没有人曾与吐司通知的冰淇淋三明治的任何问题太小?在我的应用程序,通知一下罚款所有其他版本。在冰淇淋三明治,但其令人难以置信的微小。起初我以为这可能是我的自定义主题,但禁用后,我看到了同样的结果。我显示吐司只是像其他人一样有:

  Toast.makeText(MyActivity.this!你好,世界,Toast.LENGTH_SHORT).show();
 

我的主题:

 <资源>
<样式名称=mytheme的父=@安卓风格/ Theme.Light.NoTitleBar>
    <项目名称=机器人:editTextStyle> @风格/ blue_edittext< /项目>
    <项目名称=机器人:windowNoTitle>真< /项目>
    <项目名称=机器人:windowBackground> @色/白< /项目>
< /风格>
< /资源>
 

任何想法?谢谢!

解决方案

根据这个提问/回答:

  祖传甜品 Android 8.0或叫奥利奥

添加

 <支持屏安卓调整大小=真
                  机器人:smallScreens =真
                  机器人:normalScreens =真
                  机器人:largeScreens =真
                  机器人:anyDensity =真/>
 

  

我的表现,解决我的问题...

Has anyone had any problems with the Toast Notifications in Ice Cream Sandwich being too small? In my application, the notifications look fine on all other versions. In Ice Cream Sandwich, however, its incredibly tiny. At first I thought that it might be my custom theme but, after disabling it, I saw the same results. I am displaying a Toast just like everyone else with:

Toast.makeText(MyActivity.this, "Hello, World!", Toast.LENGTH_SHORT).show();

My theme:

<resources>
<style name="mytheme" parent="@android:style/Theme.Light.NoTitleBar" >
    <item name="android:editTextStyle">@style/blue_edittext</item>
    <item name="android:windowNoTitle">true</item>  
    <item name="android:windowBackground">@color/White</item>
</style>
</resources>

Any ideas? Thanks!

解决方案

As per this question/answer:

Adding

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

to my manifest, solved my problem...