[英]How to add margin between tab backgrounds inside tab layout android?
您可以添加这两个属性:
<android.support.design.widget.TabLayout
...
app:tabPaddingStart="10dp"
app:tabPaddingEnd="10dp" />
我之前发现了同样的问题,你可以在那里找到答案: https://stackoverflow.com/a/36511524/9040853
我希望你发现我的回答很有用。
欢迎,将这样的视图(那个勾号)保持在另一个视图之上称为Overlapping Layouts
,您可以使用相对布局来做到这一点,画廊视图和图像视图将重叠
<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>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.