728x90

 

안드로이드에서 Toolbar를 사용하는 경우, 기본적으로 App Name이 디폴트로 표시된다.

비활성화 하는 방법은 다음과 같다.

 

Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);
        getSupportActionBar().setDisplayShowTitleEnabled(false);
        //toolbar.setNavigationIcon(R.drawable.ic_toolbar);
        toolbar.setTitle("");
        toolbar.setSubtitle("");
        //toolbar.setLogo(R.drawable.ic_toolbar);

 

 

Reference

https://stackoverflow.com/questions/31096275/how-to-remove-app-title-from-toolbar

728x90

+ Recent posts