我正在尝试使用jfeinstein sliding menu,那个imho看起来很有希望。我喜欢用using the layout config工作的想法,而不是代码。我有以下非常简单的布局配置。
<com.slidingmenu.lib.SlidingMenu
xmlns:sliding="http://schemas.android.com/apk/res-auto"
android:id="@+id/slidingmenulayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
sliding:viewAbove="@layout/customforabove"
sliding:viewBehind="@layout/customforbehind"
sliding:behindOffset="120dip"
sliding:behindScrollScale="0.25"
/&GT;
但我收到一条关于未绑定前缀的错误。我不知道是不是因为xmlns之后的滑动,还是其他任何原因。
提前Tks!
答案 0 :(得分:0)
我认为应该是
xmlns:sliding="http://schemas.android.com/apk/res/auto"
(没有破折号)
并将“auto”替换为包名称,以便在哪里找到滑动菜单库
尝试:
xmlns:sliding="http://schemas.android.com/apk/res/com.slidingmenu.lib"
这应该是你使用它的任何资源文件的顶层元素(在xmlns旁边:android是正确的位置)
答案 1 :(得分:0)
属性'android:id','android:layout_width'和'android:layout_height'名称中的“android”也是名称空间前缀,因此通常需要一个名为'xmlns的适当填充属性: android'在标记中的某个地方。
答案 2 :(得分:0)
我在一分钟前得到了这个答案。 修复它:
xmlns:android="http://schemas.android.com/apk/res/android"