protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mToolbar = (Toolbar) findViewById(t);
setupToolbar();
mNavigationRv = (RecyclerView) findViewById(R.id.navigation_rv);
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer);
mNavigationView = (NavigationView) findViewById(R.id.nv);
mNavigationRv.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false));
mNavigationAdapter = new NavigationAdapter(new ArrayList<String>(), this, this);
mNavigationRv.setAdapter(mNavigationAdapter);
mActionBarDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, 0, 0);
mNavigationView.setNavigationItemSelectedListener(this);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}
Android studio gives me an error
"This API is marked as internal to the support library and should not be accessed from applications"
for setNavigationItemSelectedListenerand setCheckedItem.
Help me please.
user5186466
source
share