觅踪2

摘要:
昨天的页面设计被搁置了。今天,它已经改变了一种形式。它以前直接用键绘制,但现在已经改变为代码操作。它的进展要慢得多。明天,我将继续加油。接口代码如下:˂?

        昨天的页面设计受到了停滞,今天换了一种形式,之前是直接用按键绘制,现在改为代码操纵,自己的进程缓慢了许多,明天将继续加油

界面代码如下:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
    tools:context=".MainActivity"
    android:orientation="vertical"
    android:layout_gravity="center"
    android:background="@drawable/tim">


    <TextView
        android:layout_width="match_parent"
        android:layout_height="76dp"
        android:layout_marginTop="25dp"
        android:gravity="center"
        android:text="@string/mizong"
        android:textColor="#000000"
        android:textSize="45sp"
        android:textStyle="bold">

    </TextView>

    <RelativeLayout
        android:id="@+id/text_1"
        android:layout_height="70dp"
        android:layout_width="match_parent"
        android:layout_marginTop="50dp"
        android:layout_marginLeft="50dp"
        android:layout_marginRight="50dp">
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="60dp"
            android:text="@string/zhanghu"
            android:textSize="35sp"

            >

        </TextView>>
        <EditText
            android:layout_height="50dp"
            android:layout_width="match_parent"
            android:autofillHints=""
            android:layout_toRightOf="@id/text_1"
            tools:ignore="NotSibling">

        </EditText>

    </RelativeLayout>>



    <RelativeLayout
        android:id="@+id/text_2"
        android:layout_height="70dp"
        android:layout_width="match_parent"
        android:layout_marginTop="50dp"
        android:layout_marginLeft="50dp"
        android:layout_marginRight="50dp">
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="60dp"
            android:text="@string/password"
            android:textSize="35sp"
            >

        </TextView>
        <EditText
            android:layout_height="50dp"
            android:layout_width="match_parent"
            android:autofillHints=""
            android:inputType="textPassword"
            android:layout_toRightOf="@id/text_2"
            tools:ignore="NotSibling">

        </EditText>

    </RelativeLayout>>

    <LinearLayout
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:layout_gravity="center"
        android:layout_marginTop="20dp">
        <Switch
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp"
            android:text="记住密码"
            android:textSize="25sp"
            android:layout_marginLeft="40dp">

        </Switch>
        <Switch
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp"
            android:text="忘记密码"
            android:textSize="25sp"
            android:layout_marginLeft="70dp"
            >

        </Switch>
    </LinearLayout>
        <LinearLayout
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:layout_gravity="center"
            android:layout_marginTop="10dp">
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="100dp"
            android:text="@string/denglu">

        </Button>

        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="100dp"
            android:text="@string/zhuce"
            >
        </Button>
    </LinearLayout>

</LinearLayout>

免责声明:文章转载自《觅踪2》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇1.2 Install Extension 安装扩展SQL学习日志下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

在Android Studio使用ButterKnife的步骤详解

ButterKnife是一个android的view注入的框架,什么是view注入呢,就是我们经常进行的操作findViewById(),在控件个数和需要添加点击的次数比较少的情况下,并感觉不到有什么区别,但是如果数量比较多的情况下,还一个一个的findViewById(),再添加点击事件的话,那就心态爆炸了,还会容易出错,所以下面介绍一下ButterKn...

转:android中APK开机自动运行

背景知识:当Android启动时,会发出一个系统广播,内容为ACTION_BOOT_COMPLETED,它的字符串常量表示为android.intent.action.BOOT_COMPLETED。只要在程序中“捕捉”到这个消息,再启动之即可。记住,Android框架说:Don't call me, I'll call you back。我们要做的是做好接...

Android菜单详解(五)——使用XML生成菜单

回顾前面的几篇,我们都是直接在代码中添加菜单项,给菜单项分组等,这是比较传统的做法,它存在着一些不足。比如说,为了响应每个菜单项,我们需要用常量来保存每个菜单项的ID等。为此,Android提供了一种更好的方式,就是把menu也定义为应用程序的资源,通过android对资源的本地支持,使我们可以更方便地实现菜单的创建与响应。这一篇就介绍如何使用XML文件来...

从0开始编译安卓 9.0

手机是Google Pixel XL 编译环境的准备 google 9月更新了地址 https://source.android.com/setup/build/initializinghttps://source.android.com/setup/build/building ubuntu 16.0.4 x64 需要安装的软件包 看上面 的网址 经过测...

Android之shape属性详解

有时候 ,为了满足一些需求,我们要用到 shape 去定义 一些背景,shape 的用法 跟图片一样 ,可以给View设置 Android:background=”@drawable/shape”, 定义的shape 文件,放在 res/shape 目录下 通常我们可以用shape 做 button 的背景选择器,也可以做切换tab 时,底部的下划线。...

Android Visibility控件显示和隐藏

Android控件显示和隐藏 visibility   可见(visible) XML文件:android:visibility="visible" Java代码:view.setVisibility(View.VISIBLE); 不可见(invisible) XML文件:android:visibility="invisible" Java代码:vie...