Guess one of the card games interface design and resource file design

Source: Internet
Author: User

The game to achieve Android phone guessing card game, by the computer and players play together, random poker guessing, score!

A: A resource file that defines a string

<?xml version= "1.0" encoding= "Utf-8"?><resources>    <string name= "app_name" > Card Games </string >    <string name= "action_settings" >Settings</string>    <string name= "Hello_world" >hello World!</string><string name= "Show1" > Please click on the button to get to your card and play by entering the number of your existing hand and clicking OK. Each card can only be used 1 times! </string><string name= "Tishi" > Please enter your username! </string><string name= "OK" > OK </string><string name= "Gameguize" ></string></ Resources>

Main interface

<relativelayout xmlns:android= "http://schemas.android.com/apk/res/android" xmlns:tools= "http// Schemas.android.com/tools "android:layout_width=" match_parent "android:layout_height=" Match_parent "android:backg round= "@drawable/backe" android:paddingbottom= "@dimen/activity_vertical_margin" android:paddingleft= "@dimen/ Activity_horizontal_margin "android:paddingright=" @dimen/activity_horizontal_margin "android:paddingtop=" @dimen/ Activity_vertical_margin "tools:context=". Mainactivity "> <imageview android:id=" @+id/ivcpu "android:layout_width=" 105DP "Android:layo ut_height= "150DP" android:layout_alignparentright= "true" android:layout_alignparenttop= "true" Android : src= "@drawable/img16"/> <imageview android:id= "@+id/ivcm" android:layout_width= "105DP" and        roid:layout_height= "150DP" android:layout_alignparentbottom= "true" android:layout_alignparentleft= "true" Android:Layout_marginbottom= "64DP" android:src= "@drawable/img16"/> <edittext android:id= "@+id/edtcm" Android:layout_width= "50DP" android:layout_height= "50DP" android:layout_alignbottom= "@+id/ivcm" and roid:layout_toleftof= "@+id/ivcpu" android:background= "#00ff00" android:ems= "Android:inputtype=" Nu Mber "android:textsize=" 40sp "> <requestfocus/> </EditText> <textview Androi D:id= "@+id/tvshow" android:layout_width= "wrap_content" android:layout_height= "Wrap_content" android:l Ayout_above= "@+id/ivcm" android:layout_alignleft= "@+id/ivcm" android:layout_aligntop= "@+id/ivcpu" and roid:layout_toleftof= "@+id/btnget" android:text= "@string/show1" android:textcolor= "#ffffff" android:t Extsize= "20sp"/> <button android:id= "@+id/buttonok" android:layout_width= "Wrap_content" and roid:layout_height= "Wrap_content "android:layout_above=" @+id/edtcm "android:layout_alignleft=" @+id/edtcm "android:text=" @stri Ng/ok "/> <listview android:id=" @+id/lvcmsz "android:layout_width=" 80DP "Android:layout_heig ht= "200DP" android:background= "#ffffff" android:layout_aligntop= "@+id/ivcm" android:layout_torightof= "@+id/buttonok" > </ListView> <button android:id= "@+id/btnget" android:layout_width= "Wrap_ Content "android:layout_height=" wrap_content "android:layout_below=" @+id/tvshow "Android:layout_tolef tof= "@+id/lvcmsz" android:text= "Get"/></relativelayout>

Call Picture XML

<?xml version= "1.0" encoding= "Utf-8"? ><relativelayout xmlns:android= "http://schemas.android.com/apk/res/ Android "Android:layout_width=" Match_parent "android:layout_height=" match_parent "android:background=" @drawable/b Ackground "> <textview android:id=" @+id/tvshow "android:layout_width=" Wrap_content "and roid:layout_height= "Wrap_content" android:layout_alignparentright= "true" android:layout_alignparenttop= "true "Android:layout_margintop=" 42DP "android:text=" @string/show1 "android:textsize=" 20sp "/> <e Dittext android:id= "@+id/edtcm" android:layout_width= "50DP" android:layout_height= "50DP" Andro id:layout_alignleft= "@+id/ivcm" android:layout_below= "@+id/ivcm" android:layout_margintop= "50DP" Android Oid:background= "#00ff00" android:maxlength= "2" android:ems= "ten" android:inputtype= "number" and Roid:textsize= "40sp"/> < Button android:id= "@+id/buttonok" android:layout_width= "wrap_content" android:layout_height= "Wrap_con Tent "android:layout_alignbottom=" @+id/edtcm "android:layout_torightof=" @+id/edtcm "android:text=" @st Ring/ok "/> <button android:id=" @+id/btnget "android:layout_width=" 80DP "Android:layout_heig ht= "80DP" android:layout_aligntop= "@+id/ivcpu" android:layout_margintop= "27DP" android:layout_toright         of= "@+id/ivcm" android:background= "@drawable/pk" android:text= "PK" android:textcolor= "#ffff00" Android:textsize= "70px"/> <imageview android:id= "@+id/ivcm" android:layout_width= "105DP" a        ndroid:layout_height= "150DP" android:layout_alignleft= "@+id/tvshow" android:layout_aligntop= "@+id/ivcpu" android:src= "@drawable/img16"/> <imageview android:id= "@+id/ivcpu" android:layout_width= "105DP "Android:layout_height= "150DP" android:layout_below= "@+id/tvshow" android:layout_margintop= "15DP" Android:layout_tor ightof= "@+id/btnget" android:src= "@drawable/img16"/></relativelayout>

Leaderboard. xml

<?xml version= "1.0" encoding= "Utf-8"? ><relativelayout xmlns:android= "http://schemas.android.com/apk/res/ Android "Android:layout_width=" Match_parent "android:layout_height=" match_parent "android:background=" @drawable/b Ackground "> <textview android:id=" @+id/tvshow "android:layout_width=" Wrap_content "and roid:layout_height= "Wrap_content" android:layout_alignparentright= "true" android:layout_alignparenttop= "true "Android:layout_margintop=" 42DP "android:text=" @string/show1 "android:textsize=" 20sp "/> <e Dittext android:id= "@+id/edtcm" android:layout_width= "50DP" android:layout_height= "50DP" Andro id:layout_alignleft= "@+id/ivcm" android:layout_below= "@+id/ivcm" android:layout_margintop= "50DP" Android Oid:background= "#00ff00" android:maxlength= "2" android:ems= "ten" android:inputtype= "number" and Roid:textsize= "40sp"/> < Button android:id= "@+id/buttonok" android:layout_width= "wrap_content" android:layout_height= "Wrap_con Tent "android:layout_alignbottom=" @+id/edtcm "android:layout_torightof=" @+id/edtcm "android:text=" @st Ring/ok "/> <button android:id=" @+id/btnget "android:layout_width=" 80DP "Android:layout_heig ht= "80DP" android:layout_aligntop= "@+id/ivcpu" android:layout_margintop= "27DP" android:layout_toright         of= "@+id/ivcm" android:background= "@drawable/pk" android:text= "PK" android:textcolor= "#ffff00" Android:textsize= "70px"/> <imageview android:id= "@+id/ivcm" android:layout_width= "105DP" a        ndroid:layout_height= "150DP" android:layout_alignleft= "@+id/tvshow" android:layout_aligntop= "@+id/ivcpu" android:src= "@drawable/img16"/> <imageview android:id= "@+id/ivcpu" android:layout_width= "105DP "Android:layout_height= "150DP" android:layout_below= "@+id/tvshow" android:layout_margintop= "15DP" Android:layout_tor ightof= "@+id/btnget" android:src= "@drawable/img16"/></relativelayout>
Save information. xml

<?xml version= "1.0" encoding= "Utf-8"? ><linearlayout xmlns:android= "http://schemas.android.com/apk/res/    Android "Android:layout_width=" Match_parent "android:layout_height=" match_parent "android:orientation=" vertical " android:gravity= "center" android:background= "@drawable/backe" > <textview android:id= "@+id/t Vtishi "android:layout_width=" wrap_content "android:layout_height=" Wrap_content "android:text=" Solitaire Tour Play! "Android:textsize=" 30sp "android:textcolor=" #ffffff "/> <edittext android:id= "@+id/edtusename" android:layout_width= "wrap_content" android:layout_height= "Wrap_content" Android : hint= "@string/tishi" android:maxlength= "5" android:text= "android:textcolor=" #ffffff "/&       Gt <button android:id= "@+id/btnlogin" android:layout_width= "Wrap_content" android:layout_height= " Wrap_content "Android:text= "Landing" android:textcolor= "#ffffff"/></linearlayout> 



Guess one of the card games interface design and resource file design

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.