congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
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

  • Making http post requests using okhttp
  • requestLocationUpdates (LocationManager)
  • startActivity (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • ImageIO (javax.imageio)
  • BoxLayout (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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