toast.show();
5.长时间显示的Toast显示
LayoutInflater inflater1 = getLayoutInflater();
View view1 = inflater1.inflate(R.layout.userdefinedtoast,
(ViewGroup) findViewById(R.id.toast_layout));
TextView txtView_Title1 = (TextView) view1
.findViewById(R.id.txt_Title);
TextView txtView_Context1 = (TextView) view1
.findViewById(R.id.txt_context);
ImageView imageView1 = (ImageView) view1
.findViewById(R.id.image_toast);
builder = new AlertDialog.Builder(this);
builder.setView(view1);
dialog = builder.create();
dialog.show();
6.自定义Toast的布局如下:
<?xml version="1.0" encoding="utf-8"?><LinearLayout
xmlns:android=“http://schemas.android.com/apk/res/android”
android:id=“@