0

I have an activity called TabsActivity which is basically a tabbed bar for fragments. Something like the image below where each icon is a switch to another fragment. So if you click on the icon the fragment loads inside the TabsActivity. However, my bar unlike Google's is not translucent but white. How can i make my bar translucent. My xml format of TabsActivity is below:

enter image description here

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

 <android.support.v4.view.ViewPager
    android:id="@+id/pager"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_weight="1" />

   <LinearLayout
     android:layout_width="match_parent"
     android:layout_height="60dp"
     android:layout_gravity="bottom"
     android:layout_marginLeft="4dp"
     android:layout_marginRight="4dp">

   <RelativeLayout
        android:id="@+id/fragment_one_icon"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="center_vertical"
        android:layout_weight="1">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:orientation="vertical">

            <ImageView
                android:layout_width="32dp"
                android:layout_height="32dp"
                android:layout_gravity="center_horizontal"
                android:layout_marginBottom="0dp"
                android:src="@drawable/menu_icon_fragment1"/>

            <TextView
                android:id="@+id/tv_feeds"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:text="Fragment1"
                android:layout_marginBottom="2dp"
                android:textColor="@color/app_gray"/>

        </LinearLayout>
    </RelativeLayout>
   </LinearLayout>
</LinearLayout>

My tabs bar :

enter image description here

stud91
  • 1,854
  • 6
  • 31
  • 56

0 Answers0