首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Android >

请问一个android界面排版的有关问题

2012-04-10 
请教一个android界面排版的问题界面就是这样的:现在用的main.xml如下:?xml version1.0 encodingutf-

请教一个android界面排版的问题
界面就是这样的:

现在用的main.xml如下:
<?xml version="1.0" encoding="utf-8"?>

XML code
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:layout_width = "fill_parent"    android:layout_height = "wrap_content"    android:stretchColumns = "1"> <TableRow     android:layout_width="fill_parent"     android:layout_height="wrap_content" >     <TextView      android:text = "@string/number_prefix"      android:layout_width = "wrap_content"      android:layout_height = "wrap_content" />     <EditText         android:id = "@+id/EditPrefix"         android:inputType = "number"         android:layout_width = "wrap_content"         android:layout_height = "wrap_content" /> </TableRow>  <TableRow     android:layout_width="fill_parent"     android:layout_height="wrap_content" >     <TextView      android:text = "@string/password"      android:layout_width = "wrap_content"      android:layout_height = "wrap_content" />     <EditText         android:id = "@+id/EditPassword"         android:layout_width = "wrap_content"         android:layout_height = "wrap_content" /> </TableRow>  <TableRow     android:layout_width="fill_parent"     android:layout_height="wrap_content" >     <TextView      android:text = "@string/province"      android:layout_width = "wrap_content"      android:layout_height = "wrap_content" />     <EditText         android:id = "@+id/EditProvince"         android:layout_width = "wrap_content"         android:layout_height = "wrap_content" /> </TableRow>  <TableRow     android:layout_width="fill_parent"     android:layout_height="wrap_content" >     <TextView      android:text = "@string/start_number"      android:layout_width = "wrap_content"      android:layout_height = "wrap_content" />     <EditText         android:id = "@+id/EditStart"         android:inputType = "number"         android:layout_width = "wrap_content"         android:layout_height = "wrap_content" /> </TableRow>  <TableRow     android:layout_width="fill_parent"     android:layout_height="wrap_content" >     <Button      android:id = "@+id/Login"      android:text = "@string/login"      android:layout_width = "wrap_content"      android:layout_height = "wrap_content" />      </TableRow> </TableLayout>

“登录”按钮感觉太窄了点,想把它变得跟整个界面一样宽,怎么实现?改了很长时间都没成功

[解决办法]
。 lin..layout 布局就可以了。
[解决办法]
恩,大部分问题都是自己解决的

热点排行