congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
MagicFlyLinearLayout
Code IndexAdd Tabnine to your IDE (free)

How to use
MagicFlyLinearLayout
in
cn.magic.library

Best Java code snippets using cn.magic.library.MagicFlyLinearLayout (Showing top 8 results out of 315)

origin: yanbober/MagicFloatView

  @Override
  public void onClick(View v) {
    switch (v.getId()) {
      case R.id.fly_btn:
        mFlyLinearLayout.flying();
        break;
      case R.id.gift_btn:
        for (int index=0; index<8; index++) {
          mRainLinearLayout.flying();
        }
        break;
    }
  }
}
origin: yanbober/MagicFloatView

@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
  super.onMeasure(widthMeasureSpec, heightMeasureSpec);
  mMeasureH = this.getMeasuredHeight();
  mMeasureW = this.getMeasuredWidth();
}
origin: yanbober/MagicFloatView

public MagicFlyLinearLayout(Context context, AttributeSet attrs, int defStyleAttr) {
  super(context, attrs, defStyleAttr);
  init(context, attrs);
}
origin: yanbober/MagicFloatView

public void clearDrawable() {
  mBitmapList.clear();
  postInvalidate();
}
origin: yanbober/MagicFloatView

public void addDrawable(int resId) {
  Bitmap bitmap = BitmapFactory.decodeResource(getContext().getResources(), resId);
  mBitmapList.add(bitmap);
}
origin: yanbober/MagicFloatView

@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  mFlyLinearLayout = (MagicFlyLinearLayout) this.findViewById(R.id.fly_layout);
  mFlyButton = (Button) this.findViewById(R.id.fly_btn);
  mFlyButton.setOnClickListener(this);
  mRainLinearLayout = (MagicFlyLinearLayout) this.findViewById(R.id.gift_layout);
  mRainButton = (Button) this.findViewById(R.id.gift_btn);
  mRainButton.setOnClickListener(this);
  mRainLinearLayout.addDrawable(R.drawable.fly0);
  mRainLinearLayout.addDrawable(R.drawable.fly1);
  mRainLinearLayout.addDrawable(R.drawable.fly2);
  mRainLinearLayout.addDrawable(R.drawable.fly3);
  mRainLinearLayout.addDrawable(R.drawable.fly4);
  mRainLinearLayout.addDrawable(R.drawable.fly5);
  mFlyLinearLayout.addDrawable(R.drawable.favourite_love_blue);
  mFlyLinearLayout.addDrawable(R.drawable.favourite_love_pink);
  mFlyLinearLayout.addDrawable(R.drawable.favourite_love_red);
  mFlyLinearLayout.addDrawable(R.drawable.favourite_love_yellow);
}
origin: yanbober/MagicFloatView

public void flying() {
  PlayRunnable runnable = new PlayRunnable();
  if (mMeasureH > 0 || mMeasureW > 0) {
    runnable.run();
  } else {
    this.post(runnable);
  }
}
origin: yanbober/MagicFloatView

  @Override
  public void onAnimationUpdate(ValueAnimator animation) {
    mSparseArray.put(this.hashCode(), (ValueState) animation.getAnimatedValue());
    postInvalidate();
  }
}
cn.magic.libraryMagicFlyLinearLayout

Javadoc

A magic flying view, support various type flying anim and customer anim.

Most used methods

  • addDrawable
  • flying
  • getContext
  • getMeasuredHeight
  • getMeasuredWidth
  • init
  • post
  • postInvalidate

Popular in Java

  • Running tasks concurrently on multiple threads
  • getExternalFilesDir (Context)
  • getSharedPreferences (Context)
  • scheduleAtFixedRate (Timer)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now