There are many answers on the same issues. I tried all of them. Most of are pointing out about changing activity to ActionBarActivity and changing getAction to getSupportAction. But nothing worked for me.
Is there any solution for this issue?
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
getSupportActionBar().setDisplayShowHomeEnabled(true);
getSupportActionBar().setLogo(R.drawable.logo_share);
getSupportActionBar().setDisplayUseLogoEnabled(true);
setContentView(R.layout.activity_main);
}
}
exception on setDisplayShowEnabled