- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
我有一个用于抽屉导航的 ListView ,如何将“添加 friend ”、“设置”等列表项放在 ListView 的底部。
更新 1
我在页脚 View 中添加了一个设置 View 。
View settingView = getLayoutInflater().inflate(R.layout.drawer_list_item, null);
TextView textView = (TextView)settingView.findViewById(R.id.drawer_list_item_text_view);
textView.setText("Settings");
drawerListView.addFooterView(settingView);
设置项成功出现在 ListView 的最后一项。但是我怎样才能让它粘在底部并对齐呢?谢谢。
最佳答案
您可以将 ListView
放入 RelativeLayout
并将 android:layout_gravity="start"
分配给 RelativeLayout
。并将 android:layout_alignParentBottom="true"
属性设置为要设置为 ListView
底部的 View 。
这可能会对你有所帮助。
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<FrameLayout
android:id="@+id/content_frame"...../>
<RelativeLayout
android:id="@+id/relative_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="start" >
<ListView
android:id="@+id/left_drawer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#111"
android:choiceMode="singleChoice"
android:divider="@android:color/transparent"
android:dividerHeight="0dp" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
<TextView
android:id="@+id/text_view1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Add Friends" />
<TextView
android:id="@+id/text_view2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Settings" />
</RelativeLayout>
</RelativeLayout>
</android.support.v4.widget.DrawerLayout>
关于android - 如何在 Foursquare 等抽屉导航中将列表项放在 ListView 的底部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19156476/
我查看了 Foursquare API 文档,但我找不到让 Foursquare 告诉我用户通过特定 checkin 获得多少积分的方法。 最佳答案 checkin 响应有一个字段 score文档中(
我正在开发一款允许用户搜索 Foursquare 的 iPhone 应用程序。我正在使用 venues/explore 端点进行搜索,效果很好,但结果不包括地点或 priceTier 的图像。 现在我
已关闭。这个问题是 off-topic 。目前不接受答案。 想要改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 已关闭10 年前。 Improve th
可以在网站上添加 Foursquare 签到功能吗? 最佳答案 虽然您可以在网站上提供签到功能,但请谨慎使用并意识到可能难以遵守适当的 Foursquare API 要求。 (张贴者 amelvin
我已经浏览了foursquare api,但找不到我想要的。 我需要获取所有地名、城市名称、国家/地区名称以及经度和纬度。 有具体的 api url 吗? 提前致谢。 最佳答案 如果您可以构建一个好的
我已经查看了 foursquare api,但是找不到我想要的。 我需要获取所有地名、城市名、国家名和经纬度。 是否有任何特定的 api url? 提前致谢。 最佳答案 如果您可以构建一个好的守护进程
提前感谢您的宝贵时间。 我想知道如何通过传递 Foursquare 类别 ID 以编程方式获取 Foursquare 类别的相应图像。 p> 我已经阅读了 API 文档,但到目前为止还没有找到解决方案
我正在尝试获得对 specific restaurant 的评论使用 Foursquare API,但我没有得到与 Foursquare 网站上相同的(所有)结果。 我使用了 Foursquare A
这是我的链接,它提供了 foursuqare field 的结果,但是当我应用从 0 到 2 等的偏移量时,它在每次运行中都为我提供了相同的结果。 https://api.foursquare.com
Foursquare API v2 不支持消费者的多个回调 URL 有什么原因吗?必须为每个测试环境定义一个全新的应用程序,这对开发运营来说是一个很大的障碍。据我所知,没有其他主要网络将应用重定向限制
有谁知道是否可以从移动网页启动 iPhone 或 Android Foursquare 应用程序?我们可以使用自定义 URL 方案吗? 如果用户安装了应用程序而不是网站,我们的客户希望为用户提供使用该
新的 field url 更漂亮,但 ID 不存在,并且没有机制从漂亮的 url 中查找 ID。 例如,这个特定的 url: https://foursquare.com/felice_83 如何查询
包含 categoryId 参数时,我从 API 查询中获得了意外结果。 例如,当使用以下参数在马萨诸塞州波士顿搜索“The Citizen Public House”时 ll: 42.3489027
我正在开发一个应用程序,它通过 Foursquare 的原生 oauth for Android 库连接到 Foursquare。我已经实现了 Foursquare 在其 github 个人资料中建议
在 Foursquare API Explorer 窗口中,我们使用端点“venues/search?ll=39.8647,-86.2604&intent=browse&radius=20000&li
我从 Foursquare API 开始,在 Python ,而且我不确定为什么我无法进行身份验证。 按照教程,到目前为止,我有这段代码: import foursquare client = fou
我正在调用 Foursquare Venue API 来获取伦敦的所有美食场所。 使用的API是:https://api.foursquare.com/v2/venues/explore?ll=51.
今天早上,我看到 Foursquare 将其单一服务拆分为 2 个 - 一个称为 Swarm,另一个保留 Foursquare 名称。我查看了 Foursquare 开发者博客,但(目前)还没有看到任
这对我来说没有多大意义,我希望有人可以对这里发生的事情以及我如何解决它有所了解。 如果我这样查询: https://api.foursquare.com/v2/venues/search?ll=37.
是否可以以贪婪的方式从foursquare抓取签到数据? (即使我与所有用户都没有友谊)就像抓取公开可用的 twitter 消息一样。如果您有任何经验或建议,请分享。谢谢。 最佳答案 如果您有包含指向
我是一名优秀的程序员,十分优秀!