Ich habe eine Symbolleiste mit einigen Menüelementen darin. Einige der Menüpunkte werden klar angezeigt, aber wenige davon werden abgeschnitten. In haben versucht, Unterstützung: AnyDensity in Menifest, aber es funktioniert auch nicht. Ich habe keine Auffüllung programmgesteuert angewendet. Hier sind die Screenshots, wie meine Toolbar im Querformat aussieht. Der linke Teil der Symbolleiste sieht gut aus, aber der Text und das Bild im rechten Teil scheinen etwas aufgefüllt zu sein.Symbolleisten-Menüelement Text wird abgehackt
dies ist der Screenshot für Potrait-Modus.
Meine Layoutdatei für die Werkzeugleiste,
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>
Und die Menüpunkt Datei,
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<item
android:id="@+id/action_search"
android:title="Search"
android:icon="@drawable/search"
app:actionViewClass="android.support.v7.widget.SearchView"
app:showAsAction="ifRoom"/>
<item
android:id="@+id/waiter_name"
android:title="Waiter Name"
app:showAsAction="ifRoom"/>
<item
android:id="@+id/refresh_table"
android:title="Refresh Table"
android:visible="false"
android:icon="@android:drawable/ic_menu_rotate"/>
<item
android:id="@+id/refresh_product"
android:title="Refresh Menu"
android:visible="false"
android:icon="@android:drawable/ic_menu_rotate"/>
<item
android:id="@+id/action_change_password"
android:onClick="changePassword"
android:title="Change Password"/>
<item
android:id="@+id/action_change_passcode"
android:title="Change Passcode"
android:onClick="changePasscode"/>
<item
android:id="@+id/action_select_printer"
android:title="Select Printer"/>
<item
android:id="@+id/action_settings"
android:title="Settings"
android:icon="@android:drawable/ic_menu_preferences"/>
<item
android:id="@+id/action_update"
android:title="Check for updates"
android:visible="false"
android:icon="@android:drawable/ic_menu_preferences"/>
<item android:id="@+id/about_us"
android:icon="@android:drawable/ic_dialog_info"
android:onClick="aboutUs"
android:title="About Us"/>
</menu>
Ich habe einige der Beiträge in Stackoverflow gewesen, aber keiner von ihnen hat mir geholfen.
Vielen Dank im Voraus,
schon versucht .. aber es funktioniert nicht –