// Path: AndJie/src/com/jwzhangjie/andbase/JieApp.java
// public class JieApp extends Application {
// 
// 	public static JieApp instance = null;
// 	private BaseActivity currentRunningActivity = null;
// 	private LayoutInflater mInflater;
// 
// 	@Override
// 	public void onCreate() {
// 		super.onCreate();
// 		instance = this;
// 		initImageLoader(instance);
// 	}
// 
// 	public BaseActivity getCurrentRunningActivity() {
// 		return currentRunningActivity;
// 	}
// 
// 	public void setCurrentRunningActivity(BaseActivity currentRunningActivity) {
// 		this.currentRunningActivity = currentRunningActivity;
// 	}
// 
// 	public LayoutInflater getInflater() {
// 		if (mInflater == null) {
// 			mInflater = LayoutInflater.from(getApplicationContext());
// 		}
// 		return mInflater;
// 	}
// 
// 	public static void initImageLoader(Context context) {
// 		ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(
// 				context).threadPriority(Thread.NORM_PRIORITY - 2)
// 				.denyCacheImageMultipleSizesInMemory()
// 				.diskCacheFileNameGenerator(new Md5FileNameGenerator())
// 				.tasksProcessingOrder(QueueProcessingType.LIFO)
// 				.writeDebugLogs() // Remove for release app
// 				.build();
// 		// Initialize ImageLoader with configuration.
// 		ImageLoader.getInstance().init(config);
// 	}
// }


import com.jwzhangjie.andbase.JieApp;
import com.jwzhangjie.andbase.R;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.view.View;
import android.widget.PopupWindow;
package com.jwzhangjie.andbase.ui.base;




/**
 * title: JieBasePopup.java
 * @author jwzhangjie
 * Date: 2014-12-7 下午9:09:10
 * version 1.0
 * {@link http://blog.csdn.net/jwzhangjie}
 * Description:封装基础的弹出框
 */
public abstract class JieBasePopup extends BaseView {

	protected PopupWindow mPopupWindow;
	private View parentView;

	public JieBasePopup() {
		super();
	}

	public void initPopView(View parent) {
		parentView = parent;
	}

	public void initPopView(View parent, int viewId) {
		parentView = parent;
	}

	public void initPopWindow(int width, int height) {
		if (mPopupWindow == null) {
			mPopupWindow = new PopupWindow(view, width, height);
			/* 设置触摸外面时消失 */
			mPopupWindow.setOutsideTouchable(true);
// Path: AndJie/src/com/jwzhangjie/andbase/JieApp.java
// public class JieApp extends Application {
// 
// 	public static JieApp instance = null;
// 	private BaseActivity currentRunningActivity = null;
// 	private LayoutInflater mInflater;
// 
// 	@Override
// 	public void onCreate() {
// 		super.onCreate();
// 		instance = this;
// 		initImageLoader(instance);
// 	}
// 
// 	public BaseActivity getCurrentRunningActivity() {
// 		return currentRunningActivity;
// 	}
// 
// 	public void setCurrentRunningActivity(BaseActivity currentRunningActivity) {
// 		this.currentRunningActivity = currentRunningActivity;
// 	}
// 
// 	public LayoutInflater getInflater() {
// 		if (mInflater == null) {
// 			mInflater = LayoutInflater.from(getApplicationContext());
// 		}
// 		return mInflater;
// 	}
// 
// 	public static void initImageLoader(Context context) {
// 		ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(
// 				context).threadPriority(Thread.NORM_PRIORITY - 2)
// 				.denyCacheImageMultipleSizesInMemory()
// 				.diskCacheFileNameGenerator(new Md5FileNameGenerator())
// 				.tasksProcessingOrder(QueueProcessingType.LIFO)
// 				.writeDebugLogs() // Remove for release app
// 				.build();
// 		// Initialize ImageLoader with configuration.
// 		ImageLoader.getInstance().init(config);
// 	}
// }


// Path: AndJie/src/com/jwzhangjie/andbase/ui/base/JieBasePopup.java
import com.jwzhangjie.andbase.JieApp;
import com.jwzhangjie.andbase.R;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.view.View;
import android.widget.PopupWindow;

package com.jwzhangjie.andbase.ui.base;




/**
 * title: JieBasePopup.java
 * @author jwzhangjie
 * Date: 2014-12-7 下午9:09:10
 * version 1.0
 * {@link http://blog.csdn.net/jwzhangjie}
 * Description:封装基础的弹出框
 */
public abstract class JieBasePopup extends BaseView {

	protected PopupWindow mPopupWindow;
	private View parentView;

	public JieBasePopup() {
		super();
	}

	public void initPopView(View parent) {
		parentView = parent;
	}

	public void initPopView(View parent, int viewId) {
		parentView = parent;
	}

	public void initPopWindow(int width, int height) {
		if (mPopupWindow == null) {
			mPopupWindow = new PopupWindow(view, width, height);
			/* 设置触摸外面时消失 */
			mPopupWindow.setOutsideTouchable(true);
			mPopupWindow.setBackgroundDrawable(JieApp.instance