Android存儲方式有很多種,在這里所用的存儲方式是SharedPreferrences, 其采用了Map數(shù)據(jù)結(jié)構(gòu)來存儲數(shù)據(jù),以鍵值的方式存儲,可以簡單的讀取與寫入。所以比較適合我們今天做的這個項目。我們來看一下運行圖:
在西青等地區(qū),都構(gòu)建了全面的區(qū)域性戰(zhàn)略布局,加強發(fā)展的系統(tǒng)性、市場前瞻性、產(chǎn)品創(chuàng)新能力,以專注、極致的服務(wù)理念,為客戶提供網(wǎng)站制作、成都網(wǎng)站建設(shè) 網(wǎng)站設(shè)計制作按需搭建網(wǎng)站,公司網(wǎng)站建設(shè),企業(yè)網(wǎng)站建設(shè),品牌網(wǎng)站制作,營銷型網(wǎng)站建設(shè),成都外貿(mào)網(wǎng)站制作,西青網(wǎng)站建設(shè)費用合理。一.布局界面
1.login_top.xml
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="@dimen/activity_horizontal_margin" android:background="@drawable/logintop_roundbg"> <EditText android:id="@+id/etName" android:layout_width="match_parent" android:layout_height="wrap_content" android:ems="10" android:drawablePadding="10dp" android:background="@android:drawable/edit_text" android:drawableLeft="@drawable/icon_user" android:hint="@string/etName"> <requestFocus></requestFocus> </EditText> <EditText android:id="@+id/etPassword" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/etName" android:inputType="textPassword" android:ems="10" android:drawablePadding="10dp" android:background="@android:drawable/edit_text" android:drawableLeft="@drawable/icon_pass" android:hint="@string/etpassword"> <requestFocus></requestFocus> </EditText> <CheckBox android:id="@+id/cbremenber" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/etPassword" android:text="@string/cbpass"/> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/cbremenber"> <Button android:id="@+id/btnlogin" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@drawable/btnselect" android:text="@string/btnlogin" android:onClick="login"/> <Button android:id="@+id/btnRegister" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@drawable/btnselect" android:text="@string/btnRegister" android:layout_marginLeft="10dp"/> </LinearLayout> </RelativeLayout>
本文標題:Android實現(xiàn)登錄界面記住密碼的存儲-創(chuàng)新互聯(lián)
網(wǎng)頁URL:http://aaarwkj.com/article46/jcpeg.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供自適應(yīng)網(wǎng)站、標簽優(yōu)化、ChatGPT、定制網(wǎng)站、關(guān)鍵詞優(yōu)化、做網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容