Trying to make the Fragments example work on lower than 11 SDK, I get an error in
setListAdapter(new ArrayAdapter<String>(getActivity(),
android.R.layout.simple_list_item_activated_1, Shakespeare.TITLES));
saying "simple_list_item_activated_1" cannot be resolved or is not a field". In import i have
import com.example.android.apis.R;
import com.example.android.apis.Shakespeare;
What wrong is in here?
That resource is new to API Level 11. If you want to use that resource on earlier versions of Android, copy it out of your SDK and into your project, then reference your project-local copy. Note that you may need to make other adjustments to this layout file, as I think it will refer to some new style attributes and such that do not exist in earlier versions of Android.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With