2 Star 0 Fork 0

Archermind-TI / SimpleTagImageView

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
Clone or Download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

SimpleTagImageView

项目介绍

带有Tag的Image

  • 支持Tag的背景颜色、角边距、宽度以及角落位置设置
  • 支持文字大小、加粗倾斜、文字颜色设置
  • 支持边角圆弧半径设置

效果演示

图片 20210409152025

安装教程

方式一:

  1. 下载SimpleTagImageView的模块代码添加到自己的工程

  2. 关联使用

    dependencies {
         implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
         implementation project(":simpletagimageview")
         ...
     }
  3. gradle sync

方式二:

allprojects {
    repositories {
        mavenCentral()        
    }
}

...
dependencies {
	...
	implementation 'com.gitee.archermind-ti:SimpleTagImageView:1.0.1'
	...
}

使用说明

  • 设置SimpleTagImageView组件
    <!-- simple_tag_orientation:0-左上,1-右上,2-左下,3-右下 -->
    <!-- simple_tag_text_bold:400-常规,500-中等,700-加粗 -->
    <net.wujingchao.ohos.simpletagimageview.SimpleTagImageView
      xmlns:simple="http://schemas.huawei.com/apk/res/ohos"
      ohos:id="$+id:stiv"
      ohos:height="192vp"
      ohos:width="256vp"
      ohos:image_src="$media:qwer"
      ohos:margin="18vp"
      ohos:scale_mode="stretch"
      simple:simple_corner_background_color="#efefef"
      simple:simple_corner_distance="30vp"
      simple:simple_tag_background_color="#af27CDC0"
      simple:simple_tag_enable="true"
      simple:simple_tag_orientation="0"
      simple:simple_tag_round_radius="20vp"
      simple:simple_tag_text="AB"
      simple:simple_tag_textColor="$color:white"
      simple:simple_tag_textSize="18fp"
      simple:simple_tag_text_bold="400"
      simple:simple_tag_text_italic="false"
      simple:simple_tag_width="20vp"
      /> 

版本迭代

  • v1.0.1

版权说明

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Repository Comments ( 0 )

Sign in to post a comment

About

ImageView with a tag on ohos expand collapse
Cancel

Releases (2)

All

Contributors

All

Activities

Load More
can not load any more
1
https://gitee.com/archermind-ti/simpletagimageview.git
git@gitee.com:archermind-ti/simpletagimageview.git
archermind-ti
simpletagimageview
SimpleTagImageView
master

Search