Fenix: FNX2-15453 ⁃ Clean up incorrect XML uses of `@+id`

Created on 21 Jul 2020  ·  3Comments  ·  Source: mozilla-mobile/fenix

In our XML files there are two similar ways to refer to IDs: @+id/example_id and @id/example_id. The "plus" variant should only be used to create a new ID, and should only be used inside android:id.

In other attributes, the ID is used to reference another value (such as app:destination, app:layout_constraintStart_toStartOf). In these locations, the @id variant with no plus should be used. Incorrect usage doesn't have runtime issues, but makes the IDE confused sometimes.

We may want to create a lint rule for this later on.

health good first issue help wanted

All 3 comments

Hi @NotWoods! Can I help you with these changings as my good first issue ?

Sure @leonardoamurca! Please look through our docs so you can check out a copy of the codebase locally and edit it with Android Studio. Let me know if you need tips for how to proceed with the changes.

Closing since this has been fixed by @leonardoamurca 😄

Was this page helpful?
0 / 5 - 0 ratings