public TvToastFocusDialog() { super(TvContext.context, R.style.dialog, TvConfigTypes.TV_DIALOG_TOAST_FOCUS); // TODO Auto-generated constructor stub toastFocusView = new TvToastFocusView(TvContext.context); toastFocusView.setParentDialog(this); setDialogAttributes(Gravity.CENTER, WindowManager.LayoutParams.TYPE_SYSTEM_ALERT); setDialogContentView( toastFocusView, new LayoutParams( (int) (802 / TvUIControler.getInstance().getResolutionDiv()), (int) (422 / TvUIControler.getInstance().getResolutionDiv()))); setAutoDismiss(false); }
@Override public boolean processCmd(String key, DialogCmd cmd, Object obj) { // TODO Auto-generated method stub TvToastFocusData toastFocusData = (TvToastFocusData) obj; switch (cmd) { case DIALOG_SHOW: case DIALOG_UPDATE: super.showUI(); toastFocusView.updateView(toastFocusData); break; case DIALOG_HIDE: break; case DIALOG_DISMISS: super.dismissUI(); Object[] objects = null; if (null != dialogListener) dialogListener.onDismissDialogDone(objects); break; } return false; }
public void setOnBtClickListener(OnBtClickListener onBtClickListener) { toastFocusView.setOnBtClickListener(onBtClickListener); }