Giter VIP home page Giter VIP logo

autoellipsistexview's Introduction

AutoEllipsisTexView

API

效果预览

AutoEllipsisTexView

主要文件

名字 摘要
AutoEllipsisTexView 当文本溢出时,显示 ... 的 TextView

1.基本用法

1.1 xml 静态设置

<ysn.com.view.autoellipsistextview.AutoEllipsisTexView
    android:layout_width="match_parent"
    android:layout_height="93dp"
    ysn:padding="10dp"
    ysn:rowWidth="5dp"
    ysn:text="@string/songqian"
    ysn:textColor="#333333"
    ysn:textSize="18sp" />

1.2 控件动态设置

autoEllipsisTexView.setText("五碗饭")

2. 配置属性(Attributes)

name format description
padding dimension 价格线宽度
rowWidth dimension 行高
text string 文本
textColor color 字体颜色
textSize dimension 字体大小
ellipsis string 末尾省略号
gravity enum 溢出后的显示模式

3.添加方法

3.1 添加仓库

在项目的 build.gradle 文件中配置仓库地址。

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

3.2 添加项目依赖

在需要添加依赖的 Module 下添加以下信息,使用方式和普通的远程仓库一样。

implementation 'com.github.yangsanning:AutoEllipsisTexView:1.0.0'

autoellipsistexview's People

Contributors

yangsanning avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.