Wenn die Höhe eines NavigationView
kleiner als die Höhe des übergeordneten Elements ist, gibt es einen Schattenwurf unter dem NavigationView
. Wie kann ich diesen Schatten entfernen?Wie entferne ich Schatten unter NavigationView?
Hier ist mein Layout:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="left"
android:orientation="vertical"
android:background="@android:color/white">
<android.support.design.widget.NavigationView
android:id="@+id/map_type_menu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="left"
app:menu="@menu/menu_map_type"/>
<!-- unwanted drop shadow here -->
<fragment
android:id="@+id/settings"
android:name="com.chalcodes.treasuremap.SettingsFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
Ich glaube nicht, dass dies relevant ist, aber hier ist die menu_map_type
XML:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<group android:checkableBehavior="single">
<item
android:id="@+id/item_street"
android:icon="@drawable/ic_menu_map_type_street"
android:title="@string/map_type_street" />
<item
android:id="@+id/item_satellite"
android:icon="@drawable/ic_menu_map_type_satellite"
android:title="@string/map_type_satellite" />
<item
android:id="@+id/item_hybrid"
android:icon="@drawable/ic_menu_map_type_satellite"
android:title="@string/map_type_hybrid" />
<item
android:id="@+id/item_terrain"
android:icon="@drawable/ic_menu_map_type_terrain"
android:title="@string/map_type_terrain" />
</group>
</menu>
kann ich Ihr Design Screenshot zu sehen? –
können Sie den Code der Datei 'menu_map_type' einfügen? –
Ich habe es versucht. aber ich finde deine Lösung dieses Typs nicht. Sorry –