Skip to content

Instantly share code, notes, and snippets.

André Diermann a11n

Block or report user

Report or block a11n

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@a11n
a11n / Summary.md
Last active Nov 30, 2015
Android Studio for Experts
View Summary.md

#Android Studio for Experts (Android Dev Summit 2015) https://www.youtube.com/watch?v=Y2GC6P5hPeA

##Completion

  • Use TAB instead of ENTER for replacement
  • CTRL+SHIFT+SPACE for smarter completion (chain calls); pressing twice for even smarter completion

##General Stuff

###Selection

@a11n
a11n / gist:a1fa911a2e0a402044ab
Created Oct 13, 2015
Docker shell of running container
View gist:a1fa911a2e0a402044ab
#Get container ID
docker ps
#Start shell
docker exec -i -t <ID> bash
@a11n
a11n / gist:45975716f878f1e81804
Created Oct 8, 2015
Limiting the range of numbers in EditTexts
View gist:45975716f878f1e81804
public class NumberRangeInputFilter implements InputFilter {
private final int min;
private final int max;
public NumberRangeInputFilter(int min, int max) {
this.min = min;
this.max = max;
}
@Override
@a11n
a11n / DataBinding.java
Last active Apr 26, 2019
Android bidirectional data-binding
View DataBinding.java
public class DataBinding {
@android.databinding.BindingAdapter("bind")
public static void addTextChangedListener(EditText view, final int variable) {
final ViewDataBinding binding = DataBindingUtil.findBinding(view);
view.addTextChangedListener(new TextWatcher() {
@Override public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@a11n
a11n / build.gradle
Created Jun 8, 2015
Checkstyle Gradle task for Android applications
View build.gradle
...
apply plugin: 'checkstyle'
checkstyle {
configFile rootProject.file('checkstyle.xml')
showViolations true
}
android.applicationVariants.all { variant ->
def name = variant.buildType.name
@a11n
a11n / gist:37da89e69696c72607af
Created May 7, 2015
Testing key events in Android
View gist:37da89e69696c72607af
adb shell input text HelloWorld
adb shell input keyevent 4 //KEYCODE_BACK
You can’t perform that action at this time.