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
println "test" |
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 ParseNotificationWatcher { | |
private final ParseNotificationManager notificationManager; | |
private final NotificationBuilder notificationBuilder; | |
public ParseNotificationWatcher(ParseNotificationManager notificationManager, NotificationBuilder notificationBuilder) { | |
this.notificationManager = notificationManager; | |
this.notificationBuilder = notificationBuilder; | |
} |
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 NavDrawerArrayAdapter extends ArrayAdapter<String> { | |
public NavDrawerArrayAdapter(final Context context) { | |
super(context, android.R.layout.simple_list_item_activated_1, android.R.id.text1, | |
new ArrayList<String>() {{ | |
add(context.getString(R.string.nav_drawer_section_explore)); | |
add(context.getString(R.string.nav_drawer_section_rewards)); | |
add(context.getString(R.string.nav_drawer_section_offers)); | |
add(context.getString(R.string.nav_drawer_section_events)); | |
}}); | |
refresh(); |
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
subprojects { | |
buildscript { | |
repositories { | |
mavenCentral() | |
maven { | |
url "https://oss.sonatype.org/content/repositories/snapshots" | |
} | |
maven { | |
url "https://github.com/novoda/public-mvn-repo/raw/master/releases" | |
} |
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
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<VideoView | |
android:id="@+id/my_video_view" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:layout_gravity="center" /> |
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
import com.puppycrawl.tools.checkstyle.api.*; | |
public class AntiHungarianCheck extends Check { | |
private static final String CATCH_MSG = "Hungarian notation belongs in the 90's. " + | |
"Don't prefix member variables with 'm'. " + | |
"Use your IDE's shiny colors. Culprit was: "; | |
private final HungarianNotationMemberDetector detector = new HungarianNotationMemberDetector(); |
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
// Code readability - 4 possibilities | |
// A | |
context.getContentResolver().update(getDownloadUri(context, intent), values, null, null); | |
// vs | |
// B | |
context.getContentResolver().update( | |
getDownloadUri(context, intent), values, null, null); | |
// vs |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the 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 class ExampleActivity extends Activity implements WatchFaceLifecycle.Listener { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_my_layout); | |
WatchFaceLifecycle.attach(this, savedInstanceState, this); | |
} | |
@Override |
OlderNewer