java - android - 滑动按钮找不到属性的资源标识符
问题描述
我正在尝试使用 com.ebanx.swipebtn.SwipeButton 提供的滑动按钮
在我的应用程序中
compile 'com.ebanx:swipe-button:0.2.1'
在我的 xml 布局中
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:layout_editor_absoluteX="8dp"
tools:layout_editor_absoluteY="8dp"
xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android">
<com.ebanx.swipebtn.SwipeButton
android:id="@+id/button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="20dp"
android:layout_marginStart="20dp"
android:layout_marginBottom="20dp"
app:button_image_disabled="@drawable/ic_lock_open_black_24dp"
app:button_image_enabled="@drawable/ic_lock_outline_black_24dp"
app:button_background="@drawable/shape_button"
app:button_image_height="60dp"
app:button_image_width="100dp"
app:button_bottom_padding="18dp"
app:button_left_padding="38dp"
app:button_right_padding="38dp"
app:button_top_padding="18dp"
app:initial_state="disabled"
app:inner_text="Enable"
app:inner_text_background="@drawable/shape_rounded"
app:inner_text_color="@android:color/white"
app:inner_text_size="16sp"
app:inner_text_top_padding="18dp"
app:inner_text_bottom_padding="18dp" />
尝试构建时,我收到错误消息,提示找不到以应用程序前缀开头的属性的资源标识符,这些属性特定于滑动按钮视图。
我尝试像这样添加 xmlns 应用程序
<com.ebanx.swipebtn.SwipeButton
xmlns:app="http://schemas.android.com/apk/lib/com.ebanx"
.....
..... />
但是当我运行应用程序时,滑动按钮不显示。
解决方案
推荐阅读
- angular - 用于管理员/用户场景的 Angular 模块
- javascript - 如何使用 JSON 从前到后更新具有特定值的目标文件,保持其他值不变,?节点.js
- javascript - Javascript:如何合并两个对象并对同一个键的值求和?
- javascript - 将第三方 js 应用程序集成到 vue.js2
- php - 从表单帖子更新数据库
- python - Plotly 'Dash Auth' 登录引发 401 错误。如何获得200?
- java - 为什么默认 maven 使用这么旧版本的插件?
- python - selenium,python:尝试在不建立连接的情况下运行命令(geckodriver)
- java - Android E/SQLiteDatabase 上的 SQLite:插入日期时出错=05/04/2021 时间=60000.0
- python - 多重循环会影响 response.json() 吗?