mmoamenn / LuckyWheel_Android

A custom component that displays a lucky wheel. it ⁠ features easy customize of colors, addition of items and it's very trivial to integrate in your application.
MIT License
127 stars 55 forks source link

Unknown attribute #13

Closed SolDiez90 closed 3 years ago

SolDiez90 commented 4 years ago

Unknown attribute LuckyWheel:background_color.

<com.bluehomestudio.luckywheel.LuckyWheel android:id="@+id/lwv" android:layout_width="310dp" android:layout_height="310dp" android:layout_centerInParent="true" android:layout_marginTop="56dp" LuckyWheel:background_color="@color/colorPrimary" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.495" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/turnText" />

amit517 commented 4 years ago

I also facing the same problem.

Ansari1221 commented 4 years ago

I think you should use direct color value like #XXXXXX don't use '@color/color_name' okay.... Try this one... It will work

mhkarami commented 3 years ago

use xmlns:LuckyWheel="http://schemas.android.com/apk/res-auto" in your xml file main layout :

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:LuckyWheel="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".ui.luckywheel.LuckyWheelActivity">
mmoamenn commented 3 years ago

use @mhkarami solution