Excepción del fragmento de Android: actividad no encontrada
Estoy usando elnavigation-drawer
plantilla en eclipse para hacer una simple aplicación de Android. Tengo algunos problemas con el fragmento. Declaré un fragmento llamado PresenceLog Fragment en manifiesto pero cuando lo llamé enMainActivity
, el registro todavía dice que
03-23 13:54:50.817: E/AndroidRuntime(16750): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.singtel.ricecooker/com.singtel.ricecooker.PresenceLogFragment}; have you declared this activity in your AndroidManifest.xml?
Aquí está mi manifiesto
Aquí está mi clase de fragmentos
public class PresenceLogFragment extends Fragment{
private TextView myText = null;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
return inflater.inflate(R.layout.presence_log, null);
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
ArrayList<String> userList = null;
RiceServerRequest newRequest = new RiceServerRequest();
//newRequest.getRequestInfo(this);
}
public void updateUserList(ArrayList<String> userList){
LinearLayout lView = (LinearLayout) getView().findViewById (R.layout.presence_log);
//LinearLayout ll = (LinearLayout)fragment.getView().findViewById(R.id.commentFragmentLayout);
for (int i = 0; i < userList.size();i++){
myText = new TextView(getActivity());
myText.setText(userList.get(i));
lView.addView(myText);
}
//setContentView(lView);
}
Aquí está mi actividad principal
private void launchPresenceLog(){
Intent intent = new Intent(this,PresenceLogFragment.class);
startActivity(intent);
}
Sería genial si sabes lo que está mal con mi código. Además, dado que soy nuevo en la programación de Android, le agradecería que sugiriera algunos cursos en línea.