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.your.package; | |
import android.content.Context; | |
import android.preference.ListPreference; | |
import android.util.AttributeSet; | |
/** | |
* Created by Rafa Vázquez on 29/06/13. | |
* | |
* ListPreference item that shows its selected value as summary. |
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
#coding=utf-8 | |
""" | |
Por: Rafa Vázquez | |
http://sloydev.com/ | |
Este script genera una animación gif a partir de un archivo de vídeo, colocando opcionalmente un fondo en cada frame. | |
Está pensado para convertir los vídeos obtenidos en Android mediante 'adb shell screenrecord' o con la herramienta de Android Studio. | |
Un ejemplo del resultado puede verse en http://i.imgur.com/Opu5aG3.gif |
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
buildscript { | |
repositories { | |
jcenter() | |
maven { url 'http://dl.bintray.com/sloy/maven'} //<- only needed while jcenter refresh to the new version | |
} | |
dependencies { | |
classpath 'com.sloydev:dexcountprettify-plugin:0.1.2' | |
} | |
} |
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
import android.os.Parcel; | |
import java.util.ArrayList; | |
import java.util.List; | |
import org.mockito.invocation.InvocationOnMock; | |
import org.mockito.stubbing.Answer; | |
import static org.mockito.Matchers.anyInt; | |
import static org.mockito.Matchers.anyLong; | |
import static org.mockito.Matchers.anyString; | |
import static org.mockito.Mockito.doAnswer; |
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
android { | |
... | |
signingConfigs { | |
release { | |
storeFile file('../certs/release.keystore') | |
def (releaseKeystorePassword, releaseKeyAlias, releaseKeyPassword) = signingConfig() | |
storePassword releaseKeystorePassword | |
keyAlias releaseKeyAlias | |
keyPassword releaseKeyPassword |
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 AutocompleteViewActions { | |
public static ViewAction replaceAutocomplete(@Nonnull String stringToBeSet) { | |
return actionWithAssertions(new ReplaceAutocompleteTextAction(stringToBeSet)); | |
} | |
/** | |
* This is based on {@link ReplaceTextAction} | |
* with modifications thanks to "http://www.grokkingandroid.com/how-androids-autocompletetextview-nearly-drove-me-nuts/". | |
* <p> |
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
$ while sleep 1; do adb shell dumpsys activity service GcmService --endpoints my.package.name | grep "Pending:" -A 20; done |
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 InjectedInstrumentationTestRule implements MethodRule { | |
private final Object testModule; | |
public InjectedInstrumentationTestRule(Object testModule) { | |
this.testModule = testModule; | |
} | |
@Override | |
public Statement apply(final Statement statement, FrameworkMethod frameworkMethod, final Object testClassInstance) { |
OlderNewer