• 第一阶段团队冲刺第二天


      今天进行界面的设计,主要也是对登录界面的设计,对编辑框进行美化,对按钮进行样式的优化。

    实现这些需要在控件的background属性中加入代表样式的xml,在drawable中新建xml,然后对控件的样式进行美化和修改。

    对于整体的布局,我使用的Linearlayout,在我的感觉里这样编写出来的界面还是比较层次清晰的。

    布局代码如下:

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:background="@drawable/bag_2"
    tools:context=".">
    <LinearLayout
    android:layout_width="match_parent"
    android:layout_height="280dp">
    </LinearLayout>
    <LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal">
    <LinearLayout
    android:layout_weight="1"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">
    </LinearLayout>
    <LinearLayout
    android:layout_weight="2"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">
    <TextView
    android:id="@+id/zced"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="还没有?点我注册"
    />
    </LinearLayout>
    </LinearLayout>
    <LinearLayout
    android:layout_width="match_parent"
    android:layout_height="10dp">
    </LinearLayout>
    <EditText
    android:id="@+id/DLID"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/rounded_editview"
    android:gravity="center"
    android:hint="输入账号"
    android:inputType="number"
    android:maxLength="6"
    android:padding="8dp"
    android:textColorHint="@color/white"
    android:textSize="16sp"
    />

    <LinearLayout
    android:layout_width="match_parent"
    android:layout_height="20dp"></LinearLayout>
    <EditText
    android:id="@+id/DLPA"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/rounded_editview"
    android:gravity="center"
    android:hint="输入密码"
    android:inputType="textPassword"
    android:maxLength="16"
    android:padding="8dp"
    android:textColorHint="@color/white"
    android:textSize="16sp"
    />
    <LinearLayout
    android:layout_width="match_parent"
    android:layout_height="20dp">
    </LinearLayout>
    <LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content">


    <Button
    android:id="@+id/dlbt"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@animator/btn_nor_down"
    android:text="登录"
    />
    </LinearLayout>

    </LinearLayout>
  • 相关阅读:
    设计模式概述
    Android之.9.png图片的制作与使用
    2015-4-3~2015-5-28 第四届全国大学生软件设计大赛《解密陌生人》项目总结
    排序算法之快速排序
    AsyncTask那些事(更新中...)
    经典Android面试题
    import第三方库的头文件找不到的错误
    点击某个按钮在tableView某个位置动态插入一行cell
    NSUserDefaults:熟悉与陌生(转)
    更改UIsearchbar 的背景和cancel按钮(转)
  • 原文地址:https://www.cnblogs.com/ruangongwangxiansheng/p/14911658.html
Copyright © 2020-2023  润新知