xml - 增加 Tab 和 TabLayout 之间的间隙
问题描述
我想增加选项卡和选项卡布局之间的差距。
现在我有了这个。检查图像。我尝试方法边距和填充,但我无法解决它..我想要填充底部
我的代码是:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:fitsSystemWindows="true"
tools:context=".Fragments.MainFragment">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/black"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" />
<com.google.android.material.tabs.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:tabSelectedTextColor="@color/white"
app:tabBackground="@drawable/tab_color_selector"
style="@style/MyTabLayout"
app:tabMode="scrollable"
app:tabGravity="center"
app:tabPaddingStart="30dp"
app:tabPaddingEnd="30dp"
app:tabIndicatorHeight="0dp"
/>
</com.google.android.material.appbar.AppBarLayout>
</RelativeLayout>
解决方案
推荐阅读
- r - 从 MYSQL VIEW 表中提取数据到 Rstudio
- java - InvalidQueryException despite of correct query
- java - 如何在java中将字节[]转换为Mat
- android - Flutter 渲染问题
- plsql - 在 oracle 数据库中创建 XML 到 XSD 规范
- apostrophe-cms - 更改为另一个数据库
- javascript - 如何选择 node_modules dist 风格与 webpack 捆绑
- python - `int() 的无效文字,以 10 为基数:'null' ` 同时将对象转换为整数
- vba - Excel VBA,将信息复制到其他工作表但名称随机
- mysql - 如何在 MySQL 中按特定模式搜索?