Android Studio changing ID's in one xml file changes the ID's in another file

前端 未结 3 1577
刺人心
刺人心 2021-02-13 03:10

I used to give simple ids to Android Views, but lately, I stopped that altogether because of this issue.

Let\'s say I have 2 layouts, one named first_layout.xml

3条回答
  •  礼貌的吻别
    2021-02-13 04:12

    Moments ago I was facing this same issue and I found it to be the Android Studio's expected behavior, as other elements might be constrained to the element whose ID is getting changed. So you need to update all the IDs particularly in your new layout file through its text editor AND NOT from the Attribute section of its design editor Its working fine for me, and so must work well for you too :)

提交回复
热议问题