net.hockeyapp.android
Class Strings

java.lang.Object
  extended by net.hockeyapp.android.Strings

public class Strings
extends java.lang.Object

Description

Helper class to hold strings constants and defaults values.

License

 Copyright (c) 2012 Codenauts UG
 
 Permission is hereby granted, free of charge, to any person
 obtaining a copy of this software and associated documentation
 files (the "Software"), to deal in the Software without
 restriction, including without limitation the rights to use,
 copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the
 Software is furnished to do so, subject to the following
 conditions:
 
 The above copyright notice and this permission notice shall be
 included in all copies or substantial portions of the Software.
 
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 

Author:
Thomas Dohmke

Field Summary
static int CRASH_DIALOG_MESSAGE_ID
          Resource ID for the message of the dialog when a new crash was found.
static int CRASH_DIALOG_NEGATIVE_BUTTON_ID
          Resource ID for the label on the negative button of the dialog when a new crash was found.
static int CRASH_DIALOG_POSITIVE_BUTTON_ID
          Resource ID for the label on the positive button of the dialog when a new crash was found.
static int CRASH_DIALOG_TITLE_ID
          Resource ID for the title of the dialog when a new crash was found.
static int DOWNLOAD_FAILED_DIALOG_MESSAGE_ID
          Resource ID for the message of the dialog when the apk download failed.
static int DOWNLOAD_FAILED_DIALOG_NEGATIVE_BUTTON_ID
          Resource ID for the label on the negative button of the dialog when the apk download failed.
static int DOWNLOAD_FAILED_DIALOG_POSITIVE_BUTTON_ID
          Resource ID for the label on the positive button of the dialog when the apk download failed.
static int DOWNLOAD_FAILED_DIALOG_TITLE_ID
          Resource ID for the title of the dialog when the apk download failed.
static java.lang.String[] ENGLISH
          Default strings.
static int EXPIRY_INFO_TEXT_ID
          Resource ID for the text of the expiry info view.
static int EXPIRY_INFO_TITLE_ID
          Resource ID for the title of the expiry info view.
static int UPDATE_DIALOG_MESSAGE_ID
          Resource ID for the message of the dialog when a new update was found.
static int UPDATE_DIALOG_NEGATIVE_BUTTON_ID
          Resource ID for the label on the negative button of the dialog when a new update was found.
static int UPDATE_DIALOG_POSITIVE_BUTTON_ID
          Resource ID for the label on the positive button of the dialog when a new update was found.
static int UPDATE_DIALOG_TITLE_ID
          Resource ID for the title of the dialog when a new update was found.
static int UPDATE_MANDATORY_TOAST_ID
          Resource ID for the text of the toast when an update is mandatory.
 
Constructor Summary
Strings()
           
 
Method Summary
static java.lang.String get(int resourceID)
          Returns the default string for the given resource ID.
static java.lang.String get(StringListener listener, int resourceID)
          Returns a string for the given resource ID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CRASH_DIALOG_TITLE_ID

public static final int CRASH_DIALOG_TITLE_ID
Resource ID for the title of the dialog when a new crash was found.

See Also:
Constant Field Values

CRASH_DIALOG_MESSAGE_ID

public static final int CRASH_DIALOG_MESSAGE_ID
Resource ID for the message of the dialog when a new crash was found.

See Also:
Constant Field Values

CRASH_DIALOG_NEGATIVE_BUTTON_ID

public static final int CRASH_DIALOG_NEGATIVE_BUTTON_ID
Resource ID for the label on the negative button of the dialog when a new crash was found.

See Also:
Constant Field Values

CRASH_DIALOG_POSITIVE_BUTTON_ID

public static final int CRASH_DIALOG_POSITIVE_BUTTON_ID
Resource ID for the label on the positive button of the dialog when a new crash was found.

See Also:
Constant Field Values

DOWNLOAD_FAILED_DIALOG_TITLE_ID

public static final int DOWNLOAD_FAILED_DIALOG_TITLE_ID
Resource ID for the title of the dialog when the apk download failed.

See Also:
Constant Field Values

DOWNLOAD_FAILED_DIALOG_MESSAGE_ID

public static final int DOWNLOAD_FAILED_DIALOG_MESSAGE_ID
Resource ID for the message of the dialog when the apk download failed.

See Also:
Constant Field Values

DOWNLOAD_FAILED_DIALOG_NEGATIVE_BUTTON_ID

public static final int DOWNLOAD_FAILED_DIALOG_NEGATIVE_BUTTON_ID
Resource ID for the label on the negative button of the dialog when the apk download failed.

See Also:
Constant Field Values

DOWNLOAD_FAILED_DIALOG_POSITIVE_BUTTON_ID

public static final int DOWNLOAD_FAILED_DIALOG_POSITIVE_BUTTON_ID
Resource ID for the label on the positive button of the dialog when the apk download failed.

See Also:
Constant Field Values

UPDATE_MANDATORY_TOAST_ID

public static final int UPDATE_MANDATORY_TOAST_ID
Resource ID for the text of the toast when an update is mandatory.

See Also:
Constant Field Values

UPDATE_DIALOG_TITLE_ID

public static final int UPDATE_DIALOG_TITLE_ID
Resource ID for the title of the dialog when a new update was found.

See Also:
Constant Field Values

UPDATE_DIALOG_MESSAGE_ID

public static final int UPDATE_DIALOG_MESSAGE_ID
Resource ID for the message of the dialog when a new update was found.

See Also:
Constant Field Values

UPDATE_DIALOG_NEGATIVE_BUTTON_ID

public static final int UPDATE_DIALOG_NEGATIVE_BUTTON_ID
Resource ID for the label on the negative button of the dialog when a new update was found.

See Also:
Constant Field Values

UPDATE_DIALOG_POSITIVE_BUTTON_ID

public static final int UPDATE_DIALOG_POSITIVE_BUTTON_ID
Resource ID for the label on the positive button of the dialog when a new update was found.

See Also:
Constant Field Values

EXPIRY_INFO_TITLE_ID

public static final int EXPIRY_INFO_TITLE_ID
Resource ID for the title of the expiry info view.

See Also:
Constant Field Values

EXPIRY_INFO_TEXT_ID

public static final int EXPIRY_INFO_TEXT_ID
Resource ID for the text of the expiry info view.

See Also:
Constant Field Values

ENGLISH

public static final java.lang.String[] ENGLISH
Default strings.

Constructor Detail

Strings

public Strings()
Method Detail

get

public static java.lang.String get(int resourceID)
Returns the default string for the given resource ID.

Parameters:
resourceID - The ID of the string resource.
Returns:
The default string.

get

public static java.lang.String get(StringListener listener,
                                   int resourceID)
Returns a string for the given resource ID. The method first runs the callback method from the listener (if specified). If this returns null, it then uses the default string.

Parameters:
listener - An instance of StringListener.
resourceID - The ID of the string resource.
Returns:
The string.