无法滚动到RecyclerView的底部

时间:2019-07-02 18:27:04

标签: android android-recyclerview recycler-adapter recyclerview-layout

我正在使用简单的聊天应用程序。当用户打开聊天活动时,他必须看到消息滚动到底部。但是现在它不会滚动到底部。滚动到最后一条消息的中间。看截图: enter image description here

第二个问题是-当我在EditText字段中单击以键入新消息时,键盘隐藏了我的消息。我期望使用消息来拉起EditText字段,但是它只是不使用消息来拉起EditText字段。 Se的屏幕截图: enter image description here

如何滚动到RecyclerView的最底端以及如何提取带有消息的编辑文本?

我的代码如下:

data = {
"students": [
    {
        "studentId": 127292,            
        "studentName": "Mary"            
    },
    {
        "studentId": 15555,            
        "studentName": "Joe"            
    }
  ]
}

lookup = {student["studentName"]: student["studentId"] for student in data["students"]}
id_of_joe = lookup.get("Joe", "No student named Joe")

0 个答案:

没有答案
相关问题