Cut off part of the icon - fa_taxi
ViTVetal opened this issue · comments
ViTVetal commented
layout
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:menu="@menu/drawer_view"
app:headerLayout="@layout/nav_header"/>
drawer_view
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:id="@+id/cars"
android:title="@string/cars" />
<item
android:id="@+id/history"
android:title="@string/trips_history" />
</menu>
activity
Menu menu = navigationView.getMenu();
MenuItem carsItem = menu.findItem(R.id.cars);
carsItem.setIcon(new IconDrawable(this, FontAwesomeIcons.fa_taxi)
.color(ContextCompat.getColor(this, R.color.gray)));