zoukankan      html  css  js  c++  java
  • android 简单的控件前端代码

    1. /Hello_word/res/layout/activity_main.xml

    Graphical  Layout/activity_fullsreen.xml(layout/) 代码与设置界面互换!

        <TextView

            android:id="@+id/textView1"

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:text="@string/hello_world" />

     

        <Button

            android:id="@+id/button1"

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:layout_below="@+id/textView1"

            android:layout_centerHorizontal="true"

            android:layout_marginTop="145dp"

            android:text="Button" />

    ---------------------------------------------------------------------------------------------------------------

        <TextView

            android:id="@+id/textView1"

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:text="@string/hello_world" />

     

        <Button

            android:id="@+id/button1"

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:layout_below="@+id/textView1"

            android:layout_centerHorizontal="true"

            android:layout_marginTop="145dp"

            android:text="你知道的" />

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"

        xmlns:tools="http://schemas.android.com/tools"

        android:layout_width="match_parent"

        android:layout_height="match_parent"

        android:paddingBottom="@dimen/activity_vertical_margin"

        android:paddingLeft="@dimen/activity_horizontal_margin"

        android:paddingRight="@dimen/activity_horizontal_margin"

        android:paddingTop="@dimen/activity_vertical_margin"

        tools:context="com.example.test1.MainActivity" >

     

        <TextView

            android:id="@+id/textView1"

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:text="@string/hello_world" />

     

        <Button

            android:id="@+id/button1"

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:layout_alignParentBottom="true"

            android:layout_centerHorizontal="true"

            android:layout_marginBottom="168dp"

            android:hint="确定功能提示"

            android:text="确定"

            android:textStyle="bold" />

     

        <TextView

            android:id="@+id/textView2"

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:layout_alignLeft="@+id/editText1"

            android:layout_alignParentLeft="true"

            android:layout_alignParentRight="true"

            android:layout_alignRight="@+id/button1"

            android:layout_below="@+id/textView1"

            android:layout_marginTop="59dp"

            android:text="只读文本"

            android:textSize="15pt" 

            android:textColor="#0092c7" />

     

        <EditText

            android:id="@+id/editText1"

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:layout_above="@+id/button1"

            android:layout_centerHorizontal="true"

            android:layout_marginBottom="55dp"

            android:ems="10"

            android:hint="删除完成后显示,提示功能"

            android:text="文本框测试" >

     

            <requestFocus />

        </EditText>

     

    </RelativeLayout>

    ______________________________________________________________________

  • 相关阅读:
    打包spring项目遇到的坑 Unable to locate Spring NamespaceHandler for XML schema ……shcema/context 产生的原因及解决方法
    Mybatis 从入门到精通一:mybatis的入门
    IO流系列一:输入输出流的转换
    本地模拟 gitlab ci 的 demo 项目
    docker 容器中部署 Go 服务时,请求 https 文件时抛错
    微信支付『支付失败,如果已扣款,资金在0-3个工作日原路返回』踩坑案例及解决方案
    PHP 安装 扩展时 抛出 /usr/local/Cellar/php@7.1/7.1.25/pecl 异常解决
    SpringBoot2 引入 Aop
    Mac 下 IDEA 中 SpringBoot 如何利用 DevTool 开启热部署
    MySql数据库中敏感字段加密处理方案
  • 原文地址:https://www.cnblogs.com/hutie1980/p/4451559.html
Copyright © 2011-2022 走看看