Reputation: 11
2 tabs having separate backgrounds with border and there should be distance between those to backgrounds.
Upvotes: 0
Views: 385
Reputation: 2469
Welcome,
Keeping views like this(that tick) on top of another view is called Overlapping Layouts
, you can do it by using relative layout, the gallery view and image view will overlap
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gallerylayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Gallery
android:id="@+id/overview"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<ImageView
android:id="@+id/navigmaske"
android:background="#0000" /*use #000000 for black colour*/
android:src="@drawable/navigmask" //put your image here
android:scaleType="fitXY"
android:layout_alignTop="@id/overview"
android:layout_alignBottom="@id/overview"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
</RelativeLayout>
Upvotes: 0
Reputation: 124
You can add those two attributes:
<android.support.design.widget.TabLayout
...
app:tabPaddingStart="10dp"
app:tabPaddingEnd="10dp" />
I found the same question before and you can find the answer there: https://stackoverflow.com/a/36511524/9040853
I hope you find my answer is useful.
Upvotes: 1