I was trying to place Linearlayout that contains buttons between The ActionBar and The Tabs, I tried implement a custom actionbar that contains both The ActionBar and a horizontal Linearlayout for the buttons, but I still can't see the buttons, is there any way to do so ?
Here my custom actionBar: custom_action_bar_with_menu.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="130dp"
android:orientation="vertical"
android:background="@color/blue_buzzvibe">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="60dp"
android:background="@color/blue_buzzvibe"
android:orientation="horizontal"
>
<ImageButton android:src="@drawable/icon_menu_white"
android:id="@+id/cab_main_messages_menu"
android:background="@drawable/top_header_butt"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.2"/>
<TextView
android:id="@+id/cab_main_messages_campaign_name"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:scaleType="centerInside"
android:text="Campaign Of the day"
android:textColor="@color/white"
android:textSize="18dp"
android:gravity="center"
android:layout_weight="1"
/>
<ImageButton android:src="@drawable/ic_plus_wh"
android:id="@+id/cab_main_messages_propose_message"
android:background="@drawable/top_header_butt"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.2" />
</LinearLayout>
<LinearLayout
android:id="@+id/options_buttons_campaign"
android:layout_width="fill_parent"
android:layout_height="70dp"
android:gravity="center_vertical|center_horizontal" >
<ImageButton
android:id="@+id/home_desc_butt"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:src="@drawable/icon_mail_alt"
android:background="@drawable/layout_header_selector"
/>
<View
android:layout_width="2dip"
android:layout_height="fill_parent"
android:background="@color/light_gray"
/>
<ImageButton
android:id="@+id/msg_list_butt_details"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:src="@drawable/icon_mail_alt"
android:background="@drawable/layout_header_selector"
/>
<View
android:layout_width="2dip"
android:layout_height="fill_parent"
android:background="@color/light_gray"
/>
<ImageButton
android:id="@+id/campaign_metrics"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:src="@drawable/ic_metrics"
android:background="@drawable/layout_header_selector"
android:clickable="true"
/>
<View
android:layout_width="2dip"
android:layout_height="fill_parent"
android:background="@color/light_gray"
/>
<ImageButton
android:id="@+id/people_list_butt"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:src="@drawable/social_myspace"
android:background="@drawable/layout_header_selector"
android:clickable="true"
/>
</LinearLayout>
</LinearLayout>
In onCreate i call this methode to init my actionbar:
public void initActionBar(){
mActionBar = getSupportActionBar();
View customView =
getLayoutInflater().inflate(R.layout.custom_action_bar_with_menu,null);
mActionBar.setCustomView(customView, new
ActionBar.LayoutParams(ActionBar.LayoutParams.MATCH_PARENT,
ActionBar.LayoutParams.WRAP_CONTENT));//(int) (90*scale + 0.5f)));
mActionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
mActionBar.setDisplayShowHomeEnabled(true);
/** Set tab navigation mode */
mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
}
I wan't to make my actionbar height change dynamically, to show all my custom actionBar