Add play in earth with photo overlays

This commit is contained in:
Jimmy Shih
2013-08-19 15:54:32 -07:00
parent 24a343661d
commit ec3f0ddab3
5 changed files with 141 additions and 28 deletions
@@ -109,7 +109,8 @@ public class ListItemUtils {
// Set category/description
TextView descriptionTextView = (TextView) view.findViewById(R.id.list_item_description);
setTextView(descriptionTextView, getDescription(isRecording, category, description));
setTextView(descriptionTextView,
isRecording ? null : StringUtils.getCategoryDescription(category, description));
}
/**
@@ -146,30 +147,6 @@ public class ListItemUtils {
return buffer.toString();
}
/**
* Gets the description text.
*
* @param isRecording true if recording
* @param category the category
* @param description the description
*/
private static String getDescription(boolean isRecording, String category, String description) {
if (isRecording) {
return null;
}
if (category == null || category.length() == 0) {
return description;
}
StringBuffer buffer = new StringBuffer();
buffer.append("[" + category + "]");
if (description != null && description.length() != 0) {
buffer.append(" " + description);
}
return buffer.toString();
}
/**
* Gets the start time text.
*
@@ -228,6 +228,26 @@ public class StringUtils {
return result;
}
/**
* Gets a string for category and description.
*
* @param category the category
* @param description the description
*/
public static String getCategoryDescription(String category, String description) {
if (category == null || category.length() == 0) {
return description;
}
StringBuffer buffer = new StringBuffer();
buffer.append("[" + category + "]");
if (description != null && description.length() != 0) {
buffer.append(" " + description);
}
return buffer.toString();
}
/**
* Formats the given text as a XML CDATA element. This includes adding the
* starting and ending CDATA tags. Please notice that this may result in