I'm getting no resource identifier found for a couple of attributes in the following 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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_lock"
android:gravity="center"
android:orientation="vertical">
//image
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/ic_launcher" />
//textview
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="32dp"
android:text="@string/draw_pattern"
android:textSize="20dp"
android:gravity="center"
android:textColor="@color/white" />
//problem seems at the end of this block
<com.takwolf.android.lock9.Lock9View
android:id="@+id/lock_9_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
app:nodeSrc="@drawable/lock_9_view_node_normal"
app:nodeOnSrc="@drawable/lock_9_view_node_highlighted"
app:lineColor="#ff006699"
app:lineWidth="8dp" />
<hell.sathan.applockmasters.Custom.FlatButton
android:id="@+id/forgetPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Forget Password"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:textSize="12dp"
android:textColor="@color/white"
app:buttonColor="@color/fbutton_color_carrot"
app:cornerRadius="5dp"
app:shadowEnabled="true"
app:shadowHeight="2dp" />
</LinearLayout>
I'm having the errors below :
Error:(24) No resource identifier found for attribute 'nodeSrc' in package
Error:(24) No resource identifier found for attribute 'nodeOnSrc' in package
Error:(24) No resource identifier found for attribute 'lineColor' in package
Error:(24) No resource identifier found for attribute 'lineWidth' in package
您必须在Gradle.app和Sync First中添加依赖项'com.takwolf.android:lock9view:0.0.11'
。
you need to make this
<com.takwolf.android.lock9.Lock9View
android:id="@+id/lock_9_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
app:lock9_nodeSrc="@drawable/node_normal"
app:lock9_nodeOnSrc="@drawable/node_active"
app:lock9_nodeOnAnim="@anim/node_on_1"
app:lock9_padding="28dp"
app:lock9_spacing="28dp"
app:lock9_lineColor="@color/blue_light"
app:lock9_lineWidth="8dp"
app:lock9_autoLink="false"
app:lock9_enableVibrate="true"
app:lock9_vibrateTime="20" />
your error is you doing this
app:**nodeSrc**="@drawable/lock_9_view_node_normal"
but it's like this
app:lock9_nodeSrc="@drawable/lock_9_view_node_normal"
You have to put app:lock9_
instead of app:
.
Try to replace app:nodeOnSrc
with app:lock9_nodeOnSrc
for example.
In the documentation of the library , you have an example :
<com.takwolf.android.lock9.Lock9View
android:id="@+id/lock_9_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
app:lock9_nodeSrc="@drawable/node_normal"
app:lock9_nodeOnSrc="@drawable/node_active"
app:lock9_nodeOnAnim="@anim/node_on_1"
app:lock9_padding="28dp"
app:lock9_spacing="28dp"
app:lock9_lineColor="@color/blue_light"
app:lock9_lineWidth="8dp"
app:lock9_autoLink="false"
app:lock9_enableVibrate="true"
app:lock9_vibrateTime="20" />
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.