Im searching this since yesterday. I’ve got on many Activities some piece of code which displays user name and login. I dont want to copy and paste code in layout into every Activity, but I want something just like user controls in .NET. I’ve read a lot of topic about custom controls but or I don’t understand it or its not possible do to this (I dont belive in that option)
Im searching this since yesterday. I’ve got on many Activities some piece of code
Share
Yes it is possible. Look at this sample. It is a custom Numeric Keyboard or a custom View or a custom user control. Customize it and create your own user control:
its layout as view_numeric_keyboard.xml:
using it in your Activity layout: