zoukankan      html  css  js  c++  java
  • Android开始之布局常用属性

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/line"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"

    android:background="#CCDDCC"
    >
    <!-- android:gravity="center_vertical"
         android:layout_marginLeft="30dp" 位于父布局左边30dp
         控件尺寸用dp ;字体大小sp
          android:paddingTop="40dp" 内边距-->
    <Button
    android:id="@+id/button1"
    android:layout_width="200dp"
    android:layout_height="100dp"
    android:layout_marginLeft="30dp"
    android:layout_marginTop="30dp"

    android:paddingTop="40dp"
    android:textSize="20sp"
    android:text="@string/login" />
    <EditText
    android:id="@+id/name"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:hint="@string/hint"
    />
    </LinearLayout>

  • 相关阅读:
    Java Object类及其常用方法
    Java 抽象类和抽象方法
    Java 多态
    Java 继承
    Java Scanner类
    正则表达_1
    「暑期集训day14」掠影
    「暑期集训day13」苦闷
    「暑期集训day12」苦楚
    「暑期集训day11」旧殤
  • 原文地址:https://www.cnblogs.com/my334420/p/6436029.html
Copyright © 2011-2022 走看看