This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class YouTubeExampleFragmentActivity extends SherlockFragmentActivity implements YouTubePlayer.OnInitializedListener { | |
private static final String mDeveloperKey = null; //make sure to change this to your project's API key | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.screen_console); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static String getDayOfMonthSuffix(final int n) { | |
if(n < 1 || n > 31) { | |
//invalid day of month | |
return ""; | |
} | |
String language = Locale.getDefault().getLanguage(); | |
if ("en".equals(language)) { | |
if (n >= 11 && n <= 13) { | |
return "th"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface ExtrinsicData { | |
public void onParse(Context context, JSONObject jsonObject, Bundle relatingData); | |
public void onPostPopulated(Context context); | |
public void onPreSaved(Context context); | |
public void onPostSaved(Context context); | |
public void onPreRead(Context context); | |
public void onPostRead(Context context); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Drawable mDefaultActionModeDoneDrawable; //used to cache the original doneButton drawable so it can be reinstated to provide TextSelection as per normal | |
void customiseActionModeDoneButton(boolean showTick) { | |
//updated for AppCompat, based on http://stackoverflow.com/questions/6556116/how-can-i-customize-the-action-modes-color-and-text | |
if(showTick) { | |
mHandler.post(new Runnable() { | |
@Override | |
public void run() { | |
int doneButtonId = R.id.action_mode_close_button; | |
View v = findViewById(doneButtonId); |