Update versions of targetSDK and Support library
Fix issue with ActionBar not showing hamburger menu with Support library v22
This commit is contained in:
parent
33fde2cba7
commit
4a2d699e62
|
@ -7,7 +7,7 @@ android {
|
|||
defaultConfig {
|
||||
applicationId "org.xbmc.kore"
|
||||
minSdkVersion 15
|
||||
targetSdkVersion 21
|
||||
targetSdkVersion 22
|
||||
versionCode 11
|
||||
versionName "1.4.0"
|
||||
}
|
||||
|
@ -70,9 +70,9 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.android.support:support-v4:21.0.3'
|
||||
compile 'com.android.support:appcompat-v7:21.0.3'
|
||||
compile 'com.android.support:cardview-v7:21.0.3'
|
||||
compile 'com.android.support:support-v4:22.2.0'
|
||||
compile 'com.android.support:appcompat-v7:22.2.0'
|
||||
compile 'com.android.support:cardview-v7:22.2.0'
|
||||
|
||||
compile 'com.fasterxml.jackson.core:jackson-databind:2.5.2'
|
||||
compile 'com.jakewharton:butterknife:6.1.0'
|
||||
|
|
|
@ -154,6 +154,8 @@ public class AddonsActivity extends BaseActivity
|
|||
setSupportActionBar(toolbar);
|
||||
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
if (actionBar == null) return;
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
if (addonTitle != null) {
|
||||
navigationDrawerFragment.setDrawerIndicatorEnabled(false);
|
||||
actionBar.setTitle(addonTitle);
|
||||
|
|
|
@ -120,6 +120,8 @@ public class FileActivity extends BaseActivity {
|
|||
setSupportActionBar(toolbar);
|
||||
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
if (actionBar == null) return;
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
navigationDrawerFragment.setDrawerIndicatorEnabled(true);
|
||||
actionBar.setTitle(title);
|
||||
|
||||
|
|
|
@ -154,6 +154,8 @@ public class MoviesActivity extends BaseActivity
|
|||
setSupportActionBar(toolbar);
|
||||
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
if (actionBar == null) return;
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
if (movieTitle != null) {
|
||||
navigationDrawerFragment.setDrawerIndicatorEnabled(false);
|
||||
actionBar.setTitle(movieTitle);
|
||||
|
|
|
@ -213,6 +213,8 @@ public class MusicActivity extends BaseActivity
|
|||
setSupportActionBar(toolbar);
|
||||
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
if (actionBar == null) return;
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
if (albumTitle != null) {
|
||||
navigationDrawerFragment.setDrawerIndicatorEnabled(false);
|
||||
actionBar.setTitle(albumTitle);
|
||||
|
|
|
@ -24,6 +24,7 @@ import android.os.Handler;
|
|||
import android.preference.PreferenceManager;
|
||||
import android.support.v4.view.ViewPager;
|
||||
import android.support.v4.widget.DrawerLayout;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.text.TextUtils;
|
||||
import android.view.KeyEvent;
|
||||
|
@ -305,6 +306,10 @@ public class RemoteActivity extends BaseActivity
|
|||
private void setupActionBar() {
|
||||
setToolbarTitle(toolbar, 1);
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
if (actionBar == null) return;
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
|
||||
private void setToolbarTitle(Toolbar toolbar, int position) {
|
||||
|
|
|
@ -171,6 +171,8 @@ public class TVShowsActivity extends BaseActivity
|
|||
setSupportActionBar(toolbar);
|
||||
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
if (actionBar == null) return;
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
if (tvshowTitle != null) {
|
||||
navigationDrawerFragment.setDrawerIndicatorEnabled(false);
|
||||
actionBar.setTitle(tvshowTitle);
|
||||
|
|
|
@ -18,6 +18,7 @@ package org.xbmc.kore.ui.hosts;
|
|||
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.widget.DrawerLayout;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
|
@ -79,5 +80,8 @@ public class HostManagerActivity extends BaseActivity {
|
|||
Toolbar toolbar = (Toolbar)findViewById(R.id.default_toolbar);
|
||||
toolbar.setTitle(R.string.xbmc_media_center);
|
||||
setSupportActionBar(toolbar);
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
if (actionBar == null) return;
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue