|
Android Mobile Physical Therapy Exercise Documenter | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.communipatient.amptedapp.util.UIUtils
public class UIUtils
An assortment of UI helpers.
| Field Summary | |
|---|---|
private static int |
BRIGHTNESS_THRESHOLD
|
private static android.text.style.StyleSpan |
sBoldSpan
|
private static java.lang.StringBuilder |
sBuilder
StringBuilder used for formatting time block. |
private static java.util.Formatter |
sFormatter
Formatter used for formatting time block. |
private static int |
TIME_FLAGS
Flags used with DateUtils.formatDateRange(android.content.Context, long, long, int). |
| Constructor Summary | |
|---|---|
UIUtils()
|
|
| Method Summary | |
|---|---|
static android.text.Spannable |
buildStyledSnippet(java.lang.String snippet)
Given a snippet string with matching segments surrounded by curly braces, turn those areas into bold spans, removing the curly braces. |
static long |
getCurrentTime(android.content.Context context)
|
static android.graphics.drawable.Drawable |
getIconForIntent(android.content.Context context,
android.content.Intent i)
|
static java.lang.String |
getLastUsedTrackID(android.content.Context context)
|
static boolean |
isColorDark(int color)
Calculate whether a color is light or dark, based on a commonly known brightness formula. |
static boolean |
isHoneycomb()
|
static boolean |
isHoneycombTablet(android.content.Context context)
|
static void |
setLastUsedTrackID(android.content.Context context,
java.lang.String trackID)
|
static void |
setTextMaybeHtml(android.widget.TextView view,
java.lang.String text)
Populate the given TextView with the requested text, formatting
through Html.fromHtml(String) when applicable. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final int TIME_FLAGS
DateUtils.formatDateRange(android.content.Context, long, long, int).
private static java.lang.StringBuilder sBuilder
StringBuilder used for formatting time block.
private static java.util.Formatter sFormatter
Formatter used for formatting time block.
private static android.text.style.StyleSpan sBoldSpan
private static final int BRIGHTNESS_THRESHOLD
| Constructor Detail |
|---|
public UIUtils()
| Method Detail |
|---|
public static void setTextMaybeHtml(android.widget.TextView view,
java.lang.String text)
TextView with the requested text, formatting
through Html.fromHtml(String) when applicable. Also sets
TextView.setMovementMethod(android.text.method.MovementMethod) so inline links are handled.
public static android.text.Spannable buildStyledSnippet(java.lang.String snippet)
public static java.lang.String getLastUsedTrackID(android.content.Context context)
public static void setLastUsedTrackID(android.content.Context context,
java.lang.String trackID)
public static boolean isColorDark(int color)
http://en.wikipedia.org/wiki/HSV_color_space%23Lightness}public static boolean isHoneycomb()
public static boolean isHoneycombTablet(android.content.Context context)
public static long getCurrentTime(android.content.Context context)
public static android.graphics.drawable.Drawable getIconForIntent(android.content.Context context,
android.content.Intent i)
|
Revision: 109 Generated on Sat Dec 10 07:00:03 UTC 2011 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||