i'm making view 12 button 0 9 , ok , ce one
i'm trying make view aske user code pin method have 12 on clik listener... it's annoying code.
have anyway regroupe btn 0 9 in 1 listener , still able code know if user input btn 0 or btn 6?
i not past xml here because damn long... it's linear layout in each ligne linear layout inside every 4 btns , use weigth make them fit every screen... have add view nothing make view more spacing.
i have try id of each view inside on click it's same have switch of 10 case...
option 1: create hashmap assigning button id (as key) value.
option 2 (not recommended): ask button text (the digit string) , process further
Comments
Post a Comment