1. Download our Official Android App: Forums for Android!

Apps I Need Help

Discussion in 'Android Development' started by Mario Drouga, Dec 16, 2014.

  1. Mario Drouga

    Mario Drouga Lurker
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    1
    Joined:
    Dec 16, 2014

    Dec 16, 2014
    1
    0
    15
    I know java basics but, I don't know what I'm suppose to do here:


    @override
    public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()){
    case R.id.action_search:
    openSearch();
    return true;
    case R.id.action_settings:
    openSettings();
    return true;
    default:
    return super.onOptionsItemSelected(item);
    }
    }


    I want to display strings when I press on the actionbar buttons, so what am I going to have to do?
     

    Advertisement

  2. Manaya

    Manaya Member
    Rank:
    None
    Points:
    18
    Posts:
    62
    Joined:
    Aug 4, 2014

    Aug 4, 2014
    62
    14
    18
    You just do that or whatever you want in the openSearch() and openSearch() methods that you define yourself.
     

Share This Page

Loading...