Cleanup bitly credentials dialog, etc.

This commit is contained in:
Erik C. Thauvin 2020-08-01 21:35:30 -07:00
parent e456ee6ee7
commit 7f2caac5b5
5 changed files with 11 additions and 23 deletions

View file

@ -9,7 +9,7 @@ android {
minSdkVersion 16
targetSdkVersion 29
versionCode 2
versionName "1.2.0-beta1"
versionName "1.2.0-beta"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
@ -24,8 +24,6 @@ android {
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
//implementation 'androidx.appcompat:appcompat:1.1.0'
//implementation 'androidx.preference:preference:1.1.1'
implementation 'net.thauvin.erik:bitly-shorten:0.9.3'
implementation 'net.thauvin.erik:isgd-shorten:0.9.1'

View file

@ -39,10 +39,10 @@ import android.content.pm.PackageManager.NameNotFoundException;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.preference.CheckBoxPreference;
import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceScreen;
import android.preference.SwitchPreference;
import java.util.Locale;
@ -56,7 +56,7 @@ import java.util.Locale;
@SuppressWarnings("deprecation")
public class EmailyPrefs extends PreferenceActivity implements OnSharedPreferenceChangeListener {
private BitlyCredsDialog bitlyCreds;
private CheckBoxPreference isgdBox;
private SwitchPreference isgdBox;
private SharedPreferences sharedPrefs;
@Override
@ -67,7 +67,7 @@ public class EmailyPrefs extends PreferenceActivity implements OnSharedPreferenc
sharedPrefs = getPreferenceScreen().getSharedPreferences();
isgdBox = (CheckBoxPreference) findPreference(getString(R.string.prefs_key_isgd_chkbox));
isgdBox = (SwitchPreference) findPreference(getString(R.string.prefs_key_isgd_chkbox));
bitlyCreds = (BitlyCredsDialog) findPreference(getString(R.string.prefs_key_bitly_creds));
setBitlyCredsSummary();

View file

@ -5,15 +5,6 @@
android:orientation="vertical"
android:paddingTop="20dip">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:gravity="start"
android:text="@string/prefs_bitly_creds_apikey"
android:textAppearance="?android:attr/textAppearanceSmall" />
<EditText
android:id="@+id/bitly_apikey_edit"
android:layout_width="match_parent"

View file

@ -10,15 +10,14 @@
<string name="app_name">Emaily</string>
<string name="prefs_about_title">About</string>
<string name="prefs_author_url">https://m.thauvin.net/android/</string>
<string name="prefs_bitly_creds_apikey">API Token</string>
<string name="prefs_bitly_creds_apikey_hint">bit.ly API Token</string>
<string name="prefs_bitly_creds_apikey_hint">Enter access token…</string>
<string name="prefs_bitly_creds_cancel">Cancel</string>
<string name="prefs_bitly_creds_dialog_title">Bit.ly API Credentials</string>
<string name="prefs_bitly_creds_noapi"><u>Need an API Token?</u></string>
<string name="prefs_bitly_creds_dialog_title">Bitly API Access Token</string>
<string name="prefs_bitly_creds_noapi"><u>Need an Access Token?</u></string>
<string name="prefs_bitly_creds_ok">OK</string>
<string name="prefs_bitly_creds_summary_default">Enter your credentials</string>
<string name="prefs_bitly_creds_summary_edit">Click to edit…</string>
<string name="prefs_bitly_creds_title">API Credentials</string>
<string name="prefs_bitly_creds_summary_default">Enter your access token</string>
<string name="prefs_bitly_creds_summary_edit">Click to edit or change</string>
<string name="prefs_bitly_creds_title">API Access Token</string>
<string name="prefs_bitly_creds_url">https://bitly.is/accesstoken</string>
<string name="prefs_bitly_title">bit.ly</string>
<string name="prefs_copyright">© 201220 Erik C. Thauvin</string>

View file

@ -2,7 +2,7 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:title="@string/prefs_isgd_title">
<CheckBoxPreference
<SwitchPreference
android:defaultValue="true"
android:key="@string/prefs_key_isgd_chkbox"
android:title="@string/prefs_isgd_chkbox_title" />