From: Gustavo Martin Morcuende Date: Thu, 1 Sep 2016 18:30:27 +0000 (+0200) Subject: Split ActionBar does not work with Theme.AppCompat X-Git-Tag: weatherinformation-1.3~5 X-Git-Url: https://git.gumartinm.name/?a=commitdiff_plain;h=6cf18dc54114b5c78d0f6cad9219e05852996c2e;p=AndroidWeatherInformation Split ActionBar does not work with Theme.AppCompat https://commonsware.com/blog/2014/11/18/android-5p0-deprecation-splitactionbarwhennarrow.html http://stackoverflow.com/a/27047159 --- diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 31c5221..2e5e7f4 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -66,8 +66,14 @@ + diff --git a/app/src/main/java/name/gumartinm/weather/information/activity/MainTabsActivity.java b/app/src/main/java/name/gumartinm/weather/information/activity/MainTabsActivity.java index 5aba1d6..ed99be4 100644 --- a/app/src/main/java/name/gumartinm/weather/information/activity/MainTabsActivity.java +++ b/app/src/main/java/name/gumartinm/weather/information/activity/MainTabsActivity.java @@ -60,6 +60,8 @@ public class MainTabsActivity extends AppCompatActivity { final ActionBar actionBar = this.getSupportActionBar(); actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE, ActionBar.DISPLAY_SHOW_TITLE); + actionBar.setDisplayUseLogoEnabled(true); + actionBar.setDisplayShowTitleEnabled(true); actionBar.setDisplayHomeAsUpEnabled(true); actionBar.setDisplayShowHomeEnabled(true); actionBar.setIcon(R.drawable.ic_launcher);