I need to create a custom reusable presentation component. I tried looking around to find out how custom views are created in android. But I'm a little confused.
I need an example or explanation of the steps I need to take to make this happen.
In my view, I need the following: two TextView and two Button , which already have programmed functionality. The button should increase or decrease the int that is displayed on the Quantity TextView .
|----------------------------------------------------------------| | | | Name of Item --- Quantity --- (Button Minus) --- (Button Plus) | | | |----------------------------------------------------------------|
So I would get this component by calling something like MyComp mc = new MyComp() and get the values ββas normal ( mc.getName , mc.getQty )
source share