// Path: dttv/dttv-samples/src/main/java/dttv/app/impl/ICallBack.java
// public abstract class ICallBack {
//     public void doClickListener(View v) {
// 
//     }
// 
//     public void doItemClickListener(AdapterView<?> parent, View v, int position, long id) {
// 
//     }
// 
//     public void doItemSelectedListenter(AdapterView<?> parent, View v, int position, long id) {
// 
//     }
// 
// 
// }
// 
// Path: dttv/dttv-samples/src/main/java/dttv/app/impl/I_PopWindow.java
// public interface I_PopWindow {
//     public void onItemClick(View v);
// 
//     public void onProgressChanged(int widgetId);
// }
// 
// Path: dttv/dttv-samples/src/main/java/dttv/app/utils/Constant.java
// public class Constant {
// 
//     public final static String EXTRA_MESSAGE = "com.example.simpleplayer.MESSAGE";
//     public final static String FILE_MSG = "dttp.app.media.URL";
//     public final static String FILE_TYPE = "dttp.app.media.type";
//     public static final String LOGTAG = "DTTV";
// 
// 
//     public final static int REFRESH_TIME_MSG = 0x1000;
//     public final static int BEGIN_MEDIA_MSG = REFRESH_TIME_MSG + 1;
//     public final static int HIDE_OPREATE_BAR_MSG = BEGIN_MEDIA_MSG + 1;
//     public final static int HIDE_PROGRESS_BAR_MSG = HIDE_OPREATE_BAR_MSG + 1;
//     public final static int REFRESH_TIME = 1000;
// 
// 
//     public static final String ARGUMENTS_NAME = "arg";
//     public static final int LOCAL_VIDEO = 0;
//     public static final int LOCAL_AUDIO = 1;
//     public static final int LOCAL_FILE = 2;
// 
//     public static final String MEIDA_NAME_STR = "dttv.app.media_name";
// 
//     public static final String[] gEqulizerPresets = {
//             "Normal",
//             "Classical",
//             "Dance",
//             "Flat",
//             "Folk",
//             "Heavy Metal",
//             "Hip Hop",
//             "Jazz",
//             "Rock"
//     };
// 
//     public static final int FILTER_SIZE = 1 * 1024 * 1024;// 1MB
//     public static final int FILTER_DURATION = 1 * 60 * 1000;// 1分钟
// 
// 
//     // setting
//     public static final String KEY_SETTING_FILTER_AUDIO_FILTER = "key_checkbox_setting_audio_filter";
//     public static final String KEY_SETTING_FILTER_VIDEO_FILTER = "key_checkbox_setting_video_filter";
//     public static final String KEY_SETTING_DECODER_TYPE = "key_listpreference_setting_decoder_type";
//     public static final String KEY_SETTING_DECODER_TYPE_SOFT = "0";
//     public static final String KEY_SETTING_DECODER_TYPE_HW = "1";
//     public static final String KEY_SETTING_BROWSER_MODE ="key_listpreference_filebrowser_display";
//     public static final String KEY_SETTING_DISPLAY_MODE ="key_listpreference_setting_display_mode";
// 
// }


import android.app.Activity;
import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.util.Log;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.WindowManager.LayoutParams;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.PopupWindow;
import dttv.app.R;
import dttv.app.impl.ICallBack;
import dttv.app.impl.I_PopWindow;
import dttv.app.utils.Constant;
    public void onItemClick(View v) {
        // TODO Auto-generated method stub

    }

    @Override
    public void onProgressChanged(int widgetId) {
        // TODO Auto-generated method stub

    }

    public void show(View v, boolean isShowing) {
        if (isShowing) {
            int location[] = new int[2];
            v.getLocationOnScreen(location);
            int _x = location[0];
            int height = mListView.getMeasuredHeight();
            int _y = location[1] - height;// effectWindow.getHeight();
            Log.i(TAG, "_x is:" + _x + "--height is:" + height + "---_y is:" + _y);
            effectWindow.showAtLocation(v, Gravity.NO_GRAVITY, _x, _y);
        } else
            effectWindow.dismiss();
    }

    @Override
    protected void setContentView(View contentView) {
        // TODO Auto-generated method stub
        super.setContentView(contentView);
    }

// Path: dttv/dttv-samples/src/main/java/dttv/app/impl/ICallBack.java
// public abstract class ICallBack {
//     public void doClickListener(View v) {
// 
//     }
// 
//     public void doItemClickListener(AdapterView<?> parent, View v, int position, long id) {
// 
//     }
// 
//     public void doItemSelectedListenter(AdapterView<?> parent, View v, int position, long id) {
// 
//     }
// 
// 
// }
// 
// Path: dttv/dttv-samples/src/main/java/dttv/app/impl/I_PopWindow.java
// public interface I_PopWindow {
//     public void onItemClick(View v);
// 
//     public void onProgressChanged(int widgetId);
// }
// 
// Path: dttv/dttv-samples/src/main/java/dttv/app/utils/Constant.java
// public class Constant {
// 
//     public final static String EXTRA_MESSAGE = "com.example.simpleplayer.MESSAGE";
//     public final static String FILE_MSG = "dttp.app.media.URL";
//     public final static String FILE_TYPE = "dttp.app.media.type";
//     public static final String LOGTAG = "DTTV";
// 
// 
//     public final static int REFRESH_TIME_MSG = 0x1000;
//     public final static int BEGIN_MEDIA_MSG = REFRESH_TIME_MSG + 1;
//     public final static int HIDE_OPREATE_BAR_MSG = BEGIN_MEDIA_MSG + 1;
//     public final static int HIDE_PROGRESS_BAR_MSG = HIDE_OPREATE_BAR_MSG + 1;
//     public final static int REFRESH_TIME = 1000;
// 
// 
//     public static final String ARGUMENTS_NAME = "arg";
//     public static final int LOCAL_VIDEO = 0;
//     public static final int LOCAL_AUDIO = 1;
//     public static final int LOCAL_FILE = 2;
// 
//     public static final String MEIDA_NAME_STR = "dttv.app.media_name";
// 
//     public static final String[] gEqulizerPresets = {
//             "Normal",
//             "Classical",
//             "Dance",
//             "Flat",
//             "Folk",
//             "Heavy Metal",
//             "Hip Hop",
//             "Jazz",
//             "Rock"
//     };
// 
//     public static final int FILTER_SIZE = 1 * 1024 * 1024;// 1MB
//     public static final int FILTER_DURATION = 1 * 60 * 1000;// 1分钟
// 
// 
//     // setting
//     public static final String KEY_SETTING_FILTER_AUDIO_FILTER = "key_checkbox_setting_audio_filter";
//     public static final String KEY_SETTING_FILTER_VIDEO_FILTER = "key_checkbox_setting_video_filter";
//     public static final String KEY_SETTING_DECODER_TYPE = "key_listpreference_setting_decoder_type";
//     public static final String KEY_SETTING_DECODER_TYPE_SOFT = "0";
//     public static final String KEY_SETTING_DECODER_TYPE_HW = "1";
//     public static final String KEY_SETTING_BROWSER_MODE ="key_listpreference_filebrowser_display";
//     public static final String KEY_SETTING_DISPLAY_MODE ="key_listpreference_setting_display_mode";
// 
// }


// Path: dttv/dttv-samples/src/main/java/dttv/app/compnent/PopWindowCompnent.java
import android.app.Activity;
import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.util.Log;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.WindowManager.LayoutParams;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.PopupWindow;
import dttv.app.R;
import dttv.app.impl.ICallBack;
import dttv.app.impl.I_PopWindow;
import dttv.app.utils.Constant;

    public void onItemClick(View v) {
        // TODO Auto-generated method stub

    }

    @Override
    public void onProgressChanged(int widgetId) {
        // TODO Auto-generated method stub

    }

    public void show(View v, boolean isShowing) {
        if (isShowing) {
            int location[] = new int[2];
            v.getLocationOnScreen(location);
            int _x = location[0];
            int height = mListView.getMeasuredHeight();
            int _y = location[1] - height;// effectWindow.getHeight();
            Log.i(TAG, "_x is:" + _x + "--height is:" + height + "---_y is:" + _y);
            effectWindow.showAtLocation(v, Gravity.NO_GRAVITY, _x, _y);
        } else
            effectWindow.dismiss();
    }

    @Override
    protected void setContentView(View contentView) {
        // TODO Auto-generated method stub
        super.setContentView(contentView);
    }

    private ICallBack callback;