Button btnTest = (Button)findViewById(R.id.btnTest); btnTest.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub Toast toast = Toast.makeText(getBaseContext(), "hello", Toast.LENGTH_SHORT); LinearLayout ll = (LinearLayout)toast.getView(); TextView tv = (TextView)ll.getChildAt(0); ll.removeAllViews(); ImageView imgVu = new ImageView(getBaseContext()); imgVu.setImageResource(R.drawable.android); ll.addView(imgVu); ll.addView(tv); toast.show(); } });
댓글 없음 :
댓글 쓰기