zoukankan      html  css  js  c++  java
  • Android 布局测试

    wrap_content

    <Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="测试填满父控件的空白" />

    layout_marginTop

    <Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="20dp"
        android:text="测试与上边的距离" />

    layout_marginLeft

    <Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="50dp"
        android:text="测试与左边距离" />

     

    paddingLeft

    <Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingLeft="40sp"
        android:text="测试空间内左边距" />

    padding

    <Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingTop="20sp"
        android:paddingBottom="20sp"
        android:paddingLeft="40sp"
        android:paddingRight="40sp"
        android:text="测试空间内边距" />

    gravity

    <Button
        android:id="@+id/button1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:text="测试文字居中" />

    <Button
        android:id="@+id/button1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:gravity="left"
        android:text="测试文字居左" />

    <Button
        android:id="@+id/button1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:gravity="right"
        android:text="测试文字居右" />

     

  • 相关阅读:
    路飞学城-Python开发集训-第3章
    路飞学城-Python开发集训-第2章
    路飞学城-Python开发集训-第1章
    Python:Day55 ORM多表操作
    Python:Day54 ORM
    Django的auth【认证】模块简介
    importlib的用法
    Django中的forms一些小点
    利用xlrd模块读取excel利用json模块生成相应的json文件的脚本
    json的内容回顾
  • 原文地址:https://www.cnblogs.com/zhangxuechao/p/11772675.html
Copyright © 2011-2022 走看看