diff --git a/android/app/build.gradle b/android/app/build.gradle index 2d423b2..d93cf69 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,11 +1,11 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 27 + compileSdkVersion 28 defaultConfig { applicationId "com.blackforestbytes.simplecloudnotifier" minSdkVersion 21 - targetSdkVersion 27 + targetSdkVersion 28 versionCode 2 versionName "0.2" } @@ -24,15 +24,18 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'com.android.support:appcompat-v7:27.1.1' - implementation 'com.android.support:cardview-v7:27.1.1' + implementation 'com.android.support:support-v4:28.0.0' + implementation 'com.android.support:appcompat-v7:28.0.0' + implementation 'com.android.support:cardview-v7:28.0.0' implementation 'com.android.support.constraint:constraint-layout:1.1.3' - implementation 'com.android.support:recyclerview-v7:27.1.1' - implementation 'com.android.support:design:27.1.1' + implementation 'com.android.support:recyclerview-v7:28.0.0' + implementation 'com.android.support:design:28.0.0' + + implementation 'com.takisoft.fix:preference-v7:28.0.0.0' + implementation 'com.takisoft.fix:preference-v7-extras:28.0.0.0' implementation 'com.google.firebase:firebase-core:16.0.3' implementation 'com.google.firebase:firebase-messaging:17.3.2' - implementation 'com.android.support:support-v4:27.1.1' implementation "android.arch.lifecycle:extensions:1.1.1" diff --git a/android/app/src/main/java/com/blackforestbytes/simplecloudnotifier/view/AccountFragment.java b/android/app/src/main/java/com/blackforestbytes/simplecloudnotifier/view/AccountFragment.java index ee6e18f..9c4d2a9 100644 --- a/android/app/src/main/java/com/blackforestbytes/simplecloudnotifier/view/AccountFragment.java +++ b/android/app/src/main/java/com/blackforestbytes/simplecloudnotifier/view/AccountFragment.java @@ -4,25 +4,20 @@ import android.annotation.SuppressLint; import android.content.ClipData; import android.content.ClipboardManager; import android.content.Intent; -import android.graphics.drawable.Drawable; -import android.graphics.drawable.VectorDrawable; import android.net.Uri; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v4.app.Fragment; -import android.util.DisplayMetrics; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageButton; -import android.widget.ImageView; import android.widget.TextView; import com.blackforestbytes.simplecloudnotifier.R; import com.blackforestbytes.simplecloudnotifier.SCNApp; import com.blackforestbytes.simplecloudnotifier.model.CMessageList; import com.blackforestbytes.simplecloudnotifier.model.SCNSettings; -import com.blackforestbytes.simplecloudnotifier.model.ServerCommunication; import net.glxn.qrgen.android.QRCode; import net.glxn.qrgen.core.image.ImageType; diff --git a/android/app/src/main/java/com/blackforestbytes/simplecloudnotifier/view/SettingsFragment.java b/android/app/src/main/java/com/blackforestbytes/simplecloudnotifier/view/SettingsFragment.java index 4dba427..c379213 100644 --- a/android/app/src/main/java/com/blackforestbytes/simplecloudnotifier/view/SettingsFragment.java +++ b/android/app/src/main/java/com/blackforestbytes/simplecloudnotifier/view/SettingsFragment.java @@ -1,30 +1,15 @@ package com.blackforestbytes.simplecloudnotifier.view; - import android.os.Bundle; -import android.support.v4.app.Fragment; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; +import android.support.v7.preference.PreferenceFragmentCompat; import com.blackforestbytes.simplecloudnotifier.R; -/** - * A simple {@link Fragment} subclass. - */ -public class SettingsFragment extends Fragment { - - - public SettingsFragment() { - // Required empty public constructor - } - - +public class SettingsFragment extends PreferenceFragmentCompat +{ @Override - public View onCreateView(LayoutInflater inflater, ViewGroup container, - Bundle savedInstanceState) { - // Inflate the layout for this fragment - return inflater.inflate(R.layout.fragment_settings, container, false); + public void onCreatePreferences(Bundle savedInstanceState, String rootKey) + { + setPreferencesFromResource(R.xml.preferences, rootKey); } - } diff --git a/android/app/src/main/res/layout/activity_main.xml b/android/app/src/main/res/layout/activity_main.xml index 050c331..5b56100 100644 --- a/android/app/src/main/res/layout/activity_main.xml +++ b/android/app/src/main/res/layout/activity_main.xml @@ -1,5 +1,6 @@ - - - - - - - \ No newline at end of file diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml index 2bcf132..67e8b30 100644 --- a/android/app/src/main/res/values/styles.xml +++ b/android/app/src/main/res/values/styles.xml @@ -1,7 +1,7 @@ -