Toast加图片

    Toast toast = Toast.makeText(getApplicationContext(), "进度" + make + "%", Toast.LENGTH_LONG);
            toast.setGravity(Gravity.CENTER, 0, 0);//设置toast上下左右中
            LinearLayout toastView = (LinearLayout) toast.getView();
            ImageView imageCodeProject = new ImageView(getApplicationContext());
            imageCodeProject.setImageResource(R.drawable.icon_ht);
            toastView.addView(imageCodeProject, 0);//add添加图片进入
            toast.show();![在这里插入图片描述](https://img-blog.csdnimg.cn/20200714162123247.jpg?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80NDY2NjY5NA==,size_16,color_FFFFFF,t_70)

你可能感兴趣的:(1,android)