Code example for ActionBarActivity

0
 
/** 
 * Shows a list of available categories and offers a search button. If the user 
 * selects a category, the MiroGuideCategoryActivity is started. 
 */ 
public class MiroGuideMainActivity extends ActionBarActivity implements AdapterView.OnItemClickListener {
    private static final String TAG = "MiroGuideMainActivity";
 
    private static String[] categories;
    private ArrayAdapter<String> listAdapter;
 
    private TextView txtvStatus;
    private ListView listView;
 
    @Override 
    protected void onCreate(Bundle savedInstanceState) {
        setTheme(UserPreferences.getTheme()); 
        super.onCreate(savedInstanceState);
        getSupportActionBar().setDisplayHomeAsUpEnabled(true); 
        setContentView(R.layout.miroguide_categorylist);