Action | Keyboard Shortcut |
---|---|
Create a new file in the current package | Command+N (Mac) / Alt+Insert (Win) |
Organize the import statements | Ctrl+Alt+O |
Navigate to the source definition | Command+Click (Mac) / Windows+Click (Win) |
Rename an object | Shift+F6 |
Search through files | Command+Shift+F (Mac) / Ctrl+Shift+F (Win) |
Jump to a particular type or file | Shift, Shift |
Navigate left | Command+Shift+[ (Mac) / Alt+Left (Win) |
Navigate right | Command+Shift+] (Mac) / Alt+Right (Win) |
Intent | Code |
---|---|
Start an activity | startActivity(new Intent(this, Destination.class)); |
Create a chooser | Intent.createChooser(yourIntent, “Please Select”); |
Open the web browser | Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(“http://example.org”)); startActivity(i); |
Start activity for a result | startActivityForResult(yourIntent, YOUR_REQUEST_CODE); |