Tag Archives: arrow

[Android] 액션바에 뒤로가기 화살표 표시 및 뒤로가기 기능 추가

By | 12월 29, 2020

*  정의부 (MainActivity > Navigation Drawer 생성) protected void onCreate(Bundle savedInstanceState) { … Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); // actionbar 좌측에 뒤로가기 화살표 표시 DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); drawerToggle = new ActionBarDrawerToggle(this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close); drawer.setDrawerListener(drawerToggle); drawerToggle.syncState(); NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view); navigationView.setNavigationItemSelectedListener(this); … }   *  정의부 (MainActivity > 뒤로가기… Read More »