Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- getSupportActionBar().setBackgroundDrawable(getResources().getDrawable(R.drawable.nav_bar));
- getSupportActionBar().setIcon(new ColorDrawable(getResources().getColor(android.R.color.transparent)));
- getSupportActionBar().setDisplayShowTitleEnabled(false);
- getSupportActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
- getSupportActionBar().setDisplayShowHomeEnabled(false);
- getSupportActionBar().setDisplayHomeAsUpEnabled(false);
- getSupportActionBar().setHomeButtonEnabled(false);
- <?xml version="1.0" encoding="utf-8"?>
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
- <ImageView
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:scaleType="fitXY"
- android:src="@drawable/nav_bar"/>
- <TextView
- android:id="@+id/title"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="Title"
- android:layout_centerInParent="true"
- android:textColor="@color/irapptheme_color"
- android:textSize="20sp"/>
- <ImageButton
- android:id="@+id/btn_back"
- android:layout_width="48dp"
- android:layout_height="match_parent"
- android:background="@android:color/darker_gray"
- android:padding="12dp"
- android:layout_centerVertical="true"
- android:scaleType="fitCenter"
- android:src="@drawable/btn_back"
- android:visibility="gone"/>
- <ImageButton
- android:id="@+id/btn_search"
- android:layout_width="48dp"
- android:layout_height="match_parent"
- android:layout_alignParentRight="true"
- android:layout_centerVertical="true"
- android:padding="12dp"
- android:background="@android:color/transparent"
- android:src="@drawable/btn_search"
- android:visibility="gone"/>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement