I am trying to make an application using support libraries, and I tried to add an action bar to it. The action bar works fine, but the company icon is not displayed. I tried to specify the icon and logo in the manifest and programmatically, but still nothing works.
In my code, I have the following:
//Actionbar setup mActionBar = getSupportActionBar(); mActionBar.setIcon(res.getDrawable(R.drawable.ic_launcher)); mActionBar.setLogo(res.getDrawable(R.drawable.ic_launcher)); mActionBar.setTitle(""); //Tabs setup mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); tabConoce = mActionBar.newTab().setText(res.getString(R.string.conoce)); tabExperimenta = mActionBar.newTab().setText(res.getString(R.string.experimenta)); frgConoce = new TabConoce(); frgExperimenta = new TabExperimenta(); tabConoce.setTabListener(new GeaTabListener(frgConoce)); tabExperimenta.setTabListener(new GeaTabListener(frgExperimenta)); mActionBar.addTab(tabConoce); mActionBar.addTab(tabExperimenta);
And in the manifest, I have this:
<application android:icon="@drawable/ic_launcher" android:logo="@drawable/ic_launcher" ... > ... </application>
Please, help.
source share