诛仙2死泽剧情任务长生遗址迷踪显获得的寻宝铲怎么用?

诛仙2

峇亼 峇亼
回答
  • 甜心小样 甜心小样

    linearlayout(线性布局):
    这种布局比较常用,也比较简单,就是每个元素占一行,当然也可能声明为横向排放,也就是每个元素占一列。linearlayout按照垂直或者水平的顺序依次排列子元素,每一个子元素都位于前一个元素之后。如果是垂直排列,那么将是一个n行单列的结构,每一行只会有一个元素,而不论这个元素的宽度为多少;如果是水平排列,那么将是一个单行n列的结构。如果搭建两行两列的结构,通常的方式是先垂直排列两个元素,每一个元素里再包含一个linearlayout进行水平排列。linearlayout中的子元素属性android:layout_weight生效,它用于描述该子元素在剩余空间中占有的大小比例。加入一行只有一个文本框,那么它的默认值就为0,如果一行中有两个等长的文本框,那么他们的android:layout_weight值可以是同为1。如果一行中有两个不等长的文本框,那么他们的android:layout_weight值分别为1和2,那么第一个文本框将占据剩余空间的三分之二,第二个文本框将占据剩余空间中的三分之一。android:layout_weight遵循数值越小,重要度越高的原则。xml version="1.0"encoding="utf-8?xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical
    android:layout_width="fill_parent
    android:layout_height="fill_parent">
    android:layout_width="fill_parent
    android:layout_height="wrap_content
    android:background="#ff000000
    android:text="@string/hello"/>
    android:orientation="horizontal
    android:layout_width="fill_parent
    android:layout_height="fill_parent">
    android:layout_width="fill_parent
    android:layout_height="wrap_content
    android:background="#ff654321
    android:layout_weight="1
    android:text="1"/>
    android:layout_width="fill_parent
    android:layout_height="wrap_content
    android:background="#fffedcba
    android:layout_weight="2
    android:text="2"/>
    步骤阅读
    2
    framelayout(单帧布局):
    framelayout是五大布局中最简单的一个布局,可以说成是层布局方式。在这个布局中,整个界面被当成一块空白备用区域,所有的子元素都不能被指定放置的位置,它们统统放于这块区域的左上角,并且后面的子元素直接覆盖在前面的子元素之上,将前面的子元素部分和全部遮挡。如下,第一个textview被第二个textview完全遮挡,第三个textview遮挡了第二个textview的部分位置。xml version="1.0"encoding="utf-8?xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"android:layout_width="fill_parent
    android:layout_height="fill_parent">
    android:layout_width="fill_parent
    android:layout_height="fill_parent
    android:background="#ff000000
    android:gr**ity="center
    android:text="1"/>
    android:layout_width="fill_parent
    android:layout_height="fill_parent
    android:background="#ff654321
    android:gr**ity="center
    android:text="2"/>
    android:layout_width="50dp
    android:layout_height="50dp
    android:background="#fffedcba
    android:gr**ity="center
    android:text="3"/>
    步骤阅读
    3
    relativelayout(相对布局):
    relativelayout按照各子元素之间的位置关系完成布局。在此布局中的子元素里与位置相关的属性将生效。例如android:layout_below,android:layout_above,android:layout_centervertical等。注意在指定位置关系时,引用的id必须在引用之前,先被定义,否则将出现异常。relativelayout是android五大布局结构中最灵活的一种布局结构,比较适合一些复杂界面的布局。xml version="1.0"encoding="utf-8?xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical
    android:layout_width="fill_parent
    android:layout_height="fill_parent">
    android:id="@id/text_01
    android:layout_width="50dp
    android:layout_height="50dp
    android:background="#ffffffff
    android:gr**ity="center
    android:layout_alignparentbottom="true
    android:text="1"/>
    android:id="@id/text_02
    android:layout_width="50dp
    android:layout_height="50dp
    android:background="#ff654321
    android:gr**ity="center
    android:layout_above="@id/text_01
    android:layout_centerhorizontal="true
    android:text="2"/>
    android:id="@id/text_03
    android:layout_width="50dp
    android:layout_height="50dp
    android:background="#fffedcba

类似问答
精品推荐

友情链接

友链互换QQ:

谷财 备案编号:蜀ICP备11019336号-3商务合作:235-677-2621

Copyright 2009-2020 Chengdu Sanzilewan Technology Co.,Ltd all rights reserve

抵制不良游戏 拒绝盗版游戏 注意自我保护 谨防受骗上当 适度游戏益脑 沉迷游戏伤身 合理安排时间 享受健康生活