这是mo.xml中:
- XML code
<com.android.yang.pan android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/rightPan" android:layout_gravity="right" mo:position="right" mo:open="@drawable/h1" mo:close="@drawable/h2" > <Button android:id="@+id/pan" android:layout_width="40dip" android:layout_height="65dip" /> <LinearLayout android:id="@+id/panCo" android:orientation="vertical" android:layout_width="95dip" android:layout_height="150dip" android:background="@drawable/co1"> </LinearLayout> </com.android.yang.pan>
复制代码
在android1.6上没错,但在android2.2上,这部分报错:
mo:position="right" mo: open="@drawable/h1"
mo:close="@drawable/h2"
报错如下:
packages/ps/yang/res/layout/mo.xml:83: error: No resource identifier found for attribute 'position' in package 'com.android.yang'
packages/ps/yang/res/layout/mo.xml:83: error: No resource identifier found for attribute 'open' in package 'com.android.yang'
packages/ps/yang/res/layout/mo.xml:83: error: No resource identifier found for attribute 'close' in package 'com.android.yang'
这到底是怎么回事?高手解答提示!
------解决方案--------------------
你换个环境试试,公司不行家里去
自己电脑不行,用别人的试试
------解决方案--------------------
我也碰到过这个问题,不知道怎么就弄好了
------解决方案--------------------
------解决方案--------------------
是不是2.2把这些属性删了不支持!!!
帮up
------解决方案--------------------
------解决方案--------------------
1. 确认mo:position这些个属性有在res文件下定义
2. 在xml中调用xmlns:mo="http://schemas.android.com/apk/res/com.android.mo"
------解决方案--------------------
把那几个xml都贴出来吧,涉及到你自定义的属性和调用它的XML文件内容全贴出来
------解决方案--------------------
讨论不错加精!