com.todoroo.andlib.service
Class ContextManager

java.lang.Object
  extended by com.todoroo.andlib.service.ContextManager

public final class ContextManager
extends java.lang.Object

Singleton class to manage current application context b

Author:
Tim Su

Constructor Summary
ContextManager()
           
 
Method Summary
static android.content.Context getContext()
          Gets the global context
static android.content.res.Resources getResources()
          Convenience method to read resources
static java.lang.String getString(int resId, java.lang.Object... formatArgs)
          Convenience method to read a string from the resources
static void setContext(android.content.Context context)
          Sets the global context
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextManager

public ContextManager()
Method Detail

setContext

public static void setContext(android.content.Context context)
Sets the global context

Parameters:
context -

getContext

public static android.content.Context getContext()
Gets the global context


getString

public static java.lang.String getString(int resId,
                                         java.lang.Object... formatArgs)
Convenience method to read a string from the resources

Parameters:
resId - resource
parameters - % arguments
Returns:
resource string

getResources

public static android.content.res.Resources getResources()
Convenience method to read resources

Returns:
resources object