android-resources
How to return to default style on EditText if I apply a background?
First, before you call setBackgroundResource with your own ninepatch, store the original background of the EditText, like this: Drawable originalDrawable = myEditText.getBackground(); Then, if the user entered the wrong data, you can set your red border ninepatch: myEditText.setBackgroundResource(R.drawable.edittext_red); And later, when you want to restore the look of the EditText, use the stored drawable: myEditText.setBackgroundDrawable(originalDrawable); … Read more
How to delete an unused string resource for all configurations in Android Studio?
To identify all unused resources: Open Menu > Analyze > Run Inspection by Name… Select “Unused Resources” Make sure Whole project is checked, then press OK. Look through the list. You can always rerun the Inspection with the Rerun button. There is no really easy way in Android Studio (v 1.0) to remove a resource … Read more