<LinearLayout android:orientation="vertical" android:layout_width="wrap_content"
android:id="@+id/contentLayout" android:layout_height="wrap_content"
android:background="@drawable/text_box_middle_imanage" >
<TextView android:text="header text here" android:layout_width="match_parent" android:gravity="center" android:layout_height="wrap_content"/>
<TextView android:text="large content Text here" android:layout_width="match_parent" android:layout_height="wrap_content"/>
</LinearLayout>
我想为单个背景设置多个textViews。所以我把所有的文本视图放在一个linearLayout中,并在这个线性布局中添加背景。有一个标题文本和一些内容文本被组织成多个TextViews。我面临的问题是:当我在第二个textView中放大文本时,它正在扩展布局,但我希望背景图像应该固定不应该扩大添加文本。所有的文本都应该只存在于后台边界。我知道这不是很棘手,但我是Android新手,所以面临这个问题。修复TextView背景问题
我知道一种给线宽布局固定宽度(px或dp)的方法,但它不是一个好方法(如果我是正确的)。有没有其他方法?
这里是屏幕截图,你能弄清楚这个问题:http://postimage.org/image/1a8d1g538/
你想有背景图像的每个TextView的或单一的背景并且你重叠了所有的TextView? – 2011-03-31 07:22:29
是一个单一的背景,并且你重叠了所有的TextViews。 – 2011-03-31 07:25:56
你可以把一些示例屏幕截图? – 2011-03-31 07:28:38