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
adb shell setprop gsm.sim.operator.iso-country gb |
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 PhoneNumberFormatter { | |
private final String simCountryIso; | |
private final Map<String, String> countryCodeMap = Collections.unmodifiableMap( | |
new HashMap<String, String>() {{ | |
put("GB", "44"); | |
put("US", "1"); | |
}}); |
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 PhoneNumberFormatter { | |
private final String simCountryIso; | |
private final Map<String, String> countryCodeMap = Collections.unmodifiableMap( | |
new HashMap<String, String>() {{ | |
put("GB", "44"); | |
put("US", "1"); | |
}}); |
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 TextInputOnKeyChangedListener implements EditText.OnKeyListener { | |
private EditText editText; | |
private OnKeyChangedListener onKeyChangedListener; | |
public interface OnKeyChangedListener { | |
void onKeyUp(String text); | |
void onBackPressed(); |
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
Dependencies: | |
============================================= | |
compile "com.google.guava:guava:19.0" | |
compile 'com.fasterxml.jackson.datatype:jackson-datatype-guava:2.7.3' | |
Deserializer: | |
============================================= |
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 abstract class CompatGlobalLayoutListener implements ViewTreeObserver.OnGlobalLayoutListener { | |
private final View view; | |
public CompatGlobalLayoutListener(@NonNull final View view) { | |
this.view = view; | |
} | |
protected abstract void onGlobalLayoutReady(); |
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
#/bin/bash | |
cd $1 | |
if [ -d $1 ]; then | |
echo "Changing Directory too: " $1 | |
else | |
echo "Directory does not exist" | |
exit 1 | |
fi |
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
cmd.add("movie=" + imagePath + " [overlay]; " + | |
"[in] transpose=1 [a]; " + | |
"[a] scale=360:-1 [b]; " + | |
"[b] crop=360:360:" + String.valueOf(cropX) + ":" + String.valueOf(cropY) + " [c]; " + | |
"[c] [overlay] overlay=" + overlayX + ":" + overlayY + " [out]"); |
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
try { | |
final Movie intro = MovieCreator.build(new FileDataSourceImpl(file1)); | |
final Movie main = MovieCreator.build(new FileDataSourceImpl(file2)); | |
final Movie resultClip = MovieCreator.build(new FileDataSourceImpl(file3)); | |
final Movie end = MovieCreator.build(new FileDataSourceImpl(file4)); | |
final Movie[] movies = new Movie[]{intro, main, resultClip, end}; | |
final List<Track> videoTracks = new LinkedList<>(); |
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 java.util.HashMap; | |
import android.content.Context; | |
import android.media.AudioManager; | |
import android.media.SoundPool; | |
import android.util.Log; | |
public class SoundManager implements SoundPool.OnLoadCompleteListener { | |
/** SoundPool left volume */ |