Updated copyright.

Added device default theme for progress dialog.
Updated bit.ly credential dialog layout.
This commit is contained in:
Erik C. Thauvin 2015-04-14 13:15:22 -07:00
parent 1cfaa3b523
commit 09d9d6b9fd
11 changed files with 62 additions and 53 deletions

8
.idea/copyright/Erik_C__Thauvin.xml generated Normal file
View file

@ -0,0 +1,8 @@
<component name="CopyrightManager">
<copyright>
<option name="allowReplaceKeyword" value="Erik C. Thauvin" />
<option name="keyword" value="Copyright (c)" />
<option name="myName" value="Erik C. Thauvin" />
<option name="notice" value="@(#)&amp;#36;file.fileName&#10;&#10;Copyright (c) 2011-&amp;#36;today.year Erik C. Thauvin (http://erik.thauvin.net/)&#10;All rights reserved.&#10;&#10;Redistribution and use in source and binary forms, with or without&#10;modification, are permitted provided that the following conditions are&#10;met:&#10;&#10;Redistributions of source code must retain the above copyright notice,&#10;this list of conditions and the following disclaimer.&#10;&#10;Redistributions in binary form must reproduce the above copyright notice,&#10;this list of conditions and the following disclaimer in the documentation&#10;and/or other materials provided with the distribution.&#10;&#10;Neither the name of the authors nor the names of its contributors may be&#10;used to endorse or promote products derived from this software without&#10;specific prior written permission.&#10;&#10;THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS&#10;IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,&#10;THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR&#10;PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR&#10;CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,&#10;EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&#10;PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR&#10;PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF&#10;LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING&#10;NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS&#10;SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." />
</copyright>
</component>

View file

@ -1,3 +1,11 @@
<component name="CopyrightManager"> <component name="CopyrightManager">
<settings default="" /> <settings default="Erik C. Thauvin">
<module2copyright>
<element module="Java Source" copyright="Erik C. Thauvin" />
</module2copyright>
<LanguageOptions name="JAVA">
<option name="fileTypeOverride" value="3" />
<option name="addBlankAfter" value="false" />
</LanguageOptions>
</settings>
</component> </component>

3
.idea/scopes/Java_Source.xml generated Normal file
View file

@ -0,0 +1,3 @@
<component name="DependencyValidationManager">
<scope name="Java Source" pattern="file[app]:src/main/java//*.java" />
</component>

View file

@ -6,7 +6,7 @@ android {
defaultConfig { defaultConfig {
applicationId "net.thauvin.erik.android.emaily" applicationId "net.thauvin.erik.android.emaily"
minSdkVersion 11 minSdkVersion 14
targetSdkVersion 22 targetSdkVersion 22
versionCode 2 versionCode 2
versionName "1.1b9" versionName "1.1b9"

View file

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.thauvin.erik.android.emaily"> package="net.thauvin.erik.android.emaily">
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<uses-permission android:name="android.permission.USE_CREDENTIALS" /> <uses-permission android:name="android.permission.USE_CREDENTIALS"/>
<application <application
android:allowBackup="true" android:allowBackup="true"
@ -16,20 +16,20 @@
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"> android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.SEND" /> <action android:name="android.intent.action.SEND"/>
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="text/plain" /> <data android:mimeType="text/plain"/>
</intent-filter> </intent-filter>
</activity> </activity>
<activity <activity
android:name=".EmailyPrefs" android:name=".EmailyPrefs"
android:label="@string/app_name"> android:label="@string/app_name">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER"/>
</intent-filter> </intent-filter>
</activity> </activity>
</application> </application>

View file

@ -1,7 +1,7 @@
/* /*
* @(#)Emaily.java * @(#)BitlyCredsDialog.java
* *
* Copyright (c) 2012 Erik C. Thauvin (http://erik.thauvin.net/) * Copyright (c) 2011-2015 Erik C. Thauvin (http://erik.thauvin.net/)
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -30,9 +30,6 @@
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id$
*
*/ */
package net.thauvin.erik.android.emaily; package net.thauvin.erik.android.emaily;
@ -51,7 +48,6 @@ import android.widget.TextView;
* The <code>BitlyCredsDialog</code> class implements a bit.ly credential dialog. * The <code>BitlyCredsDialog</code> class implements a bit.ly credential dialog.
* *
* @author <a href="mailto:erik@thauvin.net">Erik C. Thauvin</a> * @author <a href="mailto:erik@thauvin.net">Erik C. Thauvin</a>
* @version $Revision$
* @created March 28, 2012 * @created March 28, 2012
* @since 1.0 * @since 1.0
*/ */

View file

@ -1,7 +1,7 @@
/* /*
* @(#)Emaily.java * @(#)Emaily.java
* *
* Copyright (c) 2011-2012 Erik C. Thauvin (http://erik.thauvin.net/) * Copyright (c) 2011-2015 Erik C. Thauvin (http://erik.thauvin.net/)
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -30,9 +30,6 @@
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id$
*
*/ */
package net.thauvin.erik.android.emaily; package net.thauvin.erik.android.emaily;
@ -84,7 +81,6 @@ import com.google.api.services.urlshortener.model.Url;
* The <code>Emaily</code> class implements a URL shortener intent. * The <code>Emaily</code> class implements a URL shortener intent.
* *
* @author <a href="mailto:erik@thauvin.net">Erik C. Thauvin</a> * @author <a href="mailto:erik@thauvin.net">Erik C. Thauvin</a>
* @version $Revision$
* @created Oct 11, 2011 * @created Oct 11, 2011
* @since 1.0 * @since 1.0
*/ */
@ -349,7 +345,7 @@ public class Emaily extends Activity
*/ */
private class EmailyTask extends AsyncTask<Intent, Void, EmailyResult> private class EmailyTask extends AsyncTask<Intent, Void, EmailyResult>
{ {
private final ProgressDialog dialog = new ProgressDialog(Emaily.this); private final ProgressDialog dialog = new ProgressDialog(Emaily.this, AlertDialog.THEME_DEVICE_DEFAULT_DARK);
private final String username; private final String username;
private final String keytoken; private final String keytoken;
private final boolean isGoogl; private final boolean isGoogl;

View file

@ -1,7 +1,7 @@
/* /*
* @(#)EmailyPrefs.java * @(#)EmailyPrefs.java
* *
* Copyright (c) 2011-2014 Erik C. Thauvin (http://erik.thauvin.net/) * Copyright (c) 2011-2015 Erik C. Thauvin (http://erik.thauvin.net/)
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -30,9 +30,6 @@
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id$
*
*/ */
package net.thauvin.erik.android.emaily; package net.thauvin.erik.android.emaily;
@ -54,7 +51,6 @@ import android.preference.PreferenceScreen;
* The <code>EmailyPrefs</code> class implements a preferences screen. * The <code>EmailyPrefs</code> class implements a preferences screen.
* *
* @author <a href="mailto:erik@thauvin.net">Erik C. Thauvin</a> * @author <a href="mailto:erik@thauvin.net">Erik C. Thauvin</a>
* @version $Revision$
* @created Oct 11, 2011 * @created Oct 11, 2011
* @since 1.0 * @since 1.0
*/ */

View file

@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" > android:orientation="vertical"
android:paddingTop="20dip">
<TextView <TextView
android:id="@+id/bit_username_view" android:id="@+id/bit_username_view"
@ -10,9 +11,9 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="20dip" android:layout_marginLeft="20dip"
android:layout_marginRight="20dip" android:layout_marginRight="20dip"
android:gravity="left" android:gravity="start"
android:text="@string/prefs_bitly_creds_username" android:text="@string/prefs_bitly_creds_username"
android:textAppearance="?android:attr/textAppearanceMedium" /> android:textAppearance="?android:attr/textAppearanceSmall"/>
<EditText <EditText
android:id="@+id/bitly_username_edit" android:id="@+id/bitly_username_edit"
@ -24,7 +25,7 @@
android:inputType="text" android:inputType="text"
android:key="@string/prefs_key_bitly_username" android:key="@string/prefs_key_bitly_username"
android:scrollHorizontally="true" android:scrollHorizontally="true"
android:textAppearance="?android:attr/textAppearanceMedium" /> android:textAppearance="?android:attr/textAppearanceMedium"/>
<TextView <TextView
android:id="@+id/bitly_apikey_view" android:id="@+id/bitly_apikey_view"
@ -32,9 +33,10 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="20dip" android:layout_marginLeft="20dip"
android:layout_marginRight="20dip" android:layout_marginRight="20dip"
android:gravity="left" android:gravity="start"
android:text="@string/prefs_bitly_creds_apikey" android:text="@string/prefs_bitly_creds_apikey"
android:textAppearance="?android:attr/textAppearanceMedium" /> android:textAppearance="?android:attr/textAppearanceSmall"
/>
<EditText <EditText
android:id="@+id/bitly_apikey_edit" android:id="@+id/bitly_apikey_edit"
@ -46,7 +48,7 @@
android:inputType="text" android:inputType="text"
android:key="@string/prefs_key_bitly_apikey" android:key="@string/prefs_key_bitly_apikey"
android:scrollHorizontally="true" android:scrollHorizontally="true"
android:textAppearance="?android:attr/textAppearanceMedium" /> android:textAppearance="?android:attr/textAppearanceMedium"/>
<TextView <TextView
android:id="@+id/bitly_text_fld" android:id="@+id/bitly_text_fld"
@ -58,7 +60,7 @@
android:text="@string/prefs_bitly_creds_noapi" android:text="@string/prefs_bitly_creds_noapi"
android:textColor="#eda712" android:textColor="#eda712"
android:clickable="true" android:clickable="true"
android:textAppearance="?android:attr/textAppearanceMedium" > android:textAppearance="?android:attr/textAppearanceMedium">
</TextView> </TextView>
</LinearLayout> </LinearLayout>

View file

@ -7,7 +7,7 @@
<string name="alert_notfound">Sorry. No applications can perform this action.</string> <string name="alert_notfound">Sorry. No applications can perform this action.</string>
<string name="alert_notfound_clip">Sorry. No applications can perform this action. The shortened url has been copied to the clipboard.</string> <string name="alert_notfound_clip">Sorry. No applications can perform this action. The shortened url has been copied to the clipboard.</string>
<string name="app_name">Emaily</string> <string name="app_name">Emaily</string>
<string name="dialog_accounts_title">Select a Google account</string> <string name="dialog_accounts_title">Select a Google account to shorten with</string>
<string name="prefs_about_title">About</string> <string name="prefs_about_title">About</string>
<string name="prefs_bitly_creds_apikey">API Key</string> <string name="prefs_bitly_creds_apikey">API Key</string>
<string name="prefs_bitly_creds_cancel">Cancel</string> <string name="prefs_bitly_creds_cancel">Cancel</string>
@ -19,7 +19,7 @@
<string name="prefs_bitly_creds_url">http://bitly.com/a/your_api_key/</string> <string name="prefs_bitly_creds_url">http://bitly.com/a/your_api_key/</string>
<string name="prefs_bitly_creds_username">Username</string> <string name="prefs_bitly_creds_username">Username</string>
<string name="prefs_bitly_title">bit.ly</string> <string name="prefs_bitly_title">bit.ly</string>
<string name="prefs_copyright">© 201214 Erik C. Thauvin</string> <string name="prefs_copyright">© 201215 Erik C. Thauvin</string>
<string name="prefs_feedback_subject">%1$s %2$s %3$s (%4$s %5$s, %6$s)</string> <string name="prefs_feedback_subject">%1$s %2$s %3$s (%4$s %5$s, %6$s)</string>
<string name="prefs_feedback_summary">Send email, please check Help first…</string> <string name="prefs_feedback_summary">Send email, please check Help first…</string>
<string name="prefs_feedback_title">Feedback</string> <string name="prefs_feedback_title">Feedback</string>

View file

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" > <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:title="@string/prefs_googl_title" > <PreferenceCategory android:title="@string/prefs_googl_title">
<CheckBoxPreference <CheckBoxPreference
android:defaultValue="true" android:defaultValue="true"
android:key="@string/prefs_key_googl_chkbox" android:key="@string/prefs_key_googl_chkbox"
android:title="@string/prefs_googl_chkbox_title" /> android:title="@string/prefs_googl_chkbox_title"/>
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory android:title="@string/prefs_bitly_title" > <PreferenceCategory android:title="@string/prefs_bitly_title">
<net.thauvin.erik.android.emaily.BitlyCredsDialog <net.thauvin.erik.android.emaily.BitlyCredsDialog
android:dialogLayout="@layout/bitlycreds" android:dialogLayout="@layout/bitlycreds"
android:dialogTitle="@string/prefs_bitly_creds_dialog_title" android:dialogTitle="@string/prefs_bitly_creds_dialog_title"
@ -15,37 +15,37 @@
android:negativeButtonText="@string/prefs_bitly_creds_cancel" android:negativeButtonText="@string/prefs_bitly_creds_cancel"
android:positiveButtonText="@string/prefs_bitly_creds_ok" android:positiveButtonText="@string/prefs_bitly_creds_ok"
android:summary="@string/prefs_bitly_creds_summary" android:summary="@string/prefs_bitly_creds_summary"
android:title="@string/prefs_bitly_creds_title" > android:title="@string/prefs_bitly_creds_title">
</net.thauvin.erik.android.emaily.BitlyCredsDialog> </net.thauvin.erik.android.emaily.BitlyCredsDialog>
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory android:title="@string/prefs_html_title" > <PreferenceCategory android:title="@string/prefs_html_title">
<CheckBoxPreference <CheckBoxPreference
android:defaultValue="false" android:defaultValue="false"
android:key="@string/prefs_key_html_chkbox" android:key="@string/prefs_key_html_chkbox"
android:title="@string/prefs_html_chkbox_title" /> android:title="@string/prefs_html_chkbox_title"/>
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory android:title="@string/prefs_about_title" > <PreferenceCategory android:title="@string/prefs_about_title">
<Preference <Preference
android:enabled="false" android:enabled="false"
android:key="@string/prefs_key_version" android:key="@string/prefs_key_version"
android:singleLine="true" android:singleLine="true"
android:summary="@string/prefs_copyright" android:summary="@string/prefs_copyright"
android:title="@string/prefs_version_title" /> android:title="@string/prefs_version_title"/>
<PreferenceScreen <PreferenceScreen
android:summary="@string/prefs_help_summary" android:summary="@string/prefs_help_summary"
android:title="@string/prefs_help_title" > android:title="@string/prefs_help_title">
<intent <intent
android:action="android.intent.action.VIEW" android:action="android.intent.action.VIEW"
android:data="@string/prefs_help_url" /> android:data="@string/prefs_help_url"/>
</PreferenceScreen> </PreferenceScreen>
<PreferenceScreen <PreferenceScreen
android:key="@string/prefs_key_feedback" android:key="@string/prefs_key_feedback"
android:summary="@string/prefs_feedback_summary" android:summary="@string/prefs_feedback_summary"
android:title="@string/prefs_feedback_title" > android:title="@string/prefs_feedback_title">
<intent <intent
android:action="android.intent.action.VIEW" android:action="android.intent.action.VIEW"
android:data="@string/prefs_feedback_url" /> android:data="@string/prefs_feedback_url"/>
</PreferenceScreen> </PreferenceScreen>
</PreferenceCategory> </PreferenceCategory>