安卓常见错误界面不显示
2015-08-22 20:05
232 查看
<span style="font-size: 14px;">新手刚刚学安卓,今天在编辑xml页面时,预览不出来,运行后也找不出来问题,非常苦恼,找不到问题出在哪,运行也没有显示出错,这是我的xml代码:</span>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:background="#000000" > <TextView android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="手机QQ" /> <EditText android:id="@+id/et_name" android:layout_width="fill_parent" android:layout_height="wrap_content" android:hint="请输入你的名字" /> <EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/et_pwd" android:inputType="textPassword" android:password="true" android:hint="请输入你的密码" /> <RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content"> <Button android:id="@+id/bt_login" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:text="登录"/> <CheckBox android:id="@+id/cb_remember_pwd" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:checked="false" android:text="记住密码"/> </RelativeLayout> </LinearLayout>到最后我才找到问题出在哪,是我的第一个<TextView >中的<layout_height>设置成了“fill_parent”,将其改变成"wrap_content",就可以了。
相关文章推荐
- CPANPLUS 的使用
- OC中常用的数组排序有以下几种方法
- largest rectangle in histogram leetcode
- 数据归一化的两种常用方法
- POJ3258-- River Hopscotch
- 苹果游戏TWS's MixMaster已在App Store上架,欢迎大家捧场
- MySQL的一些基本操作总结了一部分(通过自己创建的一个表)
- 运行级别
- CodeForcesGym 100676G Training Camp
- 2016华为机试题(不知到底是不是)
- Codeforces Round #316 (Div. 2)
- ThreadLocal原理与用法
- 快速排序partition过程常见的两种写法+快速排序非递归实现
- 迷之博弈 SDUT 3038
- Valid Anagram
- github
- javascript之函数表达
- java8 Stream
- Objective_C内存管理_note
- 习惯性的对自己没信心,其实没想到自己已经变强大了。