Android 从服务器更新 TextView(新闻提要)
我正在尝试为用户开发一种新闻源,作为我的应用程序的一部分。当用户打开应用程序时,应用程序顶部会出现一个框,其中包含问候语和有关用户的信息或其他信息。该信息将从服务器中提取。我想我只是回答了我自己的问题。 HTTP Get 是解决这个问题的最佳方法吗?那么它发送一个请求,然后根据从服务器收到的信息更新文本视图或其他内容?
I am trying to develop as part of my app a sort of news feed for the user. When the user opens the app there will be a box at the top of the app which includes a greeting and information about the user or other information. This information would be pulled from a server. I think I just answered my own question. Would an HTTP Get be the best way to go about this? So it sends a request then updates the textview or whatever according to the information it recieves from the server?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 HttpClient 从网络获取数据,但是确保您在 AsyncTask 内执行此操作,这样您的应用程序就不会停止回应。
Use an HttpClient to get data from the network, but make sure you do this inside of an AsyncTask so your application doesn't stop responding.