我使用 androidx 库,并且在以下代码中有 androidx.legacy.app.ActionBarDrawerToggle' is deprecated 错误:
private ActionBarDrawerToggle mDrawerToggle;
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
// associate Navigation Drawer with ActionBar
mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout,
R.drawable.ic_drawer, //nav menu toggle icon
我想如何改变它?我试图找到一个解决方案,但与 androidx 无关。我会简单地解释一下,因为我是 android 中的新手。