I am trying to implement BottomNavigationView in my app but getting errors.
BottomNavigationView
1 Like
To use a BottomNavigationView
:
Add them to your layout:
<android.support.design.widget.BottomNavigationView
android:id="@+id/bottom_nav_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:menu="@menu/activity_main_bottom_actions" />
So use java to manipulate:
import android.support.design.widget.BottomNavigationView;
// first import
...
BottomNavigationView a;
@Override protected void onCreate(Bundle sis) {
super.onCreate(sis);
setContentView(R.layout.my_view);
a = findViewById(R.id.bottom_nav_view);
}
1 Like
In your case you’re missing the correct import of the bottom nav view as explained by @EduApps. Alternatively, pressing and holding on an error will prompt a check mark on Aide’s toolbar to fix your error if it is fixable.