2014年3月29日土曜日

hello worldが消えない場合

androidで、初期のセットアップをすると、hello worldがずっとでていて、消えません。

最近作っていなかったので、defaultの状態がわかりませんでした。

原因はこれ、


   
  if (savedInstanceState == null) {
   getSupportFragmentManager().beginTransaction()
     .add(R.id.container, new PlaceholderFragment()).commit();
  }
getSupportFragmentManager().beginTransaction() .add(R.id.container, new PlaceholderFragment()).commit(); を消せば、hello worldも消えました。

0 件のコメント:

コメントを投稿