android灵活布局

发布时间:2020-07-10 08:35:19 作者:王屯屯
来源:网络 阅读:549

如何像在jsp页面布局一样,在android界面布局

在res->layout文件夹下,新建xml文件。

在src文件中设置布局文件为刚刚新建的xml文件

android灵活布局

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TableLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:stretchColumns="1"
>
<TableRow >
<TextView
android:text="ceshi"
android:id="@+id/layoutTextView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#ffff"
>
</TextView>
<EditText
android:text=""
android:id="@+id/EditText01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</TableRow>
<TableRow android:gravity="right">
<Button
android:text="test"
android:id="@+id/layoutButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</TableRow>
</TableLayout>
</LinearLayout>

 

推荐阅读:
  1. CSS3中更灵活的布局方式
  2. android实现综合布局

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

android xml 布局 灵活 roi

上一篇:2、SRX笔记及基础配置

下一篇:python的内置属性__file__

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》