Do mobile product interface accounted for a large part, but also decided a good product of important factors, recently saw someone put win8 interface effect, searched two, one is just imitation interface no special effects, another is custom components can achieve reversal effect, today analysis of these two types of interface. Imitation Win8 interfaceWIN8 tile similar to the nine Gongge effect, the implementation of this effect is basically three ways to achieve: LinearLayout, using its properties layout_weight achieve equal; Tablelayout, the person who did the calculator may have used this, can also be achieved, There is also a GridView, their own implementation of the adapter, I found the Imitation Win8 interface using LinearLayout to achieve, linearlayout layer nesting, this way is not advocated, because too many nested, we look at the interface effect:
Let's look at the interface source code: |
<?xml version= "1.0" encoding= "Utf-8"? ><linearlayout xmlns:android= "http://schemas.android.com/apk/res/ Android "Android:layout_width=" Fill_parent "android:layout_height=" fill_parent "android:orientation=" Horizontal " android:paddingtop= "30DP" android:paddingbottom= "30DP" android:paddingleft= "20DP" android:baselinealigned= "FAL Se "android:background=" @drawable/rootblock_default_bg "> <linearlayout android:layout_width=" Wrap_content "android:layout_height=" fill_parent "android:orientation=" vertical "Andro id:layout_weight= "1" > <linearlayout android:layout_width= "fill_parent" android:layout_height= "wrap_content" android:orientation= "Horizontal" > <linearla Yout android:layout_width= "108DP" android:layout_height= "108DP" Android:background= "#FF7F24" > </LinearLayout> <linearlayout Android:layout_width= "108DP" android:layout_height= "108DP" android:layout_marginleft= "5DP" android:background= "#FF7F24" > </LinearLayout> </LinearLayout> <linearlayout android:l Ayout_width= "Fill_parent" android:layout_height= "Wrap_content" android:layout_margintop= "5 DP "android:orientation=" horizontal "> <linearlayout Android Oid:layout_width= "108DP" android:layout_height= "108DP" Android:bac kground= "#3399ff" > </LinearLayout> <linearlayout Android:layoUt_width= "108DP" android:layout_height= "108DP" Android:layout_marg inleft= "5DP" android:background= "#3399ff" > </LinearLayout> </LinearLayout> <linearlayout android:layout_width= " Fill_parent "android:layout_height=" wrap_content "android:layout_margintop=" 5DP " android:orientation= "Horizontal" > <linearlayout android:layout_wid Th= "108DP" android:layout_height= "108DP" android:background= "#3399 FF "> </LinearLayout> <linearlayout an Droid:layout_width= "108DP" android:layout_height= "108DP" android:l ayout_marginleft= "5DP" android:background= "#3399ff" > </LinearLayout> < /linearlayout> <linearlayout android:layout_width= "Fill_parent" android:layout_height= "Wrap_content" android:layout_margintop= "5DP" android:orientation= "Horizontal" > <linearlayout android:layout_width= "108DP" Android:layo ut_height= "108DP" android:background= "#953399ff" > </LinearLayout> <linearlayout android:layout_width= "108DP" Android:layout_ height= "108DP" android:layout_marginleft= "5DP" android:background= "#953399ff" > </LinearLayout> </LinearLayout> </LinearLayout> <linearlayout android:layout_width= "wrap_content" android:layout_height= "Fill_parent" Android : orientation= "Vertical" android:layout_weight= "1" > <relativelayout android:l Ayout_width= "Fill_parent" android:layout_height= "fill_parent" > < ; LinearLayout android:layout_width= "Wrap_content" android:layout_height= " Wrap_content "android:orientation=" vertical "Android:layout_alignparentbotto M= "true" > <imageview android:id= "@+id/download_btn" Android:layout_width= "36DP" Android:layout_h eight= "36DP" android:src= "@drawable/rootblock_icon_download_bg"/> <imagEview android:id= "@+id/download_btn" Android:lay Out_width= "36DP" android:layout_height= "36DP" android:layout_margintop= "20DP" android:src= "@drawable/rootblock_icon_clear_bg"/> <imageview android:id= "@+id/download_btn" Android:layout_width= "36DP" android:layout_height= "36DP" android:layout_margintop= "20DP" android:src= " @drawable/rootblock_icon_set_bg "/> <imageview androi D:id= "@+id/download_btn" android:layout_width= "36DP" Android:layout_height= "36DP" android:layout_margintop= "20DP" a ndroid:src= "@drawable/rootblock_icon_add_bg"/> </LinearLayout> </relative Layout> </LinearLayout></LinearLayout>
Detailed Description: http://wp.662p.com/thread-7932-1-1.html
Imitation Win8 tile interface and features