开发者

How to create and attach softkeyboard in android

I am new in android development. I want to make and attach one soft keyboard for android and want to open it on edittext's click. I have gone through with soft keyboard sample given by android sdk but not really able to a开发者_Go百科ttach it with android. How can I do this ? Please help me...

Thanks in advance


Did you install softkeybaord correctly ? if Yes, just go to setting then language & keybaord.. just Check your keybaord ( it wil be "soft keybaord" by standard ) then at editbox hold and choose Imput method, you will see your sample keybaord,choose it .. now u have this keybaord attached to your editbox input.

if this wont solve you issue, please be more spesific on what you need ..

good luck


You can override draws method in LatinKeyboardView :

  @Override
    public void draw(Canvas canvas) {
        // TODO Auto-generated method stub
        int offsetup=10;//px
        this.setPadding(0, 0, 0,offsetup);
        canvas.clipRect(0, 0, getRight(), getBottom()-offsetup);
        super.draw(canvas);         
    }

actually here I just shifted it up by padding and cut it by clipRect. in canvas there are another interesting methods ( rotate, scale, translate , & ...)

How to create and attach softkeyboard in android


This image was taken from Emulator has keybaord with offsetup ( 20 px )

I hope this helps you.

M.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜