首页 > 系统服务 > 详细

Eclipse布局文件添加两个TextView,为什么运行后置显示一个

时间:2015-06-26 16:12:32      阅读:183      评论:0      收藏:0      [点我收藏+]
下面是布局文件里的代码,有两个TextView,但是为什么运行后只显示第一个TextView??
 1 <?xml version="1.0" encoding="utf-8"?>
 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 3     android:layout_width="match_parent"
 4     android:layout_height="match_parent"
 5     android:orientation="vertical" >
 6     <TextView
 7         android:layout_width="match_parent"
 8         android:layout_height="match_parent" 
 9         android:text="第一个TextView"/>
10     
11     <TextView
12         android:layout_width="match_parent"
13         android:layout_height="match_parent" 
14         android:text="第二个TextView"/>
15 
16 </LinearLayout>

解决办法:
android:layout_width="match_parent"

android:layout_height="match_parent"

改成wrap_content吧

Eclipse布局文件添加两个TextView,为什么运行后置显示一个

原文:http://www.cnblogs.com/wsjwin/p/4602509.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!