【发布时间】:2014-04-08 11:30:55
【问题描述】:
我正在编写一个使用 PHP 从远程数据库中提取数据的 Android 应用程序。我编写了 PHP 代码以将表格的全部内容下载到应用程序。如果我在浏览器中查看 PHP,所有数据都以文本形式显示。但是,当我在应用程序中查看它时,文本会被截断。
这是数据被输入的 TextView 的代码:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:scrollbars = "vertical"
android:textAppearance="?android:attr/textAppearanceSmall" />
将根据要求提供任何其他代码,我只是不确定还有什么与此相关。
这是它在浏览器中的屏幕截图: https://dl.dropboxusercontent.com/u/8062829/Screen%20Shot%202014-04-08%20at%202.46.01%20PM.png
下面是它在我的设备上的外观截图: https://dl.dropboxusercontent.com/u/8062829/Screenshot_2014-04-08-14-37-09.png
【问题讨论】:
-
共享整个 XML。
-
快照可能也会有所帮助。
-
添加了完整的 XML 和快照。
-
当您将 HTTP 操作的结果记录到文件中并检查该文件以确定您是否成功下载了 Android 中的所有数据时,您学到了什么?
-
如何记录结果?
标签: php android textview truncation