android 有信-Toast输出

public class CustomToast
{
  Context mContext;
  Toast mToast;

  public CustomToast(Context paramContext)
  {
    this.mContext = paramContext;
    this.mToast = Toast.makeText(paramContext, "", 0);
  }

  public void cancel()
  {
    this.mToast.cancel();
  }

  public void show(int paramInt1, int paramInt2)
  {
    show(this.mContext.getText(paramInt1), paramInt2);
  }

  public void show(CharSequence paramCharSequence, int paramInt)
  {
    this.mToast.setDuration(paramInt);
    this.mToast.setText(paramCharSequence);
    this.mToast.show();
  }
}

 

posted @ 2013-05-08 17:54  似水流云  阅读(272)  评论(0编辑  收藏  举报