【问题标题】:Which control/element to use in android application for conversation thread在 android 应用程序中用于对话线程的控件/元素
【发布时间】:2014-12-04 11:32:27
【问题描述】:

我需要像这样在我的 android 应用程序中显示对话:

Student Message: Hi, this is test message
Instructor's Reply: Thanks for test message
---------------
Student Message: Hi, this is test message
Instructor's Reply: Thanks for test message
-----------------
Student Message: Hi, this is test message
Instructor's Reply: Thanks for test message

你能告诉我应该使用哪个控件来实现这一点。 TextView 还是别的什么??

任何帮助将不胜感激!

谢谢.. 安居姆

【问题讨论】:

  • 文本视图的列表视图

标签: android xml android-activity


【解决方案1】:

你应该使用列表视图..当你从/向服务器重播或发送消息时,不断将列表项添加到列表视图

列表视图示例

http://www.vogella.com/tutorials/AndroidListView/article.html

聊天视图示例 http://javapapers.com/android/android-chat-bubble/

【讨论】:

    【解决方案2】:

    您需要ListView 并将其设置为转录模式。

    话虽如此,要知道实现 ListView 并非易事。 Romain Guy 和 Adam Powell 在 Youtube 上有一个古老的 Google I/O 演讲,谈到了实现 ListViews

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-01-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-03-02
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多