- Two of the most useful shortcuts utilize the Fn (function) keys. It is therefore recommended that you enable the "Use all F1, F2, etc. keys as standard function keys" option [System Preferences > Keyboard].
- Be sure to enable the Mac OS X 10.5+ keymap in Android Studio [Preferences > Keymap].
- A fairly complete shortcut list can be found here.
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
package aa.rx; | |
import io.reactivex.Observable; | |
import io.reactivex.ObservableTransformer; | |
import io.reactivex.Scheduler; | |
import java.util.List; | |
import java.util.concurrent.TimeUnit; | |
/** | |
* <a href="https://stackoverflow.com/a/49866518/4068957">Inspired</a> |
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
/* basic usage */ | |
ViewGroup root = (ViewGroup) findViewById(android.R.id.content); | |
LayoutTraverser.build(new LayoutTraverser.Processor() { | |
@Override | |
public void process(View view) { | |
// do stuff with the view | |
} | |
}).traverse(root); |
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
emailChangeObservable = RxTextView.textChangeEvents(email); | |
passwordChangeObservable = RxTextView.textChangeEvents(password); | |
// force-disable the button | |
submitButton.setEnabled(false); | |
Observable.combineLatest(emailChangeObservable, passwordChangeObservable, | |
(emailObservable, passwordObservable) -> { | |
boolean emailCheck = emailObservable.text().length() >= 3; | |
boolean passwordCheck = passwordObservable.text().length() >= 3; |
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 class HttpInterceptor implements Interceptor { | |
@Override | |
public Response intercept(Chain chain) throws IOException { | |
Request request = chain.request(); | |
//Build new request | |
Request.Builder builder = request.newBuilder(); | |
builder.header("Accept", "application/json"); //if necessary, say to consume JSON | |
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
# (42f63b0de7318fe1 is a device id) | |
adb -s 075d0cdb0ae533b1 shell setprop log.tag.Volley VERBOSE |