Hi, create
<android.support.design.widget.NavigationView android:id="@+id/nav_view" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="start" android:fitsSystemWindows="true"/>
And I'm trying to stuff menu items there,
AssetManager assetManager = getAssets(); InputStream istr = null; try { istr = assetManager.open("image.jpg"); } catch (IOException e) { e.printStackTrace(); } Bitmap bitmap = BitmapFactory.decodeStream(istr); Drawable icon = new BitmapDrawable(getResources(), bitmap); menu.add("Title").setIcon(icon);
Pictures are in assets but dark gray squares appear in their place.
Tried to move them to drawable
menu.add("title").setIcon(R.drawable.img);
The result is absolutely the same ... What could it be? Is it really impossible to stuff raster images into standard NavigationView?