Issue
I have got lots of XML files in which margin and padding dimensions are hardcode I have to replace all of them in format @denem/margin_20 ....etc

I have made dimens and saved all the values I need. But I have lots of XML files it will take a lot of time for me to go and change one by one file manually
SO I want to ask is there any trick to change all the values at once in Android Studio.
Thanks a lot for Helping.
Solution
Press Ctrl + Shift + R to replace and write "50dp" with inverted commas in find field . Then in replace field write @dimen/_50dp. Replace one occurrence and if it worked as expected and replace all other occurrences.
NOTE: if you want to change this in just res folder then you can select this folder only in find and replace dialog.
Answered By - Naveen Rao
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.