android:background="@drawable/home_tab_bg"

本文介绍如何在Android中为Tab设置重复平铺的背景图片。通过使用XML定义Bitmap属性,实现@drawable/main_tab_bg资源文件作为背景并设置其平铺模式。
android:background="@drawable/home_tab_bg"
home_tab_bg/xml:
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
    android:dither="true"
    android:src="@drawable/main_tab_bg"
    android:tileMode="repeat" >
</bitmap>

 

<?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:background="@drawable/ld_bg" android:orientation="vertical" tools:context=".ui.main.activity.MainActivity"> <com.lingdong.fenkongjian.view.NoScrollViewPager android:id="@+id/mainViewPager" android:layout_width="match_parent" android:layout_height="match_parent" /> <View android:layout_width="match_parent" android:layout_height="0.5dp" android:layout_above="@+id/tab_rl" android:background="#ABABAB" /> <RelativeLayout android:id="@+id/tab_rl" android:layout_width="match_parent" android:layout_height="60dp" android:layout_alignParentBottom="true"> <net.center.blurview.ShapeBlurView android:layout_width="match_parent" android:layout_height="match_parent" app:blur_radius="@dimen/dp_10" app:blur_down_sample="4" app:blur_overlay_color="#CCFFFFFF" app:blur_mode="rectangle" /> <net.lucode.hackware.magicindicator.MagicIndicator android:id="@+id/main_bottom_tab" android:layout_width="match_parent" android:layout_height="60dp" /> </RelativeLayout> <View android:id="@+id/zhezhaoView" android:layout_width="match_parent" android:layout_height="match_parent" android:clickable="true" android:visibility="gone" /> </RelativeLayout>怎么让fragment透过底部导航,并且页面滑动到最底部时底部导航不会遮挡fragment
最新发布
12-04
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值