小编fad*_*kin的帖子

PG :: ConnectionBad - 无法连接到服务器:连接被拒绝

每次我运行我的rails 4.0服务器,我得到这个输出.

Started GET "/" for 127.0.0.1 at 2013-11-06 23:56:36 -0500

PG::ConnectionBad - could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (fe80::1) and accepting
TCP/IP connections on port 5432?
: …
Run Code Online (Sandbox Code Playgroud)

ruby database-connection ruby-on-rails pg rails-postgresql

253
推荐指数
15
解决办法
22万
查看次数

创建可扩展的RecyclerView

我正在尝试实现一个回收视图,其行为类似于下面的草图:

在此输入图像描述

这个想法是有一个父列表,当点击父列表中的列表项时,该列表项显示包含它自己的数据的子列表.当在子列表中点击列表项时,将反映该子项的值,并更新父列表项中父项的值.

我试图让它在过去3天工作无济于事.我尝试使用AdvancedReyclerview库,但对于像我这样的初学者来说,这是一件非常混乱的事情,特别是在传入数据时没有意义.我复制并粘贴了我需要的文件以获得最小的工作版本,但我不知道如何将我的数据传递到recyclerview以及如何使用新选择的值更新它.

甚至可以做我正在尝试做的事情,还是我离开了我的深度?

如果仍然难以理解,我可以解释一下.

编辑:有人建议我使用ExpandableListView而不是RecyclerView.有什么想法吗?

android listview expandablelistview android-recyclerview

18
推荐指数
3
解决办法
3万
查看次数