# DrawableTextView **Repository Path**: zhang_1/DrawableTextView ## Basic Information - **Project Name**: DrawableTextView - **Description**: 自定义控件 :drawable 跟随TextView居中 The drawable follows the text centered - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-11-21 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # DrawableTextView 自定义控件 :drawable 跟随TextView居中 The drawable follows the text centered 截图: ---------- ![DrawableTextView](https://github.com/niniloveyou/DrawableTextView/blob/master/drawableTextView.jpeg) ###Manually 你只需要这添加这两个文件就可以使用了! + deadline/DrawableTextView.java + res/values/attrs.xml ###代码中这样设置即可 ``` drawable = ContextCompat.getDrawable(getContext(), R.mipmap.xxx); setDrawable(DrawableTextView.LEFT, drawable, width, height); ``` Customizable attributes ### xml中定义了以下属性 - Define `xmlns:app="http://schemas.android.com/apk/res-auto"` on root of your xml file ```xml ``` Developed By ------- deadline Blog : http://www.jianshu.com/users/25e80ace21b8/latest_articles