タイトルバーのレイアウトを XML で定義することができます。 setContentView の前に requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); で宣言し、setContentView のあとにXMLファイルを getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.custom_title); で指定します。 @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); setContentView(R.layout.viewer2
![Android カスタムタイトルバーを使う](https://cdn-ak-scissors.b.st-hatena.com/image/square/994364df794b38272f4f5c0da865ba094d680613/height=288;version=1;width=512/http%3A%2F%2F2.bp.blogspot.com%2F_HRaLqTNFL7w%2FTOSMw-pEoXI%2FAAAAAAAAB6I%2FXSN_HjQQInQ%2Fw1200-h630-p-k-no-nu%2FCustomTitleBar.png)