Android Open Source - DouDouAndroidDemo Rocket Launcher

From Project

Back to project page DouDouAndroidDemo.


The source code is released under:

Apache License

If you think the Android project DouDouAndroidDemo listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package floatwindow;
/*ww  w.  java2 s  . com*/
import android.content.Context;
import android.view.LayoutInflater;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.oldoldb.doudouandroiddemo.R;

public class RocketLauncher extends LinearLayout{

  private static RocketLauncher instance;
  private int mWidth;
  public int getmWidth() {
    return mWidth;
  public void setmWidth(int mWidth) {
    this.mWidth = mWidth;

  private int mHeight;
  public int getmHeight() {
    return mHeight;
  public void setmHeight(int mHeight) {
    this.mHeight = mHeight;

  private ImageView mlauncherImageView;
  public static RocketLauncher getInstance(Context context)
    if(instance == null){
      synchronized (RocketLauncher.class) {
        if(instance == null){
          instance = new RocketLauncher(context);
    return instance;
  private RocketLauncher(Context context)
    LayoutInflater.from(context).inflate(R.layout.launcher, this);
    mlauncherImageView = (ImageView)findViewById(;
    mWidth = mlauncherImageView.getLayoutParams().width;
    mHeight = mlauncherImageView.getLayoutParams().height;
  public void updateLauncherStatus(boolean isReadyToLaunch)

Java Source Code List