Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 @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;
 }
Ejemplo n.º 3
0
 public void setOnBtClickListener(OnBtClickListener onBtClickListener) {
   toastFocusView.setOnBtClickListener(onBtClickListener);
 }