MiniTwitter记住密码等功能实现

定义:
<TextView  
   android:id="@+id/register_link"
    android:text="@string/login_register_link"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginLeft="15dp"
    android:textColor="#888"
    android:textColorLink="#FF0066CC"/>


TextView是支持简单的html标签的,如<a>标签,但并不是支持所有标签,支持更复杂的html标签得用webView组件。
<ImageView 
    android:src="@drawable/logo"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:layout_toLeftOf="@id/miniTwitter_logo"
     android:layout_alignBottom="@id/miniTwitter_logo"
     android:paddingBottom="8dp"/>


字符串的定义:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="hello">Hello World, LoginActivity!</string>
    <string name="login_label_username">帐号</string>
    <string name="login_label_password">密码</string>
    <string name="login_label_signin">登 录</string>
    <string name="login_status_logging_in">登录中...</string>
    <string name="login_username_hint">Email或手机号</string>
    <string name="login_register_link">没有帐号? <a href="#" mce_href="#">注册</a></string>
    <string name="app_name">miniTwitter</string>
</resources>
背景色为渐变色:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
        <gradient 
                android:startColor="#FFACDAE5"
                android:endColor="#FF72CAE1"
                android:angle="45"
        />
</shape>
登陆演示代码:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:background="@drawable/background_login">
  <!-- padding 内边距   layout_margin 外边距
                  android:layout_alignParentTop 布局的位置是否处于顶部 -->
  <RelativeLayout 
          android:id="@+id/login_div"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值