From e0034f62e11b9daa69cd41bb20a09e438c3c4247 Mon Sep 17 00:00:00 2001 From: ChronosX88 Date: Thu, 15 Nov 2018 16:35:13 +0300 Subject: [PATCH] Fixed SettingsActivity (getSupportActionBar() isn't working on PreferenceActivity) --- .idea/caches/build_file_checksums.ser | Bin 0 -> 531 bytes .idea/gradle.xml | 6 ++++ .idea/misc.xml | 31 +++++++++++++++++- .idea/vcs.xml | 6 ++++ app/build.gradle | 3 +- .../vrcatalog/SettingsActivity.java | 9 +++-- 6 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 .idea/caches/build_file_checksums.ser create mode 100644 .idea/vcs.xml diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser new file mode 100644 index 0000000000000000000000000000000000000000..513b45630436762e7de8f50a7601af2a53243d4f GIT binary patch literal 531 zcmZ4UmVvdnh`~NNKUXg?FQq6yGexf?KR>5fFEb@IQ7^qHF(oHeub?PDD>b=9F91S2 zm1gFoxMk*~I%lLNXBU^|7Q2L-Ts|(GuF1r}nf0c10S!18}mhbLxkeX0=^7o4WADqX_B zlLYcFOjjX89RnLkp~|Y@wCzgP(gp{TnAMb&N=q07a`KZCb3mb0kXlrdnOa;5R~(nn z>kug`u>Jc(>+7@Tzp5``P}0xH&rQ`YHq?ijtd9t64DDBBdv5kKY+`xYz&Yd152v~k z20=WkCGP$_ySU}zflII2LbKOjFax?Qv7kU7yEo+2zFM3LZLnH$WN-e#-D^rK0Q_RO AzyJUM literal 0 HcmV?d00001 diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 76a4349..7ac24c7 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -5,6 +5,12 @@ diff --git a/.idea/misc.xml b/.idea/misc.xml index 4872587..e0d5b93 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,35 @@ - + + + + + diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 2553f43..06a8215 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -16,10 +16,11 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } + buildToolsVersion '27.0.3' } dependencies { - implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'com.android.support:appcompat-v7:27.1.1' implementation 'com.android.support:design:27.1.1' implementation 'com.android.support.constraint:constraint-layout:1.1.3' diff --git a/app/src/main/java/ru/volgorobot/vrcatalog/SettingsActivity.java b/app/src/main/java/ru/volgorobot/vrcatalog/SettingsActivity.java index 65f08c0..928ab76 100644 --- a/app/src/main/java/ru/volgorobot/vrcatalog/SettingsActivity.java +++ b/app/src/main/java/ru/volgorobot/vrcatalog/SettingsActivity.java @@ -2,19 +2,22 @@ package ru.volgorobot.vrcatalog; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; +import android.support.v7.app.AppCompatDelegate; import android.view.Menu; import android.view.MenuItem; import android.preference.PreferenceActivity; public class SettingsActivity extends PreferenceActivity { + private AppCompatDelegate mDelegate; + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.activity_settings); - getSupportActionBar().setDisplayHomeAsUpEnabled(true); - getSupportActionBar().setHomeButtonEnabled(true); + //getActionBar().setDisplayHomeAsUpEnabled(true); + //getActionBar().setHomeButtonEnabled(true); } @Override @@ -32,4 +35,6 @@ public class SettingsActivity extends PreferenceActivity { } return super.onOptionsItemSelected(item); } + + }