我正在用SherlockFragmentActivity
android.support.v7.app.ActionBarActivity
库
但我该怎么办SherlockListFragmentActivity
?没有ActionBarListActivity
...
答案 0 :(得分:0)
所以我做了
public class ActionBarListActivity extends ActionBarActivity {
private ListView mListView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_actionbarlist);
mListView = (ListView)findViewById(android.R.id.list);
}
protected void setListAdapter(ArrayAdapter<String> adapter) {
mListView.setAdapter(adapter);
}
}
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>