custom controls - how to create and implementing numeric key pad in android -


I have created a square, which creates the button runtime and I see that category as the key pad in the specific editing text area I want to apply in. I do this. The code for my class is given below

  see the public square's keyboardvision extension {LinearLayout verticalLinearLayout, horizontal linear layout; Button Button, BTNZero, BTNPoint, BTndon; Public Keyboard View (Reference Reference) {Super (Reference); // To-O Auto-Generated Constructor Stub} Public Keyboard View (context reference, AttributeSet attributeSet) {super (context, featureSat); // Tudo Auto-generated Constructor Stub} Public Keyboard View (context reference, AttributeSet attribute set, int i) {super (context, attribute set, i); // Tudo Auto-Generated Controller Stub} Public Liner Layout Adview () {Vertical linear layout = new linear layout (getContext ()); VerticalLinearLayout.setOrientation (LinearLayout.VERTICAL); Int count = 1; (Int i = 1; i & lt; = 3; i ++) {horizontal laner layout = new linear layout (getContext ()); {Button = new button (getContext ()) for (int j = 1; j & lt; = 3; j ++); Button.setText (String.valueOf (count ++)); Button.setOnClickListener {@Override Click Public Zero (see V) {// TODO Auto generated method stub ((button) v) .getText ();}}); HorizontalLinearLayout.addView (button); } Vertical leaner layout. Edview (horizontal linear layout); } Horizontal liner layout = new linear layout (getContext ()); BtnZero = New button (getContext ()); btnZero.setText ("0"); HorizontalLinearLayout.addView (btnZero); BtnPoint = new button (getContext ()); BtnPoint.setText ("."); HorizontalLinearLayout.addView (btnPoint); Btndon = new button (getContext ()); BtnDone.setText ("full"); HorizontalLinearLayout.addView (btnDone); VerticalLinearLayout.addView (horizontalLinearLayout); Return vertical liner layout; } Public button getButton () {return button; } Public button getBtnZero () {return btnZero; } Public button getBtnPoint () {return btnPoint; } Public button getBtnDone () {return btnDone; }}   

I want to apply this class as the keypad in some specific editing text views, can someone please help me?

You can follow 2 links. Such as

number1 #:

and number 2 #

I hope you get help from those links. Good luck!

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -