在线咨询
微信咨询
服务热线
服务热线:15639912513
TOP
当前位置:
首页 > 新闻中心> 安卓课堂>Android布局Skype登录界面实例

Android布局Skype登录界面实例

发布时间:2020-02-09 浏览:3475次

郑州app开发Android布局Skype登录界面,下面是布局的代码:

{?xml version="1.0" encoding="utf-8"?}

{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="#02aef0"

    tools:context=".MainActivity"}


    {RelativeLayout

        android:layout_width="match_parent"

        android:layout_height="0dp"

        android:layout_weight="1"

        android:paddingLeft="30dp"

        android:paddingRight="30dp"}


        {Button

            android:id="@+id/xhhmicrosoft"

            android:layout_width="match_parent"

            android:layout_height="wrap_content"

            android:layout_alignParentBottom="true"

            android:background="@drawable/bg_blue"

            android:text="Microsoft账户"

            android:textColor="@android:color/white" /}


        {Button

            android:id="@+id/xhhskype"

            android:layout_width="match_parent"

            android:layout_height="wrap_content"

            android:layout_above="@+id/xhhmicrosoft"

            android:layout_marginBottom="10dp"

            android:background="@drawable/bg_blue"

            android:text="Skype用户名"

            android:textColor="@android:color/white" /}

        {TextView

            android:id="@+id/xhhlogin"

            android:layout_above="@+id/xhhskype"

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:layout_marginBottom="20dp"

            android:layout_centerHorizontal="true"

            android:text="登录"

            /}

        {ImageView

            android:src="@drawable/logo"

            android:layout_above="@+id/xhhlogin"

            android:layout_marginBottom="30dp"

            android:layout_centerHorizontal="true"

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            /}

    {/RelativeLayout}


    {RelativeLayout

        android:layout_width="match_parent"

        android:layout_height="0dp"

        android:layout_weight="1"


        android:paddingTop="15dp"

        }


        {LinearLayout

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:orientation="horizontal"

            android:paddingLeft="40dp"

            android:paddingRight="30dp" }


            {ImageView

                android:layout_width="wrap_content"

                android:layout_height="wrap_content"

                android:layout_weight="1"

                android:layout_marginRight="20dp"

                android:src="@drawable/a" /}


            {ImageView

                android:layout_width="wrap_content"

                android:layout_height="wrap_content"

                android:layout_weight="1"

                android:layout_marginRight="20dp"

                android:src="@drawable/b" /}


            {ImageView

                android:layout_width="wrap_content"

                android:layout_height="wrap_content"

                android:layout_weight="1"

                android:layout_marginRight="20dp"

                android:src="@drawable/c" /}


            {ImageView

                android:layout_width="wrap_content"

                android:layout_height="wrap_content"

                android:layout_weight="1"

                android:layout_marginRight="20dp"

                android:src="@drawable/d" /}


            {ImageView

                android:layout_width="wrap_content"

                android:layout_height="wrap_content"

                android:layout_weight="1"

                android:src="@drawable/e" /}

        {/LinearLayout}

        {TextView

            android:layout_width="match_parent"

            android:layout_height="wrap_content"

            android:text="创建账户"

            android:layout_alignParentBottom="true"

            android:padding="20dp"

            android:textSize="20dp"

            android:textColor="@android:color/white"

            android:background="#02a2de"

            android:gravity="center"

            /}

    {/RelativeLayout}

{/LinearLayout}

因为编辑器的缘故,郑州app开发把<和>替换为{}了。运行结果如下

22.png

TAG
3475
该内容对我有帮助