首页

源码搜藏网

首页 > 安卓源码 > 控件分类 > 文字Text Fields >

一个用TextView扩展的标签视图Android源码

创建时间:2016-08-18 16:20  

一个用TextView扩展的标签视图Android源码
一个用TextView扩展的标签视图Android源码
暂无演示 立即下载

TriangleRectangleLabelView

一个用TextView扩展的标签视图Android源码

用法

此外,您还可以选择设置下列属性在布局xml文件来定制TriangleRectangleLabelView的行为。

    < 申报,设置样式 名称 =  TriangleRectangleLabelView  >
        < ATTR   =  trlvIsLeft  格式 = 布尔 />
        < ATTR   =  trlvIsShowCircle  格式 = 布尔 />
        < ATTR   =  trlvIsShowLine  格式 = 布尔 />
        < ATTR   =  trlvIsDrawRoundRect  格式 = 布尔 />
        < ATTR   =  trlvBgColor  格式 =  />
        < ATTR   =  trlvLineColor  格式 =  />
        < ATTR   =  trlvCircleColor  格式 =  />
        < ATTR   =  trlvCircleSpaceRectangle  格式 = 尺寸 />
        < ATTR   =  trlvCircleRadius  格式 = 尺寸 />
        < ATTR   =  trlvLineWidth  格式 = 尺寸 />
        < ATTR   =  trlvRoundRectWidth  格式 = 尺寸 />
        < ATTR   =  trlvRoundRectRadius  格式 = 尺寸 />
    </ 申报,设置样式 >

典型的用法是直接宣布小部件到布局XML文件。例如:

    < com .ecloud.trianglerectanglelabelview.TriangleRectangleLabelView
         xmlns : app = " http://schemas.android.com/apk/res-auto "
         android : layout_width = " wrap_content "
         android : layout_height = " wrap_content "
         android : textColor = " #fff "
         android : singleLine = " true "
         android : text = " Label 1 "
         android : layout_below = " @id/trv_name "
         android : textSize = " 16sp "
         android : layout_toEndOf = " @id/trv_name "
         android : layout_toRightOf = " @id/trv_name "
         app : trlvIsLeft = " true "
         app : trlvCircleRadius = " 4dp "
         app : trlvBgColor = " #ff000000 "
         app : trlvCircleColor = " #ffffff "
         app : trlvRoundRectRadius = " 12dp "
         app : trlvRoundRectWidth = " 10dp " />

上一篇:EditText内容分不同块显示,支持校验,删除块,添加块,得到块代表的
下一篇:Android平台下的富文本解析器,支持Html和Markdown

相关内容

热门推荐