Android Studio keyboard shortcuts I use often.
SHIFT + F6to refactor methods, classes, and variable namesCTRL + Oto override methodsCOMMAND + N- Generate getter, setter, and constructor method for a class (when in editor pane)
| import android.annotation.TargetApi; | |
| import android.content.Context; | |
| import android.graphics.Matrix; | |
| import android.graphics.drawable.Drawable; | |
| import android.os.Build; | |
| import android.util.AttributeSet; | |
| import android.widget.ImageView; | |
| /** | |
| * Created by chris on 7/27/16. |
| ### aliases for vim ### | |
| # Given two files, performs a diff | |
| alias mvimdiff='mvim -d' | |
| # Given two files, does a vertical split | |
| alias mvimvsplit='mvim -O' | |
| ### git ### |
| import android.text.Editable; | |
| import android.text.TextWatcher; | |
| import android.view.View; | |
| import android.widget.EditText; | |
| /** | |
| * Created by chris on 3/13/14. | |
| */ | |
| public class AutoNextTextWatcher implements TextWatcher { |
| import android.os.Bundle; | |
| import android.os.Parcelable; | |
| /** | |
| * Utility class for {@link android.os.Bundle}. | |
| * Created by chris on 8/6/14. | |
| */ | |
| public class BundleUtil { | |
| private static final String EXTRA_PARCELABLE_COUNT = "parcelable_count"; |
| package chrisarriola.me.remind; | |
| import android.app.IntentService; | |
| import android.content.Context; | |
| import android.content.Intent; | |
| import android.os.Bundle; | |
| import chrisarriola.me.DataPath; | |
| import chrisarriola.me.remind.util.LogUtil; | |
| import com.google.android.gms.common.ConnectionResult; | |
| import com.google.android.gms.common.api.GoogleApiClient; |
| public class AutomaticDripCoffeeMaker extends BaseCoffeeMaker { | |
| public AutomaticDropCoffeeMaker() { | |
| super(); | |
| } | |
| public void scheduleBrew() { | |
| // schedules a call to #brew() | |
| } | |
This is the proposed architecture for implementing drawing on text, photos and videos on Leo.
AddTextActivity except the top bar Views.onTouchEvent(...)setEnabled(boolean enabled)
onTouchEvent(...). this means that it will intercept all touch events when enabled.| package com.operator.android; | |
| import android.content.Context; | |
| import android.os.Parcel; | |
| import android.os.Parcelable; | |
| import android.view.View; | |
| /** | |
| * A custom {@link View} that demonstrates how to save/restore instance state. | |
| */ |