GithubHelp home page GithubHelp logo

pixiaozhi

1.0.0仅仅测试是否正常可以依赖(TextViewUtil)

gradle依赖

Step 1.Add it in your root build.gradle at the end of repositories:

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

Step 2. Add the dependency

dependencies {
        implementation 'com.github.pixiaozhi:pixiaozhi:1.0.0'
}

已上传文件(暂未打包发布)

TextDrawable

可设置图片+文字的TextView,在布局文件中设置文字左边图宽高,同理可设置rightDrawable,topDrawable,bottomDrawable

<com.ryx.widget.TextDrawable
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="@string/app_name"
    app:leftDrawable="@mipmap/ic_launcher_round"
    app:leftDrawableHeight="20dp"
    app:leftDrawableWidth="20dp"/>

标签列表控件

可以设置标签的选中效果。 可以设置标签的选中类型:不可选中、单选、限数量多选和不限数量多选等, 并支持设置必选项、单行显示、最大显示行数等功能。

xml使用:

<com.ryx.widget.LabelsView
   android:id="@+id/labels"
   android:layout_width="match_parent"
   android:layout_height="wrap_content"
   app:labelBackground="@drawable/label_bg"        //标签的背景
   app:labelTextColor="@drawable/label_text_color" //标签的字体颜色 可以是一个颜色值
   app:labelTextSize="14sp"                        //标签的字体大小
   app:labelTextPaddingBottom="5dp"                //标签的下边距
   app:labelTextPaddingLeft="5dp"                  //标签的左边距
   app:labelTextPaddingRight="5dp"                 //标签的右边距
   app:labelTextPaddingTop="5dp"                   //标签的上边距
   app:lineMargin="10dp"                           //行与行的距离
   app:wordMargin="10dp"                           //标签与标签的距离
   app:selectType="SINGLE"                         //标签的选择类型 有单选(可反选)、单选(不可反选)、多选、不可选四种类型
   app:maxLines="3"                                //设置最大显示行数,小于等于0则不限行数。
   app:maxSelect="5"                               //标签的最大选择数量,只有多选的时候才有用,0为不限数量
   app:minSelect="1"                               //标签的最少选择数量,只有多选的时候才有用,0为不限数量
   app:isIndicator="true" />                       //设置为指示器模式,不能手动改变标签的选中状态

<!-- 其他属性 -->
app:labelTextWidth="wrap_content"              // 标签项宽
app:labelTextHeight="wrap_content"             // 标签项高
app:labelGravity="center"                      // 标签项的文本显示方向
app:labelTextPadding="5dp"                     // 标签的Padding
app:singleLine="true"                          // 单行显示,默认false

activity调用:

LabelsView mLabels = new LabelsView(activity);
    mLabels.setSelectType(LabelsView.SelectType.SINGLE)//单选,可以反选。
    .setIndicator(false)                               //设置为指示器模式,只能看
    .setLabelBackgroundResource(R.drawable.labels_bg)  //标签背景
    .setLabelTextColor(R.drawable.label_text_color)    //文字颜色
    .setLabelTextSize(px_16)                           //文字大小,这里px_5是ScreenUtil.dip2px(16),以下同理
    .setLabelTextPadding(px_10, px_10, px_10, px_10)   //文字边距
    .setWordMargin(px_5)                               //文字内容Margin
    .setLineMargin(px_5)                               //行Margin
    .setMaxLines(px_5);                                //最大行数

pixiaozhi's Projects

andpermission icon andpermission

Android Runtime Permission,support the right to apply for permission at any place.

appupdate icon appupdate

🚀 Android 版本更新 🚀 a library for android version update 🚀

cameraview icon cameraview

自定义相机视图,具有捕获,录制,闪光和缩放功能,并解决内存泄漏问题

doodle icon doodle

Image doodle for Android, with functions such as undo, zoom, move, text, image, etc. Also a powerful, customizable and extensible doodle framework & multi-function drawing board. Android图片涂鸦,具有撤消,缩放,移动,添加文字,贴图等功能。还是一个功能强大,可自定义和可扩展的涂鸦框架、多功能画板。

gsyvideoplayer icon gsyvideoplayer

视频播放器(IJKplayer、ExoPlayer、MediaPlayer),HTTPS,支持弹幕,外挂字幕,支持滤镜、水印、gif截图,片头广告、中间广告,多个同时播放,支持基本的拖动,声音、亮度调节,支持边播边缓存,支持视频自带rotation的旋转(90,270之类),重力旋转与手动旋转的同步支持,支持列表播放 ,列表全屏动画,视频加载速度,列表小窗口支持拖动,动画效果,调整比例,多分辨率切换,支持切换播放器,进度条小窗口预览,列表切换详情页面无缝播放,rtsp、concat、mpeg。

shortcutbadger icon shortcutbadger

An Android library supports badge notification like iOS in Samsung, LG, Sony and HTC launchers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.