| setView() | ใช้กำหนด Object View ที่จะให้แสดงบน toast |
|---|
method:setView ( View view )
return type:void
content:ใช้กำหนด Object View ที่จะให้แสดงบน toast
example:public class AndroidBamboo extends Activity { public void onCreate( Bundle savedInstanceState ) { super.onCreate ( savedInstanceState ); Toast toast = Toast.makeText ( this, "Welcome To BambooLabCode.Com", Toast.LENGTH_LONG ); Button button = new Button ( this ); button.setText ( "Welcome To BambooLabCode.Com" ); toast.setView ( button ); toast.show ( ); } }