공통으로 사용할 toolbar layout을 만든 후
해당 레이아웃에 inflater할 영역을 설정하고
아래코드로 구현해준다
LayoutInflater inflater = (LayoutInflater) this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
RelativeLayout actionBarLayout = (RelativeLayout) findViewById(R.id.actionBar);
inflater.inflate(R.layout.actionbar, actionBarLayout, true);
'android' 카테고리의 다른 글
EditText Style 옵션 (0) | 2017.10.11 |
---|---|
커스텀 텍스트 뷰 (0) | 2017.10.10 |
화면 가로, 세로 고정 (0) | 2017.10.10 |
안드로이드 파일경로, 파일명, uri 아이디 찾기 (0) | 2017.06.02 |
AsyncTask httpConnection (0) | 2016.12.27 |