Android 开发即时聊天工具 YQ :(二) 完成登陆界面

话说放假人都玩去了,咱还在写代码,唉,,,还得慢慢学,,,废话不多了,进入主题

先上图:


界面是仿QQ 安卓客户端的,参考了网上的代码,图片素材直接解压安卓手机QQ就有了,话说没做商业用途,不算侵权吧?大笑

代码很简单就一个布局文件,


<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/default_bg"
    android:orientation="vertical" >
    <RelativeLayout android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="60dip"
        android:layout_marginLeft="15dip"
        android:layout_marginRight="15dip"
        android:background="@drawable/login_bg" >
        <!-- 头像背景和头像 -->
        <ImageView android:id="@+id/iv_head"
            android:layout_width="wrap_content" 
            android:layout_height="wrap_content"
            android:background="@drawable/login_head"/>
        <EditText android:id="@+id/et_account"
            android:layout_width="fill_parent"  
            android:layout_height="wrap_content"
            android:inputType="number"
            android:maxLength="10"
            android:textSize="16sp"
            android:hint="输入账号"
            android:background="@drawable/input_login"
            android:layout_marginTop="5.0dip"
            android:layout_toRightOf="@+id/iv_head"/>
        <!-- 密码 -->
		<EditText android:id="@+id/et_password"
		    android:layout_width="match_parent"  
            android:layout_height="wrap_content"
            android:textSize="16sp"
            android:inputType="textPassword"
		    android:maxLength="16"
            android:background="@drawable/input_login"
            android:layout_below="@+id/et_account"
            android:layout_toRightOf="@+id/iv_head"/>
        <CheckBox
            android:id="@+id/cb_remember"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="记住密码"
            android:checked="true"
            android:button="@drawable/cb_check"
            android:layout_alignBaseline="@+id/btn_login"/>
        <Button
            android:id="@+id/btn_login"
            android:layout_width="100dip"
            android:layout_height="38dip"
            android:layout_alignParentRight="true"
            android:layout_below="@+id/et_password"
            android:layout_marginRight="12.0dip"
            android:layout_marginTop="15dip"
            android:textSize="16sp"
            android:text="登录" />
    </RelativeLayout>
    <TableLayout android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="20.0dip" 
        android:layout_marginRight="20.0dip"
        android:stretchColumns="1">
        <TableRow>
	        <CheckBox android:id="@+id/cb_hideLogin"
	            android:layout_width="wrap_content" 
	            android:layout_height="wrap_content" 
	            style="@style/checkBox"
	            android:text="隐身登录"/>
	        <CheckBox android:id="@+id/cb_openVibra"
	            android:layout_gravity="right"
	            android:layout_width="wrap_content" 
	            android:layout_height="wrap_content" 
	            style="@style/checkBox"
	            android:text="开启震动"/>
	        </TableRow>
	        <TableRow>
	        <CheckBox android:id="@+id/cb_acceptGroupMsg"
	            android:layout_width="wrap_content" 
	            android:layout_height="wrap_content" 
	            style="@style/checkBox"
	            android:text="接收群消息"/>
	        <CheckBox android:id="@+id/cb_silent"
	            android:layout_gravity="right"
	            android:layout_width="wrap_content" 
	            android:layout_height="wrap_content" 
	            style="@style/checkBox"
	            android:text="静音登录"/>
	        </TableRow>
    </TableLayout>
</LinearLayout>

谢谢大家支持,欢迎一起交流!有疑问请加我为微信个人账号:xuqingchen521

根据提供的引用内容,您遇到了一个名为"sudo: yq: command not found"的错误。这个错误表示您的系统中没有安装名为"yq"的命令行工具。要解决这个问题,您可以按照以下步骤进行操作: 1. 首先,您需要安装"yq"命令行工具。您可以使用包管理器来安装它。如果您使用的是Debian或Ubuntu系统,可以使用以下命令进行安装: ```shell sudo apt-get install yq ``` 如果您使用的是CentOS或RHEL系统,可以使用以下命令进行安装: ```shell sudo yum install yq ``` 2. 如果您已经尝试过使用包管理器安装"yq",但仍然遇到了问题,可能是因为您的包管理器没有正确配置。您可以尝试更新您的包管理器并再次尝试安装"yq"。使用以下命令更新包管理器: ```shell sudo apt-get update # 对于Debian或Ubuntu系统 sudo yum update # 对于CentOS或RHEL系统 ``` 3. 如果您仍然无法安装"yq"命令行工具,您可以尝试手动安装它。您可以从"yq"的官方GitHub页面下载进制文件,并将其添加到系统的可执行路径中。以下是手动安装"yq"的步骤: - 访问"yq"的GitHub页面:https://github.com/mikefarah/yq - 下载适用于您的操作系统的进制文件。 - 将下载的进制文件移动到一个在系统的可执行路径中的目录,例如"/usr/local/bin"。 - 确保移动的进制文件具有执行权限。您可以使用以下命令为文件添加执行权限: ```shell chmod +x /usr/local/bin/yq ``` 请注意,根据您的系统和配置,可能需要使用管理员权限(sudo)来执行上述操作。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值