package es.shyri.sample.floatingviews;

import android.view.Gravity;
import android.view.WindowManager;

import es.shyri.floatingviews.FloatingViewsService;

/**
 * Created by Shyri on 20/01/2016.
 */
public class FloatingPlanetsService extends FloatingViewsService {
    @Override
    public void onCreate() {
        super.onCreate();
        PlanetsWindow planetsWindow = new PlanetsWindow(this);
        FloatingImageView imageView = new FloatingImageView(planetsWindow, Gravity.TOP | Gravity.LEFT, 0, 0, WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
        imageView.setImageResource(R.drawable.ic_earth);
        planetsWindow.addView(imageView);
        FloatingImageView imageView2 = new FloatingImageView(planetsWindow, Gravity.TOP | Gravity.LEFT, 144, 144, WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
        imageView2.setImageResource(R.drawable.ic_earth);
        planetsWindow.addView(imageView2);
    }
}
