Android layoutanimation simple app to get your app to increase the force grid

Source: Internet
Author: User

Recently, when playing an app, found just entered his page, his page of the child controls are flying from the right side, feel good, the way to imitate a. It's much more comfortable to watch than to stay there!


Still Feel good! Anyway, I think it's better than a stiff-looking! You guys think that!

Looking at what we are imitating:


Almost, just fine-tune it!

The point code, in fact, is very simple:

Create a new Anim folder to create a new two XML

<layoutanimation xmlns:android= "http://schemas.android.com/apk/res/android"        android:delay= "90%"//Space execution interval        android:animation= "@anim/trans"/>

<set xmlns:android= "http://schemas.android.com/apk/res/android" android:interpolator= "@android: anim/ Accelerate_interpolator ">    <translate     android:fromxdelta=" 100%p "android:toxdelta=" 0 "    android: duration= "/>    <alpha        android:fromalpha=" 0 "android:toalpha=" 1 "        android:duration="        /></set>

Just put this animation in the layout of the set up to appear this effect, bunker!

<linearlayout xmlns:android= "http://schemas.android.com/apk/res/android" android:layout_width= "Fill_parent" android:layout_height= "Fill_parent" android:background= "#e6e6e6" android:layoutanimation= "@anim/anim" Android:ori entation= "vertical" > <linearlayout android:layout_width= "match_parent" android:layout_height= "wrap        _content "android:gravity=" Center|left "android:background=" #ffffff "android:layout_margin=" 5dip " android:orientation= "Horizontal" > <imageview android:layout_width= "Wrap_content" a ndroid:layout_height= "Wrap_content" android:src= "@drawable/ic_launcher"/> <textview an     Droid:layout_width= "Wrap_content" android:layout_height= "wrap_content" android:text= "TextView"/> </linearlayout><linearlayout android:layout_width= "match_parent" android:layout_height= "Wrap_co Ntent "Android:gravity= "Center|left" android:background= "#ffffff" android:layout_margin= "5dip" android:orientation= "horizon Tal "> <imageview android:layout_width=" wrap_content "android:layout_height=" Wrap_conte NT "android:src=" @drawable/ic_launcher "/> <textview android:layout_width=" wrap_content "Android:layout_height=" wrap_content "android:text=" TextView "/> </LinearLayout> &lt ; LinearLayout android:layout_width= "match_parent" android:layout_height= "Wrap_content" android:gravity = "Center|left" android:background= "#ffffff" android:layout_margin= "5dip" android:orientation= "horizon Tal "> <imageview android:layout_width=" wrap_content "android:layout_height=" Wrap_conte NT "android:src=" @drawable/ic_launcher "/> <textview android:layout_width=" wrap_content "Android:layout_height= "Wrap_content" android:text= "TextView"/> </LinearLayout> <linearlayout an        Droid:layout_width= "Match_parent" android:layout_height= "wrap_content" android:gravity= "Center|left" Android:background= "#ffffff" android:layout_margin= "5dip" android:orientation= "Horizontal" > <i Mageview android:layout_width= "wrap_content" android:layout_height= "Wrap_content" Android : src= "@drawable/ic_launcher"/> <textview android:layout_width= "Wrap_content" android:l ayout_height= "Wrap_content" android:text= "TextView"/> </LinearLayout> <linearlayout A        Ndroid:layout_width= "Match_parent" android:layout_height= "wrap_content" android:gravity= "Center|left" Android:background= "#ffffff" android:layout_margin= "5dip" android:orientation= "Horizontal" > < ImageView andRoid:layout_width= "Wrap_content" android:layout_height= "wrap_content" android:src= "@drawable/ic_laun Cher "/> <textview android:layout_width=" wrap_content "android:layout_height=" Wrap_cont Ent "android:text=" TextView "/> </LinearLayout> <linearlayout android:layout_width=" Ma Tch_parent "android:layout_height=" wrap_content "android:gravity=" Center|left "android:background=" #f Fffff "android:layout_margin=" 5dip "android:orientation=" Horizontal "> <imageview an Droid:layout_width= "Wrap_content" android:layout_height= "wrap_content" android:src= "@drawable/ic_lau Ncher "/> <textview android:layout_width=" wrap_content "android:layout_height=" Wrap_con Tent "android:text=" TextView "/> </LinearLayout> <linearlayout android:layout_width=" M Atch_parent "Androidoid:layout_height= "Wrap_content" android:gravity= "Center|left" android:background= "#ffffff" android:l Ayout_margin= "5dip" android:orientation= "horizontal" > <imageview android:layout_width= "Wra P_content "android:layout_height=" wrap_content "android:src=" @drawable/ic_launcher "/> &lt ; TextView android:layout_width= "wrap_content" android:layout_height= "Wrap_content" Android : text= "TextView"/> </LinearLayout></LinearLayout>

So simple a few words, feel the user experience suddenly rose a lot! It is the detail that determines success or failure!




Android layoutanimation simple app to get your app to increase the force grid

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.