[英]Android application works fine in emulator but not in real device?
[英]Android emulator not displaying a TextView properly (works fine on device)
在模擬器上運行時,我在應用程序中顯示TextViews時遇到了一個小問題,盡管在手機上一切正常。 我知道你們中的大多數人都不會在意這一點,但是我必須獲得我的應用程序的高質量屏幕截圖(這是我的畢業項目,我需要這些屏幕截圖包含在項目文檔中)。
在XML布局文件中填充了某些值的那些TextView可以正確顯示。 但是,在用戶登錄后動態填充的那些內容(來自Web服務的String值)僅會部分顯示,就像僅顯示該行的上半部分一樣,您可以在此屏幕快照中看到它:
正如我提到的,在我的設備(Samsung i5510)上一切正常顯示。 這些TextView是TableLayout和每一行的一部分(左列為靜態標簽,右列為動態值)。 XML布局如下:
<TableRow android:id="@+id/brandTableRow" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:orientation="horizontal"
android:paddingBottom="2sp" android:paddingTop="2sp">
<TextView android:id="@+id/brandLabel" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="Model pojazdu:"
android:layout_column="1">
</TextView>
<TextView android:id="@+id/brandTextView"
android:layout_width="wrap_content" android:layout_height="12px"
android:text="" android:gravity="right">
</TextView>
</TableRow>
<TableRow android:id="@+id/widget67" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:orientation="horizontal"
android:paddingBottom="2sp" android:paddingTop="2sp">
<TextView android:id="@+id/widget40" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="Ping:"
android:layout_column="1">
</TextView>
<TextView android:id="@+id/pingTextView"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:text="n/a" android:gravity="right">
</TextView>
</TableRow>
我該如何解決?
可能是因為您在textviews上填充了內容。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.