From fe1723aa9ee20ccf18cda45f833f5f57dd5912e1 Mon Sep 17 00:00:00 2001 From: Michael Johnston Date: Mon, 6 Jul 2020 23:40:47 +1000 Subject: [PATCH] cleanup some strings --- .../zooforzotero/SyncSetup/SyncSetupView.kt | 3 -- .../zooforzotero/ZooForZoteroApplication.kt | 28 ++++++------- .../main/res/layout/activity_sync_setup.xml | 39 +++---------------- app/src/main/res/values/strings.xml | 5 +++ 4 files changed, 24 insertions(+), 51 deletions(-) diff --git a/app/src/main/java/com/mickstarify/zooforzotero/SyncSetup/SyncSetupView.kt b/app/src/main/java/com/mickstarify/zooforzotero/SyncSetup/SyncSetupView.kt index 3fc61a28..a2bf51ec 100644 --- a/app/src/main/java/com/mickstarify/zooforzotero/SyncSetup/SyncSetupView.kt +++ b/app/src/main/java/com/mickstarify/zooforzotero/SyncSetup/SyncSetupView.kt @@ -84,9 +84,6 @@ class SyncSetupView : AppCompatActivity(), SyncSetupContract.View { val rg_cloudproviders = findViewById(R.id.radiogroup_cloudproviders) rg_cloudproviders.setOnCheckedChangeListener { _, i -> when (i) { - R.id.radio_dropbox -> selected_provider = SyncOption.Dropbox - R.id.radio_googledrive -> selected_provider = SyncOption.GoogleDrive - R.id.radio_onedrive -> selected_provider = SyncOption.Onedrive R.id.radio_zotero -> selected_provider = SyncOption.ZoteroAPI R.id.radio_zotero_manual_apikey -> selected_provider = SyncOption.ZoteroAPIManual else -> throw Exception("Error, not sure what Radiobox was pressed") diff --git a/app/src/main/java/com/mickstarify/zooforzotero/ZooForZoteroApplication.kt b/app/src/main/java/com/mickstarify/zooforzotero/ZooForZoteroApplication.kt index 0e96aae2..c0343bad 100644 --- a/app/src/main/java/com/mickstarify/zooforzotero/ZooForZoteroApplication.kt +++ b/app/src/main/java/com/mickstarify/zooforzotero/ZooForZoteroApplication.kt @@ -1,12 +1,12 @@ package com.mickstarify.zooforzotero import android.app.Application -//import com.facebook.flipper.android.AndroidFlipperClient -//import com.facebook.flipper.android.utils.FlipperUtils -//import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin -//import com.facebook.flipper.plugins.inspector.DescriptorMapping -//import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin -//import com.facebook.soloader.SoLoader +import com.facebook.flipper.android.AndroidFlipperClient +import com.facebook.flipper.android.utils.FlipperUtils +import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin +import com.facebook.flipper.plugins.inspector.DescriptorMapping +import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin +import com.facebook.soloader.SoLoader import com.mickstarify.zooforzotero.di.component.ApplicationComponent import com.mickstarify.zooforzotero.di.component.DaggerApplicationComponent import com.mickstarify.zooforzotero.di.module.ApplicationModule @@ -18,14 +18,14 @@ class ZooForZoteroApplication : Application() { override fun onCreate() { super.onCreate() -// SoLoader.init(this, false) -// -// if (BuildConfig.DEBUG && FlipperUtils.shouldEnableFlipper(this)) { -// val client = AndroidFlipperClient.getInstance(this) -// client.addPlugin(InspectorFlipperPlugin(this, DescriptorMapping.withDefaults())) -// client.addPlugin(DatabasesFlipperPlugin(this)); -// client.start() -// } + SoLoader.init(this, false) + + if (BuildConfig.DEBUG && FlipperUtils.shouldEnableFlipper(this)) { + val client = AndroidFlipperClient.getInstance(this) + client.addPlugin(InspectorFlipperPlugin(this, DescriptorMapping.withDefaults())) + client.addPlugin(DatabasesFlipperPlugin(this)); + client.start() + } component = DaggerApplicationComponent.builder().applicationModule( diff --git a/app/src/main/res/layout/activity_sync_setup.xml b/app/src/main/res/layout/activity_sync_setup.xml index ce564fd2..b6777853 100644 --- a/app/src/main/res/layout/activity_sync_setup.xml +++ b/app/src/main/res/layout/activity_sync_setup.xml @@ -15,7 +15,7 @@ android:layout_height="wrap_content" android:layout_marginLeft="24dp" android:layout_marginTop="16dp" - android:text="Pick your cloud storage provider" + android:text="@string/pick_your_cloud_storage_provider" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintTop_toTopOf="parent" /> @@ -28,49 +28,20 @@ android:layout_marginLeft="16dp" app:layout_constraintLeft_toLeftOf="parent"> - - - - - - - + android:text="@string/zotero_account_sync" /> @@ -82,7 +53,7 @@ android:layout_marginBottom="32dp" android:layout_marginRight="32dp" android:padding="12dp" - android:text="Proceed" + android:text="@string/proceed" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintRight_toRightOf="parent" /> @@ -91,7 +62,7 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginTop="48dp" - android:text="I have only implemented support for the Zotero Account Syncing option. I will implement alternative syncing options in the future, sorry for the inconvenience." + android:text="@string/app_frontpage_disclaimer" app:layout_constraintEnd_toEndOf="@+id/btn_sync_proceed" app:layout_constraintHorizontal_bias="0.0" app:layout_constraintStart_toStartOf="@+id/radiogroup_cloudproviders" diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 241572a8..42e9432d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -40,4 +40,9 @@ Loading your library Filter Menu Force Resync + You must use the official Zotero Account syncing to use this app. + Proceed + Enter your Zotero API Key Manually + Zotero Account Sync + Pick your cloud storage provider