public class MainActivity extends ActionBarActivity {


@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_main);

//Toast.makeText(this, "First Toast", Toast.LENGTH_LONG).show();

}


출력 First Toast



public class MainActivity extends ActionBarActivity {


@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_main);

Toast.makeText(this, getString(R.string.toast), Toast.LENGTH_LONG).show();

}


string.xml에 추가 

 <string name="toast">xml Toast</string>


출력 xml Toast

블로그 이미지

왕왕왕왕

,