如何使用android向上滑动面板

如何使用android向上滑动面板,第1张

概述我已经从 https://github.com/umano/AndroidSlidingUpPanel下载了umano向上滑动面板 将其导入工作区并在我的项目中添加对它的引用. 接下来,我将以下内容复制并粘贴到新布局中 – 这是代码: <com.sothree.slidinguppanel.SlidingUpPanelLayout xmlns:sothree="http://schemas 我已经从 https://github.com/umano/AndroidSlidingUpPanel下载了umano向上滑动面板

将其导入工作区并在我的项目中添加对它的引用.

接下来,我将以下内容复制并粘贴到新布局中 –

这是代码:

<com.sothree.slIDinguppanel.SlIDingUpPanelLayout    xmlns:sothree="http://schemas.androID.com/apk/res-auto"    androID:ID="@+ID/slIDing_layout"    androID:layout_wIDth="match_parent"    androID:layout_height="match_parent"    androID:gravity="bottom"    sothree:panelHeight="68dp"    sothree:shadowHeight="4dp">    <TextVIEw        androID:layout_wIDth="match_parent"        androID:layout_height="match_parent"        androID:gravity="center"        androID:text="Main Content"        androID:textSize="16sp" />    <TextVIEw        androID:layout_wIDth="match_parent"        androID:layout_height="match_parent"        androID:gravity="center|top"        androID:text="The Awesome SlIDing Up Panel"        androID:textSize="16sp" /></com.sothree.slIDinguppanel.SlIDingUpPanelLayout>

但我得到一个错误的未绑定前缀.

我的代码有什么问题?

我该如何解决这个问题?

解决方法 你缺少androID的命名空间

还有这个

xmlns:sothree="http://schemas.androID.com/apk/res-auto"

应该

xmlns:sothree="http://schemas.androID.com/apk/res/yourpackagename"

所以它应该是

<com.sothree.slIDinguppanel.SlIDingUpPanelLayoutxmlns:androID="http://schemas.androID.com/apk/res/androID"xmlns:sothree="http://schemas.androID.com/apk/res/yourpackagename"

考虑到你有自定义属性

编辑:

看起来你正在使用

https://github.com/umano/AndroidSlidingUpPanel

它是一个库项目,您必须在您的andorID项目中引用它.如上所述,Scodnly缺少androID命名空间.以下应该解决它

<?xml version="1.0" enCoding="utf-8"?><relativeLayout xmlns:androID="http://schemas.androID.com/apk/res/androID"    xmlns:tools="http://schemas.androID.com/tools"    androID:layout_wIDth="match_parent"    androID:layout_height="match_parent"    tools:context=".MainActivity" ><com.sothree.slIDinguppanel.SlIDingUpPanelLayout    xmlns:sothree="http://schemas.androID.com/apk/res-auto"    androID:ID="@+ID/slIDing_layout"    androID:layout_wIDth="match_parent"    androID:layout_height="match_parent"    androID:gravity="bottom"    sothree:panelHeight="68dp"    sothree:shadowHeight="4dp">    <TextVIEw        androID:layout_wIDth="match_parent"        androID:layout_height="match_parent"        androID:gravity="center"        androID:text="Main Content"        androID:textSize="16sp" />    <TextVIEw        androID:layout_wIDth="match_parent"        androID:layout_height="match_parent"        androID:gravity="center|top"        androID:text="The Awesome SlIDing Up Panel"        androID:textSize="16sp" /></com.sothree.slIDinguppanel.SlIDingUpPanelLayout></relativeLayout>
总结

以上是内存溢出为你收集整理的如何使用android向上滑动面板全部内容,希望文章能够帮你解决如何使用android向上滑动面板所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1136418.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-30
下一篇2022-05-30

发表评论

登录后才能评论

评论列表(0条)

    保存