有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java 安卓滑动按钮未找到属性的资源标识符

我正在尝试使用com提供的滑动按钮。ebanx。swipebtn。滑动按钮

在我的应用程序gradle中

compile 'com.ebanx:swipe-button:0.2.1'

在我的xml布局中

<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout 安卓:layout_width="match_parent"
    安卓:layout_height="wrap_content"
    xmlns:app="http://schemas.安卓.com/apk/res-auto"
    tools:layout_editor_absoluteX="8dp"
    tools:layout_editor_absoluteY="8dp"
    xmlns:tools="http://schemas.安卓.com/tools"
    xmlns:安卓="http://schemas.安卓.com/apk/res/安卓">

    <com.ebanx.swipebtn.SwipeButton
        安卓:id="@+id/button"
        安卓:layout_width="match_parent"
        安卓:layout_height="wrap_content"
        安卓:layout_marginEnd="20dp"
        安卓:layout_marginStart="20dp"
        安卓: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="@安卓:color/white"
        app:inner_text_size="16sp"
        app:inner_text_top_padding="18dp"
        app:inner_text_bottom_padding="18dp" />

当尝试构建时,我得到一个错误,即没有找到以app前缀开头的属性的资源标识符,这是特定于swipebutton视图的

我试着像这样添加xmlns应用程序

<com.ebanx.swipebtn.SwipeButton   
    xmlns:app="http://schemas.安卓.com/apk/lib/com.ebanx"
    .....
    ..... />

但当我运行应用程序时,滑动按钮不会显示


共 (0) 个答案