| package test.pkg; |
| |
| import android.app.Activity; |
| import android.os.Bundle; |
| |
| public class StringFormatActivity2 extends Activity { |
| /** Called when the activity is first created. */ |
| @Override |
| public void onCreate(Bundle savedInstanceState) { |
| super.onCreate(savedInstanceState); |
| String target = "World"; |
| getResources().getString(R.string.formattest1, "hello"); |
| getResources().getString(R.string.formattest2, "hello"); |
| getResources().getString(R.string.formattest3, 42); |
| getResources().getString(R.string.formattest4, 42); |
| getResources().getString(R.string.formattest5, "hello"); |
| getResources().getString(R.string.formattest6, "hello"); |
| getResources().getString(R.string.formattest7, "hello"); |
| } |
| } |