2023年Android实验报告界面设计.docx





《2023年Android实验报告界面设计.docx》由会员分享,可在线阅读,更多相关《2023年Android实验报告界面设计.docx(13页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、西安邮电大学(计算机学院)课内实验报告实验名称And o rid界面设计专业名称:。计算机科学与技术班 级:1405班学生姓名:0高宏伟学号(8 位)J0 4 1 4 1152指导教师:孟伟君实验日期:2023年4月7日androi d : ent r ie s = arr ay/dept” /Y T extV i cwan d ro i d:1 a yout width=wrap content android: 1 a y o ut_he i ght二 wrap_conte n t”an d ro i d: tex t =爱好/and r o i d: 1 ayou t _height=
2、wr a p co n tent 0android: t e x t = 运动 / / LinearL0主Act i vity文献:p ackage c om. ex a mp 1 e. a u to 1 o g i n ;imp o rt and r oid. a pp. Activity;import and r oid. content. I n ten t ;import an d r oid. cont ent. Share d P referenc e s;i mport androi d . o s . Bund 1 e:impo r t an d roid. vi e w. V
3、iew ;i mp o rt an d roid. v iew. View. OnC 1 i ckL i s t e ne r ;i mpo r t android. w idge t . B u tto n ;imp o rt and r oid. widge t. CheckBox;imp o r t a n droid, widg e t. Edi t T e x t ;i m p ort android, w i dget. T oast;pub 1 i c class Lo g inActivi t y ex t ends Acti v ity pri v a t e E:di tT
4、ext u s ern a me;pri v at e Edit Text u s erpasswor d ;p r i v at e CheckBox re mem b e r;opri v at e Ch e ckBox a u to 1 ogin;priva t e Button logi n ;pr i v ate S h aredP r e fere n c e s sp;p rivat e Strin g use rNam e V a lue, p assw o rdValue;00 v er r i d ep rot e cted vo i d on C r ea t e (Bu
5、ndle s aved I n stanceSta t e) 3/ TODO Au t ogene r ated method s t ubsuper, o nCre a t e( s a vedln s t anceState):o s e t ContentView (R. 1 ayou t . log i n);/初始化用户名、密码、记住密码、自动登录、登录按钮u s e rname = (Ed i tT e x t ) f i n dV iewByld(R. id. user n am e );wser p as s w o rd = (EditT e x t ) f i n d V
6、i ewByld ( R. i d . userp ass wor d );。 remember = (Chee kBox) f indV i ewB y Id ( R. id. r emember);autolog i n = (Che c kBox) findViewB y Id(R. id. auto login); login = (Butto n ) f indVie wByl d (R. id. 1 og i n);sp = get S harodP r ef e rence s (use r Info , 0 );String n am e =sp. g e t Stri n g
7、( USE RNAME /z,);S tring p ass =sp. ge t String (PASS IVO RD,);boo lea n chos e R e member =sp. g et B oolcan( rememb er”, fal s c);boo lea n chose Auto Log i n = s p. getBoole a n( aut o login , f a Is e );/ Toast, mak e T e xt (thi s , n a me, Toas t . L ENGTH_SHORT). show();if (chos e Romem b e r
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 2023 Android 实验 报告 界面设计

限制150内