Just try this..
1) First create two layouts like main & custom_title
2) You must include the drawables which type like you've posted here. And, use this code.
main.xml - Just designed whatever you want.
custom_title.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="35dip"
android:gravity="center_vertical"
android:paddingLeft="5dip"
android:background="#323331">
<Button
android:id="@+id/button1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:onClick="hello"
android:text="Button" />
</LinearLayout>
Main.java
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
setContentView(R.layout.main);
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.window_title);
}
public void hello(View view)
{
Toast.makeText(getApplicationContext(), "Hi, this is test.", Toast.LENGTH_LONG).show();
}
Change this code to your needs. Hope this helps you.