This file contains hidden or 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
final Type listType = new TypeToken<ArrayList<T>>() {}.getType(); | |
String json = new Gson().toJson(list, listType); |
This file contains hidden or 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
<RelativeLayout xmlns:myAttrs="http://schemas.android.com/apk/res-auto" ...> | |
... |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.novoda.espresso"> | |
<!-- For espresso testing purposes, this is removed in live builds, but not in dev builds --> | |
<uses-permission android:name="android.permission.SET_ANIMATION_SCALE" /> | |
<!-- ... --> | |
This file contains hidden or 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
interface SortingAlgorithm { | |
int[] sort(int[] values); | |
} | |
class QuickSort implements SortingAlgorithm { | |
@Override | |
int[] sort(int[] values) { | |
return quickSort(values); | |
} | |
// ... |
This file contains hidden or 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 ImageCache implements Map<String, Bitmap> { | |
private final Map<String, Bitmap> cache = new HashMap<String, Bitmap>(); | |
private final Context context; | |
public ImageCache(Context context) { | |
this.context = context; | |
} | |
@Override |
This file contains hidden or 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 WidgetImageLoader newInstance(Resources resources) { | |
BitmapAdjuster adjuster = BitmapAdjuster.newInstance(resources); | |
Retriever defaultRetriever = new MemoryRetriever(); | |
Retriever fileRetriever = FileRetriever.newInstance(resources); | |
return new WidgetImageLoader(defaultRetriever, fileRetriever, adjuster); | |
} | |
WidgetImageLoader(Retriever memoryRetriever, Retriever fileRetriever, BitmapAdjuster adjuster) { | |
this.memoryRetriever = memoryRetriever; | |
this.fileRetriever = fileRetriever; |
This file contains hidden or 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
package com.novoda.espresso; | |
import android.os.SystemClock; | |
import android.test.ActivityInstrumentationTestCase2; | |
import com.mypackage.EntryPointActivity; | |
public class EspressoInstrumentationTestCase extends ActivityInstrumentationTestCase2<EntryPointActivity> { | |
private SystemAnimations systemAnimations; |
This file contains hidden or 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
package com.foo.bar; | |
import java.io.Serializable; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
public class Url implements Serializable { | |
private final URL url; |
This file contains hidden or 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
⋊> /u/local on master brew config 10:25:11 | |
HOMEBREW_VERSION: 0.9.9 | |
ORIGIN: https://github.com/Homebrew/brew.git | |
HEAD: ca005cb8245e7e12ad808d78d49bce3953e1153c | |
Last commit: 65 minutes ago | |
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core | |
Core tap HEAD: 351775d67b2e8145ac665e53ea467cff894473fa | |
Core tap last commit: 5 hours ago | |
HOMEBREW_PREFIX: /usr/local | |
HOMEBREW_REPOSITORY: /usr/local |
This file contains hidden or 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
def versionFile = project.file("version.properties") | |
Version version = Version.read(versionFile) | |
ext { | |
versionizerVersionCode = version.code | |
versionizerVersionName = version.name | |
} | |
task incrementVersionForRelease << { | |
group = 'release' |
OlderNewer