Android ListView OnItemClick Animation -


I have this list view that receives my friend from Facebook:

  @ Public Zero (complete) listing on Override & lt; Profile & gt; Friend) {runOnUiThread {@Override Public run zero () {mSpinner.setVisibility (see GONE); MSpinner.clearAnimation ();}}); // Populate list list & lt; String & gt; Value = new arreelist & lt; String & gt; (); For (profile profile: friend) {values.add (profile.getName ()); } Arrayadapter & lt; String & gt; FriendsListAdapter = New Array Adapter & lt; String & gt; (GetApplicationContext (), R. Lit.list_item2, value); FriendsListAdapter.sort (New Comparative & lt; String & gt; () {@ Comparison of Override Public Int (String LHS, String RA) {Return lhs.compareTo (rhs);}}); MFriendsList.setAdapter (friendsListAdapter); }};  

And I have this animation XML:

  & lt; Set xmlns: android = "http://schemas.android.com/apk/res/ Android" & gt; & Lt; Android translate: fromXDelta = "100% p" Android: toXDelta = "0" Android: Duration = "300" /> & Lt; Alpha android: fromAlpha = "0.0" Android: toAlpha = "1.0" Android: duration = "300" /> & Lt; / Set & gt;  

I have tried to find examples to add animation to ListView, but I could not find them to work with my code, which I want to create is this That's when an item is clicked in ListView, this animation begins, how can I add it to my code using the InitemClick?

You can use that scene inside that onclick and when a list view is clicked on , Then use it to animate:

  listView.setOnItemClickListener (new objectClickListener) {@Override public void onItemClick (adapter view & lt;? & Gt; avi, see the final view, Last int i, long i2) {animation hyperspace jump animation = animation high.load animation (this, r anem.YOUR_ANIMATION); see start animation (hyper Pesjmpanimeshn);}});  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -