Browse Source

AndroidX refactoring fix

pull/61/merge
Ezerous 6 years ago
parent
commit
907998d59d
No known key found for this signature in database GPG Key ID: 262B2954BBA319E3
  1. 2
      app/build.gradle
  2. 1
      app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java
  3. 18
      app/src/main/res/xml-v26/app_preferences_guest.xml
  4. 30
      app/src/main/res/xml-v26/app_preferences_user.xml
  5. 26
      app/src/main/res/xml/app_preferences_guest.xml

2
app/build.gradle

@ -56,6 +56,7 @@ dependencies {
implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0' implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
implementation 'com.google.firebase:firebase-core:16.0.4' implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.google.firebase:firebase-messaging:17.3.3' implementation 'com.google.firebase:firebase-messaging:17.3.3'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5' implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5'
@ -75,7 +76,6 @@ dependencies {
implementation "ru.noties:markwon:2.0.0" implementation "ru.noties:markwon:2.0.0"
implementation 'net.gotev:uploadservice:3.4.2' implementation 'net.gotev:uploadservice:3.4.2'
implementation 'net.gotev:uploadservice-okhttp:3.4.2' implementation 'net.gotev:uploadservice-okhttp:3.4.2'
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
implementation 'com.google.android.material:material:1.0.0' implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
} }

1
app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java

@ -323,6 +323,7 @@ public abstract class BaseActivity extends AppCompatActivity {
.withCompactStyle(true) .withCompactStyle(true)
.withSelectionListEnabledForSingleProfile(false) .withSelectionListEnabledForSingleProfile(false)
.withHeaderBackground(R.color.primary) .withHeaderBackground(R.color.primary)
.withTextColor(getResources().getColor(R.color.iron))
.addProfiles(profileDrawerItem) .addProfiles(profileDrawerItem)
.withOnAccountHeaderListener((view, profile, currentProfile) -> { .withOnAccountHeaderListener((view, profile, currentProfile) -> {
if (sessionManager.isLoggedIn()) { if (sessionManager.isLoggedIn()) {

18
app/src/main/res/xml-v26/app_preferences_guest.xml

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.v7.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<android.support.v7.preference.PreferenceCategory android:title="@string/pref_category_app"> <androidx.preference.PreferenceCategory android:title="@string/pref_category_app">
<android.support.v7.preference.ListPreference <androidx.preference.ListPreference
android:defaultValue="0" android:defaultValue="0"
android:dialogTitle="@string/pref_app_main_default_tab_dialog_title" android:dialogTitle="@string/pref_app_main_default_tab_dialog_title"
android:entries="@array/pref_app_main_default_tab_entries" android:entries="@array/pref_app_main_default_tab_entries"
@ -10,21 +10,21 @@
android:key="pref_app_main_default_tab_key" android:key="pref_app_main_default_tab_key"
android:title="@string/pref_title_app_main_default_tab" android:title="@string/pref_title_app_main_default_tab"
android:summary="@string/pref_summary_app_main_default_tab" /> android:summary="@string/pref_summary_app_main_default_tab" />
</android.support.v7.preference.PreferenceCategory> </androidx.preference.PreferenceCategory>
<android.support.v7.preference.PreferenceCategory <androidx.preference.PreferenceCategory
android:key="pref_category_privacy_key" android:key="pref_category_privacy_key"
android:title="@string/pref_category_privacy"> android:title="@string/pref_category_privacy">
<android.support.v7.preference.SwitchPreferenceCompat <androidx.preference.SwitchPreferenceCompat
android:defaultValue="false" android:defaultValue="false"
android:key="@string/pref_privacy_crashlytics_enable_key" android:key="@string/pref_privacy_crashlytics_enable_key"
android:title="@string/pref_title_privacy_crashlytics_enable" android:title="@string/pref_title_privacy_crashlytics_enable"
android:summary="@string/pref_summary_privacy_crashlytics_enable" /> android:summary="@string/pref_summary_privacy_crashlytics_enable" />
<android.support.v7.preference.SwitchPreferenceCompat <androidx.preference.SwitchPreferenceCompat
android:defaultValue="false" android:defaultValue="false"
android:key="@string/pref_privacy_analytics_enable_key" android:key="@string/pref_privacy_analytics_enable_key"
android:title="@string/pref_title_privacy_analytics_enable" android:title="@string/pref_title_privacy_analytics_enable"
android:summary="@string/pref_summary_privacy_analytics_enable" /> android:summary="@string/pref_summary_privacy_analytics_enable" />
</android.support.v7.preference.PreferenceCategory> </androidx.preference.PreferenceCategory>
</android.support.v7.preference.PreferenceScreen> </androidx.preference.PreferenceScreen>

30
app/src/main/res/xml-v26/app_preferences_user.xml

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.v7.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<android.support.v7.preference.PreferenceCategory android:title="@string/pref_category_app"> <androidx.preference.PreferenceCategory android:title="@string/pref_category_app">
<android.support.v7.preference.ListPreference <androidx.preference.ListPreference
android:defaultValue="0" android:defaultValue="0"
android:dialogTitle="@string/pref_app_main_default_tab_dialog_title" android:dialogTitle="@string/pref_app_main_default_tab_dialog_title"
android:entries="@array/pref_app_main_default_tab_entries" android:entries="@array/pref_app_main_default_tab_entries"
@ -10,41 +10,41 @@
android:key="pref_app_main_default_tab_key" android:key="pref_app_main_default_tab_key"
android:title="@string/pref_title_app_main_default_tab" android:title="@string/pref_title_app_main_default_tab"
android:summary="@string/pref_summary_app_main_default_tab" /> android:summary="@string/pref_summary_app_main_default_tab" />
</android.support.v7.preference.PreferenceCategory> </androidx.preference.PreferenceCategory>
<android.support.v7.preference.PreferenceCategory <androidx.preference.PreferenceCategory
android:key="pref_category_posting_key" android:key="pref_category_posting_key"
android:title="@string/pref_category_posting"> android:title="@string/pref_category_posting">
<android.support.v7.preference.SwitchPreferenceCompat <androidx.preference.SwitchPreferenceCompat
android:defaultValue="true" android:defaultValue="true"
android:key="pref_posting_app_signature_enable_key" android:key="pref_posting_app_signature_enable_key"
android:title="@string/pref_title_posting_app_signature_enable" android:title="@string/pref_title_posting_app_signature_enable"
android:summary="@string/pref_summary_posting_app_signature_enable" /> android:summary="@string/pref_summary_posting_app_signature_enable" />
</android.support.v7.preference.PreferenceCategory> </androidx.preference.PreferenceCategory>
<!--<android.support.v7.preference.PreferenceCategory <!--<androidx.preference.PreferenceCategory
android:key="pref_category_uploading_key" android:key="pref_category_uploading_key"
android:title="@string/pref_category_uploading"> android:title="@string/pref_category_uploading">
<android.support.v7.preference.SwitchPreferenceCompat <androidx.preference.SwitchPreferenceCompat
android:defaultValue="true" android:defaultValue="true"
android:key="pref_uploading_app_signature_enable_key" android:key="pref_uploading_app_signature_enable_key"
android:title="@string/pref_title_uploading_app_signature_enable" android:title="@string/pref_title_uploading_app_signature_enable"
android:summary="@string/pref_summary_uploading_app_signature_enable" /> android:summary="@string/pref_summary_uploading_app_signature_enable" />
</android.support.v7.preference.PreferenceCategory>--> </androidx.preference.PreferenceCategory>-->
<android.support.v7.preference.PreferenceCategory <androidx.preference.PreferenceCategory
android:key="pref_category_privacy_key" android:key="pref_category_privacy_key"
android:title="@string/pref_category_privacy"> android:title="@string/pref_category_privacy">
<android.support.v7.preference.SwitchPreferenceCompat <androidx.preference.SwitchPreferenceCompat
android:defaultValue="false" android:defaultValue="false"
android:key="@string/pref_privacy_crashlytics_enable_key" android:key="@string/pref_privacy_crashlytics_enable_key"
android:title="@string/pref_title_privacy_crashlytics_enable" android:title="@string/pref_title_privacy_crashlytics_enable"
android:summary="@string/pref_summary_privacy_crashlytics_enable" /> android:summary="@string/pref_summary_privacy_crashlytics_enable" />
<android.support.v7.preference.SwitchPreferenceCompat <androidx.preference.SwitchPreferenceCompat
android:defaultValue="false" android:defaultValue="false"
android:key="@string/pref_privacy_analytics_enable_key" android:key="@string/pref_privacy_analytics_enable_key"
android:title="@string/pref_title_privacy_analytics_enable" android:title="@string/pref_title_privacy_analytics_enable"
android:summary="@string/pref_summary_privacy_analytics_enable" /> android:summary="@string/pref_summary_privacy_analytics_enable" />
</android.support.v7.preference.PreferenceCategory> </androidx.preference.PreferenceCategory>
</android.support.v7.preference.PreferenceScreen> </androidx.preference.PreferenceScreen>

26
app/src/main/res/xml/app_preferences_guest.xml

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.v7.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <androidx.preference.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<android.support.v7.preference.PreferenceCategory android:title="@string/pref_category_app"> <androidx.preference.PreferenceCategory android:title="@string/pref_category_app">
<android.support.v7.preference.ListPreference <androidx.preference.ListPreference
android:defaultValue="0" android:defaultValue="0"
android:dialogTitle="@string/pref_app_main_default_tab_dialog_title" android:dialogTitle="@string/pref_app_main_default_tab_dialog_title"
android:entries="@array/pref_app_main_default_tab_entries" android:entries="@array/pref_app_main_default_tab_entries"
@ -10,14 +10,14 @@
android:key="pref_app_main_default_tab_key" android:key="pref_app_main_default_tab_key"
android:title="@string/pref_title_app_main_default_tab" android:title="@string/pref_title_app_main_default_tab"
android:summary="@string/pref_summary_app_main_default_tab" /> android:summary="@string/pref_summary_app_main_default_tab" />
</android.support.v7.preference.PreferenceCategory> </androidx.preference.PreferenceCategory>
<android.support.v7.preference.PreferenceCategory android:title="@string/pref_category_notifications"> <androidx.preference.PreferenceCategory android:title="@string/pref_category_notifications">
<android.support.v7.preference.SwitchPreferenceCompat <androidx.preference.SwitchPreferenceCompat
android:defaultValue="true" android:defaultValue="true"
android:key="pref_notification_vibration_enable_key" android:key="pref_notification_vibration_enable_key"
android:title="@string/pref_title_notification_vibration_enable" /> android:title="@string/pref_title_notification_vibration_enable" />
<android.support.v7.preference.SwitchPreferenceCompat <androidx.preference.SwitchPreferenceCompat
android:defaultValue="true" android:defaultValue="true"
android:key="pref_notification_led_enable_key" android:key="pref_notification_led_enable_key"
android:title="@string/pref_title_notification_led_enable" android:title="@string/pref_title_notification_led_enable"
@ -26,21 +26,21 @@
android:key="pref_notifications_select_sound_key" android:key="pref_notifications_select_sound_key"
android:title="@string/pref_title_notifications_sound" android:title="@string/pref_title_notifications_sound"
android:summary="@string/pref_summary_notifications_sound" /> android:summary="@string/pref_summary_notifications_sound" />
</android.support.v7.preference.PreferenceCategory> </androidx.preference.PreferenceCategory>
<android.support.v7.preference.PreferenceCategory <androidx.preference.PreferenceCategory
android:key="pref_category_privacy_key" android:key="pref_category_privacy_key"
android:title="@string/pref_category_privacy"> android:title="@string/pref_category_privacy">
<android.support.v7.preference.SwitchPreferenceCompat <androidx.preference.SwitchPreferenceCompat
android:defaultValue="false" android:defaultValue="false"
android:key="@string/pref_privacy_crashlytics_enable_key" android:key="@string/pref_privacy_crashlytics_enable_key"
android:title="@string/pref_title_privacy_crashlytics_enable" android:title="@string/pref_title_privacy_crashlytics_enable"
android:summary="@string/pref_summary_privacy_crashlytics_enable" /> android:summary="@string/pref_summary_privacy_crashlytics_enable" />
<android.support.v7.preference.SwitchPreferenceCompat <androidx.preference.SwitchPreferenceCompat
android:defaultValue="false" android:defaultValue="false"
android:key="@string/pref_privacy_analytics_enable_key" android:key="@string/pref_privacy_analytics_enable_key"
android:title="@string/pref_title_privacy_analytics_enable" android:title="@string/pref_title_privacy_analytics_enable"
android:summary="@string/pref_summary_privacy_analytics_enable" /> android:summary="@string/pref_summary_privacy_analytics_enable" />
</android.support.v7.preference.PreferenceCategory> </androidx.preference.PreferenceCategory>
</android.support.v7.preference.PreferenceScreen> </androidx.preference.preference.PreferenceScreen>

Loading…
Cancel
Save