通过tablelayout设计简单的登录界面

样图:




代码:

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

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

    xmlns:app="http://schemas.android.com/apk/res-auto"

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    android:gravity="center_vertical"

    android:stretchColumns="0,3"

    android:background="@mipmap/biejin"

    tools:context=".MainActivity">

          android:layout_width="wrap_content"

          android:layout_height="wrap_content"

          android:text="QiuQiu:"

          android:id="@+id/text"/>

          android:layout_width="20dp"

          android:layout_height="20dp"

          android:background="@mipmap/ic_launcher_round"

          android:layout_toRightOf="@+id/text"/>

              android:text="用户名:"

              android:textSize="30dp"

              android:id="@+id/text1"

              />

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:minWidth="150dp"/>

            android:text="密码:"

            android:textSize="30dp"

            android:id="@+id/text2"

            />

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:minWidth="150dp">

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:layout_marginRight="100dp"

        android:layout_marginLeft="100dp"

        android:text="登陆"/>

</TableLayout>

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容