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
class Versions{ | |
public final String projectName | |
public final String nameVersion | |
public final int codeVersion | |
Versions(String projectName, String nameVersion, int codeVersion) { | |
this.codeVersion = codeVersion | |
this.nameVersion = nameVersion | |
this.projectName = projectName |
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
##tc-property name='teamcity.buildType.id' value='SampleProject_Build' | |
##tc-property name='teamcity.version' value='8.1.1 (build 29939)' | |
##tc-property name='teamcity.buildConfName' value='Build' | |
##tc-property name='teamcity.agent.dotnet.agent_url' value='http://localhost:9090/RPC2' | |
##tc-property name='teamcity.build.id' value='22' | |
##tc-property name='agent.ownPort' value='9090' | |
##tc-property name='agent.name' value='Default Agent' | |
##tc-property name='build.number' value='22' | |
##tc-property name='teamcity.runner.properties.file' value='/home/ci/Dev Tools/TeamCity/buildAgent/temp/buildTmp/teamcity.runner8436789339269480560.properties' | |
##tc-property name='teamcity.build.changedFiles.file' value='/home/ci/Dev Tools/TeamCity/buildAgent/temp/buildTmp/changedFiles3824722181500470933.txt' |
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
//src: http://kurrytran.blogspot.ru/2014/05/android-studio-list-of-suppress-warning.html | |
//https://android.googlesource.com/platform/tools/adt/idea/+/jb-mr2-dev/adt-branding/src/META-INF/AndroidIdePlugin.xml | |
//https://android.googlesource.com/platform/tools/adt/idea/+/jb-mr2-dev/android/src/META-INF/plugin.xml | |
//Most Common Annotations | |
@SuppressWarnings("all") | |
@SuppressWarnings("unchecked") | |
@SuppressWarnings({"JavaDoc"}) | |
@SuppressWarnings({"UnusedDeclaration"}) |
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
private static class Brush implements ValueAnimator.AnimatorUpdateListener { | |
private Bitmap brush; | |
private Bitmap buffer; | |
private int duration; | |
private TextSurface textSurface; | |
private Bitmap brushSample; | |
private Canvas canvasBuffer; | |
private Text text; | |
private final float x; |
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
//<string name="can_try_again">Press [img src=ok16/] to accept or [img src=retry16/] to retry</string> | |
//http://stackoverflow.com/questions/15352496/how-to-add-image-in-a-textview-text | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
import android.content.Context; | |
import android.text.Spannable; | |
import android.text.style.ImageSpan; | |
import android.util.AttributeSet; | |
import android.util.Log; |
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
private void compress(byte[] input) { | |
ByteArrayOutputStream bos = new ByteArrayOutputStream(input.length); | |
Deflater compressor = new Deflater(); | |
compressor.setLevel(Deflater.BEST_COMPRESSION); | |
compressor.setInput(input); | |
compressor.finish(); | |
byte[] buf = new byte[1024]; | |
while (!compressor.finished()) { |
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
//http://qathread.blogspot.de/2014/09/discovering-espresso-for-android-how-to.html | |
//http://stackoverflow.com/questions/25998659/espresso-how-can-i-check-if-an-activity-is-launched-after-performing-a-certain | |
public Activity getActivityInstance(){ | |
getInstrumentation().runOnMainSync(new Runnable() { | |
public void run() { | |
Collection resumedActivities = ActivityLifecycleMonitorRegistry.getInstance().getActivitiesInStage(RESUMED); | |
if (resumedActivities.iterator().hasNext()){ | |
currentActivity = resumedActivities.iterator().next(); | |
} | |
} |
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
//https://mcochin.wordpress.com/2015/05/13/android-customizing-smoothscroller-for-the-recyclerview/ | |
//smoothScrollToPosition(0); | |
private class SmoothScroller extends LinearSmoothScroller { | |
private static final float MILLISECONDS_PER_INCH = 400f; | |
public SmoothScroller(Context context) { | |
super(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
import rx.Observable; | |
import rx.Subscription; | |
import rx.android.schedulers.AndroidSchedulers; | |
import rx.functions.Action1; | |
import rx.schedulers.Schedulers; | |
/** | |
* Created by levenetc on 23/06/15. | |
*/ | |
public class RXUtils { |
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 ExtraAssertions { | |
public static ViewAssertion isVisible() { | |
return (view, noView) -> assertThat(view, new VisibilityMatcher(View.VISIBLE)); | |
} | |
public static ViewAssertion isGone() { | |
return (view, noView) -> assertThat(view, new VisibilityMatcher(View.GONE)); | |
} | |
public static ViewAssertion isInvisible() { |
OlderNewer