Skip to content

Instantly share code, notes, and snippets.

@kkuan2011
kkuan2011 / output
Last active October 2, 2020 17:27
Birthday cake from Kotlin codelab
,,,,,,,,,,,,,,,,,,,,,,,,
||||||||||||||||||||||||
==========================
@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@
private String createCalendarEventReminder(String eventName, String location, int minutesAway) {
String reminder = "You have an upcoming event in " + minutesAway + " minutes.";
reminder = reminder + " It is " + event + " held at " + location + ".";
return reminder;
}
@kkuan2011
kkuan2011 / Helper method for Utility.java
Created August 5, 2014 18:21
Coding the Details Screen
public static String getFormattedWind(Context context, float windSpeed, float degrees) {
int windFormat;
if (Utility.isMetric(context)) {
windFormat = R.string.format_wind_kmh;
} else {
windFormat = R.string.format_wind_mph;
windSpeed = .621371192237334f * windSpeed;
}
// From wind direction in degrees, determine compass direction as a string (e.g NW)
@kkuan2011
kkuan2011 / Add to values, colors.xml
Created August 5, 2014 17:57
Action bar styling
<color name="sunshine_blue">#ff1ca8f4</color>