Sunday, November 15, 2015

Two (or more) Java Android controls with the same android:id property can be dangerous

If you doesn't seem to obtain the right control with findViewById() (although your code compiles perfectly), please check this article: https://mttkay.github.io/blog/2013/01/31/use-android-s-id-notation-with-care/ Basically, you should be very careful with doubling android:id values in different layouts! It's probably the best thing to have a unique android:id!

No comments:

Post a Comment

Ubuntu 12.04, 14.04, 16.04 - auto start an app or script before login

To run a command or application at startup, even before the user has logged in, you can use this file: /etc/rc.local The commands entered...