コードを使用しているので、フラグメントを使用しました。
そうするために、タグごとのフラグメントを使用してフラグメントを呼び出すアクティビティがあります。
FluxListFragment FLF = (FluxListFragment) getFragmentManager().findFragmentByTag(FRAG_LIST);
しかし、今日以来、getFragmentManagerは認識されていないようです。それは言う:
"The method getFragmentManager() is undefined for the type FluxMainActivity"
問題はビルドターゲットに起因していますか?(Android 3.0を入れました)
コードは次のとおりです。
public Class FluxMainActivity extends Activity {
@override
public void onCreate(Bundle saveInstanceState)
{
super.onCreate();
setContentView(R.layout.main);
FluxListeFragment FLF = (FluxListeFragment)getFragmentManager().findFragmentByTag(FRAG_LISTE);
}
}
メソッドは、FluxMainActivityではなくFluxListeFragmentにリンクする必要があります。キャストが間違っていると思います。