标签:
case R.id.btn_3: Toast my = Toast.makeText(MainActivity.this, "short", Toast.LENGTH_SHORT); //设置显示的位置 my.setGravity(Gravity.CENTER_HORIZONTAL, 60, 40); //返回视图 LinearLayout lin = (LinearLayout) my.getView(); ImageView img = new ImageView(MainActivity.this); img.setImageResource(R.drawable.ic_launcher); //把图片加入到布局里,并且在文字之上 lin.addView(img, 0); my.show(); break;
标签:
原文地址:http://www.cnblogs.com/84126858jmz/p/4892376.html