[Android] Update usage in focused layout XML only on component id change

已回答

Hi, is it possible to update usage only in layout XML, instead of  whole app?
Here's an example:

I have details_layout.xml containing ImageView with id 'iv_details_image', details.java with findViewById(R.id.iv_details_image);
Now I need to create a layout very similiar do 'details'. I copy 'details_layout.xml' and rename it to 'admin_details_layout,xml'.
After that, I want to change 'iv_details_image' to 'iv_admin_details_image' - IntelliJ asks if I want to update usage:
A) I agree - id is changed in admin_details, details.xml, and java code - basically everywhere (and I don't want to change it in original layout or code). 
B) I don't agree - I have to manually change every occurence in admin_details - annoying for constraint layouts.

0

Hello, for the current moment if you perform refactoring, IDEA will be trying find the usages in dependent files. In your case it's easier to perform rename externally i.e in terminal. Please feel free to create the feature request at YouTrack: https://youtrack.jetbrains.com/issues. Thanks

0

请先登录再写评论。