Saturday, October 12, 2013

Re: [android-developers] Simple code that works in 3.0 but not in 2.3.3 (with support lib)

I found the cause. If the activity extends FragmentActivity, the code above works in 2.3.3, but if it extends ActionBarActivity it does not work.

Does someone know how to solve it ?

This ActionBarCompat has a lot of bugs !! Maybe it is best to return to ActionSherlockBar.




2013/10/12 Gink Labrev <gink.labrev@gmail.com>
Hi,

Why does the simple code below work in Android 3.0, but not in 2.3.3 ???
In 2.3.3, it shows only a blank screen.
Any help would be appreciated.

import android.os.Bundle;
import android.support.v4.app.ListFragment;
import android.widget.ArrayAdapter;

public class TestListFragment extends ListFragment {

private ArrayAdapter<String> myAdapter;
private String[] data = {"One", "Two", "Three"};
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
myAdapter = new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1, data);
setListAdapter(myAdapter);
}
}

Regards,

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate