2013-08-01 27 views
1

这里是我的一个TextViews的XML布局示例,它在Android 4.2中正确显示自己...我已将Nexus S降级为姜饼2.3.6以测试我的应用程序并对其进行调试!现在,我的每个TextView都不会占用比一行更多的空间,甚至不会在第一行结尾包装自己。 (在4.2上,下面的例子是3行,并在最后添加“...”,如果有一些文本丢失!)textview不走多线

如何让我的textViews与姜饼兼容?谢谢!

<TextView 
      android:id="@+id/TV_guideRow_subtitle" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:layout_alignLeft="@+id/TV_guideRow_title" 
      android:layout_below="@+id/TV_guideRow_title" 
      android:text="blabla text that could go up to 3 lines" 
      android:textColor="#3BB9FF" 
      android:layout_alignParentRight="true" 
      android:layout_above="@+id/TV_guideRow_more" 
      android:layout_marginRight="8dp" 
      android:layout_marginBottom="3dp" 
      android:ellipsize="end" 
      android:maxLines="3"/> 

回答

1

经过一番更多的研究,我发现,我所有的相关的TextView问题均与我的自定义主题,这是为Android 4.0+做(因为全息作为基本主题)

我已经设置了没有holo的API来使用“Light”主题,并且没有任何进一步修改,所有内容都正确显示。

+0

因为完全相同的问题,我疯了3天。非常感谢!! – jujujuijk

+0

很高兴我能帮到你:) – Shinnyx

1

你想:

android:inputType="text|textMultiLine" 

另外,根据该TextView的父,多可能无法正常渲染。尝试手动设置高度,例如,100dp,看看是否有效。