제가현재 coordinatorlayout을이용해서 화면을 구성하려고 하는데요
이게 커스텀툴바를 사용하지 않으면 오른쪽 사진처럼 잘 됩니다.
하지만 커스텀 툴바를 사용하니깐 왼쪽 사진처럼 타이틀이 상단에 고정됩니다...
커스텀툴바를 사용하면서 오른쪽 사진처럼 동작되게하려면 어째야할까요??
toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
ActionBar actionBar = getSupportActionBar();
View mCustomView = LayoutInflater.from(this).inflate(R.layout.my_toolbar, null);
TextView title = (TextView)mCustomView.findViewById(R.id.toolBar_title);
title.setText("ToolBar_Title");
actionBar.setCustomView(mCustomView);
// actionBar.setNavigationMode( actionBar.NAVIGATION_MODE_TABS );
actionBar.setDisplayShowCustomEnabled(true);
actionBar.setDisplayHomeAsUpEnabled(false);
actionBar.setDisplayShowTitleEnabled(true);
actionBar.setDisplayShowHomeEnabled(false);
actionBar.setBackgroundDrawable(new ColorDrawable(Color.argb(255,255,255,255)));
ImageButton btn = (ImageButton) findViewById(R.id.open_navi);
btn.setOnClickListener(
new Button.OnClickListener() {
@Override
public void onClick(View v) {
// drawerLayout.openDrawer(drawerView);
}
}
);