MCPcopy Index your code
hub / github.com/385841539/HorizontalScrollSelectedView

github.com/385841539/HorizontalScrollSelectedView @1.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.0.0 ↗ · + Follow
16 symbols 35 edges 2 files 8 documented · 50%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

HorizontalScrollSelectedView

横向滚动的,可以选择的文本的自定义View

效果图

效果图

博客介绍

CSDN:http://blog.csdn.net/iamdingruihaha/article/details/71422269

Download

    allprojects {
        repositories {
            ...
            maven { url 'https://jitpack.io' }
        }
    }

    dependencies {
      compile 'com.github.385841539:HorizontalScrollSelectedView:c31488ec2f'
    }

Usage

基本使用:

        <com.example.horizontalselectedviewlibrary.HorizontalselectedView
            android:id="@+id/hd_main"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_gravity="center_vertical"
            android:layout_weight="30"
            app:HorizontalselectedViewSeesize="5"
            app:HorizontalselectedViewSelectedTextColor="@color/black"
            app:HorizontalselectedViewSelectedTextSize="60"
            app:HorizontalselectedViewTextColor="@color/gray"
            app:HorizontalselectedViewTextSize="40" />

    <attr name="HorizontalselectedViewSelectedTextSize" format="float"></attr>
    <attr name="HorizontalselectedViewSelectedTextColor" format="color|reference"></attr>



    <attr name="HorizontalselectedViewTextSize" format="float"></attr>
    <attr name="HorizontalselectedViewTextColor" format="color|reference"></attr>

自定义(均设有默认值,可不使用):

属性          参数           说明
HorizontalselectedViewSeesize int y 可见文本数,默认为5
HorizontalselectedViewSelectedTextSize float y       被选中文字大小
HorizontalselectedViewSelectedTextColor Color color   被选中文字颜色
HorizontalselectedViewTextSize float y 未被选中文字大小
 HorizontalselectedViewTextColor Color color   未被选中文字颜色

     hsMain.setData(strings);//设置数据源

    hsMain.setAnLeftOffset();//向左移动一个单元
    
    hsMain.setAnRightOffset();//向右移动一个单元

    hsMain.getSelectedString();//获得被选中的文本


Tips

很简单的使用方法,不熟悉自定义View的小伙伴可以跟着敲一遍,巩固自定义View。

Core symbols most depended-on inside this repo

Shape

Method 14
Class 2

Languages

Java100%

Modules by API surface

horizontalselectedviewlibrary/src/main/java/com/example/horizontalselectedviewlibrary/HorizontalselectedView.java11 symbols
app/src/main/java/com/example/horizontalscrollselectedview/MainActivity.java5 symbols

For agents

$ claude mcp add HorizontalScrollSelectedView \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page