I was trying to porting the Tree-View-List-Android into my project recently. I have created a project called com.dotnetideas.treeview and added everything in. I can run the demo without any issue. But when I use it in another project, I kept getting “No resource identifier found for attribute 'indicator_gravity' in package com.dotnetideas.treeview” in main_demo.xml. Here is the xml looks like.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://ift.tt/nIICcg" xmlns:treeView="http://ift.tt/14Qj36N"
android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent">
<ListView android:layout_width="0dip" android:layout_height="0dip" android:scrollbars="vertical"
android:visibility="gone"> <!-- Just to test some attributes in IDE -->
</ListView>
<pl.polidea.treeview.TreeViewList android:id="@+id/mainTreeView" android:layout_width="fill_parent"
android:layout_height="fill_parent" treeView:indicator_gravity="right|center_vertical"
android:scrollbars="vertical" android:smoothScrollbar="true"/>
Although I followed the old code to changed the xml namespace from xmlns:treeView=http://ift.tt/1F3BDTN to xmlns:treeView=http://ift.tt/14Qj36N. It doesn’t seem like valid xml namespace. It turned out that the namespace needs to be xmlns:treeView="http://ift.tt/GEGVYd" if we reference as a library project.
This answer from stackoverflow too didnt help.
No comments:
Post a Comment