Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

为单个tab设置不同的指示器 #118

Open
Jasperben opened this issue Nov 26, 2024 · 3 comments
Open

为单个tab设置不同的指示器 #118

Jasperben opened this issue Nov 26, 2024 · 3 comments

Comments

@Jasperben
Copy link

比如有两个tab 第一个tab的指示器背景是个朝左的箭头,第二个tab指示器背景是个朝右的箭头,如何设置

@angcyo
Copy link
Owner

angcyo commented Nov 26, 2024

不是很清楚需求, 写个demo来看看?

@Jasperben
Copy link
Author

image
就是这样的tab,如何切换选中背景和默认背景

@angcyo
Copy link
Owner

angcyo commented Nov 27, 2024

用Android原生的selector就可以实现.

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_selected="true">
        选中样式
    </item>
    <item>
        默认样式
    </item>
</selector>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants