0

In that part of my archive in android paste the following code solved in the thread =>

App icon is not visible on Actionbar in android lolipop and above

I´m new in Android.

But I have the following code

package com.example.cursoandroid.holamundo;

import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;


public class MainActivity extends ActionBarActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

I´ve import android.app.actionBar, if I´ve ActionBarActivity. But ActionBarActivity haven´t any method: ActionBarActivity.setDisplayShowHomeEnabled(true);


I realize the following change. But the inc_launcher don´t appear

 protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        getSupportActionBar().setDisplayShowHomeEnabled(true);
    }
Community
  • 1
  • 1

0 Answers0