Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cut off part of the icon - fa_taxi #212

Open
ViTVetal opened this issue Oct 4, 2018 · 0 comments
Open

Cut off part of the icon - fa_taxi #212

ViTVetal opened this issue Oct 4, 2018 · 0 comments

Comments

@ViTVetal
Copy link

ViTVetal commented Oct 4, 2018

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)));

screenshot_2018-10-04-19-53-56-046_com vitvetal_taxi taxidriver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant