Tabs with margin between them and selected tab has a tick on it
CodePudding user response:
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.
CodePudding user response:
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>