I want to achieve the following effects


I realize now, click on the date, completion date of switching function, and also can choose according to the date of the read data from a mysql database, but did not update after read data interface,
This is my code






How do I modify the

CodePudding user response:
After the date I click, a list of theaters have not changed, is it runOnUiThread didn't performprivate fun getAllTrainInfoJson2 (position: Int) {
Thread {
Try {
Val client=OkHttpClient ()
Val requestBody=FormBody. Builder ()
. The add (" movie_Name, "URLEncoder encode (movie_Name," utf-8 "))
. The add (" date ", URLEncoder encode (dateList [position]. The date, "utf-8"))
The build ()
//build request
Val request=request. Builder ()
The url (searchCinemaByDate_jsp)
.post (requestBody)
The build ()
//execution
Val response=client. NewCall (request). The execute ()
//get the return value
Val responseData=https://bbs.csdn.net/topics/response.body? The string ()
//txtData. Text=responseData
Val result=parseJson2 (responseData)
If (responseData!=null) {
RunOnUiThread {//????
//modify layout
ShowTTTTT. SetText (" I changed the layout ")
//mAdapter2? NotifyDataSetChanged ()
}
}
{} the catch (e: Exception)
E.p rintStackTrace ()
}
}
}


