|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectoak.util.OakUtils
public class OakUtils
Utility Class full of commonly used methods User: derek Date: 8/7/12 Time: 10:06 AM
| Method Summary | |
|---|---|
static void |
changeFonts(android.view.View root,
android.content.Context ctx,
String typeface)
Given a View, this method sets the Typeface on every TextView contained within that View |
android.text.SpannableString |
getFormattedText(android.content.Context context,
String text,
String typeface)
Returns a formatted String to be used in places like an ActionBar |
static android.graphics.Typeface |
getStaticTypeFace(android.content.Context context,
String fontFileName)
|
static boolean |
isPackageInstalled(android.content.Context ctx,
String packageName)
Method that determines whether a specified package is installed on the device |
static boolean |
isValidEmail(String email)
Method to determine whether string is a valid email address |
static boolean |
isValidPhone(String phone)
Method to determine whether string is a valid phone number |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static android.graphics.Typeface getStaticTypeFace(android.content.Context context,
String fontFileName)
context - Context for fetching TypefacefontFileName - Typeface to fetch. Must match a typeface name in /assets/fonts
public android.text.SpannableString getFormattedText(android.content.Context context,
String text,
String typeface)
context - Context for fetching Typefacetext - text to be formattedtypeface - typeface to convert the text into.
public static void changeFonts(android.view.View root,
android.content.Context ctx,
String typeface)
root - View to checkctx - Context for fetching Typefacetypeface - Typeface to set. Must match a typeface name in /assets/fonts
public static boolean isPackageInstalled(android.content.Context ctx,
String packageName)
ctx - Context for package managerpackageName - Target package name
public static boolean isValidEmail(String email)
public static boolean isValidPhone(String phone)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||