I am developing a flipcard game. I have a gridview and each grid item is a viewfinder. Each view flapper has a textview and an image view. Is flipped Image View an item 3D animation of text Ajekshn click I want to start the animation of an item after the animation viewflipper ends (Note: I add the click listener on viewflipper adapter class) .
Adapter code here:
Public Class MyGridViewAdapter BaseAdapter {int [] Enhances Signs; Reference Reference; Int counter; View View = Null; Gridview grid; HashMap & LT; String, view & gt; hash map; Public MyGridViewAdapter (int [] symbol, reference reference, GridView grid) {// TODO Automatic Manufacturer Stub this.icons = symbol; This.context = reference; This.grid = grid; } @ Override Public Inaccount () {// Todo Auto generated method Stub Returns icon. Lamps; } @ Ovrraid public Object Hot Itam (Int Arj 2) {// Two-o Auto-generated method stub return Icons [args 0]; } @ Override public long getItemId (int arg0) {// TODO auto generate method stub return 0; } @Override public view getView (final int arg0, the final scene ARG1, ViewGroup ARG2) {// TODO Auto-generated method stub HashMap = new HashMap & LT; String, view & gt; (); LayoutInflater layoutInflater = (LayoutInflater) context.getSystemService (Context.LAYOUT_INFLATER_SERVICE); Last viewfinder viewholder = new viewer (); If (arg1 == faucet) {view = new view (reference); View = LayoutInfleter.In Fallet (R.Layout.View_player, empty); ViewHolder.text = (TextView) view.findViewById (R.id.name); ViewHolder.image = (imageView) view.findViewById (R.id.picture); ViewHolder.image.setImageResource (symbol [arg0]); } And {see = (see) arg1; } Last ViewFlipper Flipper = (ViewFlipper) view.findViewById (R.id.my_view_flipper); flipper.setOnClickListener (New View.OnClickListener () {@Override public void onClick (final scene v) {// TODO Auto-generated method stub AnimationFactory.flipTransition (flipper FlipDirection.LEFT_RIGHT, 300); animation animation = flipper.getInAnimation () ; animation.setAnimationListener (new AnimationListener () {public void onAnimationStart (animation animation) {// TODO auto-generated method stub flipper.setEnabled (false);} public void onAnimationRepeat (animation animation) {// TODO auto-generated method stub } Public Zero Animation and Animation (Animation) {// TODO Auto Generation ्न Method Stub Counter ++; Hashmap.Pot ("+ Counter, V); flipper.setEnabled (true); Log.i (" Counter "," "+ Counter); Animation Factory. Flip Transition (Fisher, Flip Direction. RIGHT_LEFT, 250);}});}}); return view;} public class Wuhalder {Personal text view text; private Cvichitr image;}}
No comments:
Post a Comment