我是靠谱客的博主 害羞秋天,最近开发中收集的这篇文章主要介绍StackLabel 堆叠标签引入后无法使用,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

一个功能很强大的堆叠标签

implementation 'com.kongzue.stacklabel:stacklabelview:1.1.6'

引入后发现不能使用,各种报错manifest,apt版本之类的,后来发现是作者在layout_label布局文件中的LinearLayout中使用了两个不存在的属性android:paddingHorizontal="12dp"   android:paddingVertical="8dp"删除掉就可以,删除后只能手动导入moduel,导入依赖的话只能等作者修改

 

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/box_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:background="@drawable/rect_normal_label_button"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingHorizontal="12dp"
android:paddingVertical="8dp">
<TextView
android:id="@+id/txt_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:textColor="#dc000000"
android:textSize="12dp" />
<ImageView
android:id="@+id/img_delete"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_marginLeft="2dp"
android:layout_marginTop="0dp"
android:layout_marginRight="-3dp"
android:padding="2dp"
android:src="@mipmap/img_delete"
android:visibility="gone" />
</LinearLayout>
</RelativeLayout>

 

最后

以上就是害羞秋天为你收集整理的StackLabel 堆叠标签引入后无法使用的全部内容,希望文章能够帮你解决StackLabel 堆叠标签引入后无法使用所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(67)

评论列表共有 0 条评论

立即
投稿
返回
顶部