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
# JSR 305 annotations are for embedding nullability information. | |
-dontwarn javax.annotation.** | |
-keepclasseswithmembers class * { | |
@com.squareup.moshi.* <methods>; | |
} | |
-keep @com.squareup.moshi.JsonQualifier interface * | |
# Enum field names are used by the integrated EnumJsonAdapter. |
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 String getTypeOfDayWithSwitchStatement(String dayOfWeekArg) { | |
String typeOfDay; | |
switch (dayOfWeekArg) { | |
case "Monday": | |
typeOfDay = "Start of work week"; | |
break; | |
case "Tuesday": | |
case "Wednesday": | |
case "Thursday": | |
typeOfDay = "Midweek"; |
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 CalendarActivity extends Activity { | |
... | |
protected void onCreate(Bundle savedInstanceState) { | |
try { | |
URL url = new URL("http://www.google.com"); | |
HttpURLConnection con = (HttpURLConnection) url.openConnection(); | |
readStream(con.getInputStream()); |
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
HashMap<char, int> myMap = new HashMap<char, int>(); |
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
// Assuming textView is a properly initialized instance of android.widget.TextView | |
// and that R.color.mycolor is correctly defined in a resource file. | |
textView.setTextColor(R.color.mycolor); |