Android编程布局控件之AbsoluteLayout用法 Android编程布局控件之AbsoluteLayout用法实例分析

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

Android编程布局控件之AbsoluteLayout用法 Android编程布局控件之AbsoluteLayout用法实例分析

admin   2021-03-20 我要评论
想了解Android编程布局控件之AbsoluteLayout用法实例分析的相关内容吗,admin在本文为您仔细讲解Android编程布局控件之AbsoluteLayout用法的相关知识和一些Code实例,欢迎阅读和指正,我们先划重点:Android,布局控件,AbsoluteLayout,Android布局AbsoluteLayout,下面大家一起来学习吧。

本文实例讲述了Android编程布局控件之AbsoluteLayout用法。分享给大家供大家参考,具体如下:

AbsoluteLayout是绝对布局管理器,指的是指定组件的左上角绝对坐标来指定组件的布局

<?xml version="1.0" encoding="utf-8"?>
<AbsoluteLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical" android:layout_width="fill_parent"
  android:layout_height="fill_parent">
  <Button android:layout_width="wrap_content"
    android:layout_height="wrap_content" android:text="按钮1"
    android:layout_x="0px" android:layout_y="0px" />
  <Button android:layout_width="wrap_content"
    android:layout_height="wrap_content" android:text="按钮2"
    android:layout_x="20px" android:layout_y="20px" />
  <Button android:layout_width="wrap_content"
    android:layout_height="wrap_content" android:text="按钮3"
    android:layout_x="40px" android:layout_y="40px" />
  <Button android:layout_width="wrap_content"
    android:layout_height="wrap_content" android:text="按钮4"
    android:layout_x="60px" android:layout_y="60px" />
</AbsoluteLayout>

运行效果截图如下:

希望本文所述对大家Android程序设计有所帮助。

猜您喜欢

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们