Meena,
I haven't tried it. But a view seem to have a public method called
"showConextMenu()". So you will set up a context menu for your control
and call showContextMenu() on focus grab. (My theory but try it out)

But more importantly, you may need to go in the direction of writing
your own input method for simulating keyboard input. Like the voice
does. So painting can be treated as another input method and register
method and see how that input method is enabled.

You may have to check literature on how to write your input methods.

http://twitter.com/SatyaKomatineni
http://satyakomatineni.com/android/training
http://satyakomatineni.com
http://androidbook.com

On Sat, Oct 27, 2012 at 5:34 AM, Meena Rengarajan
<meenasoft...@gmail.com> wrote:
> My needs : If i click or focussed on EditText, it should call Menus . In
> Menus, i wanna create two options. That is, normal writing and keyboard
> writing.
>
> If user selects keyboard writing, it looks like Android Keyboard. Should be
> able to type it from keyboard. And next one, normal writing. This is like
> normal.
>
> In Menus, if user selects normal writing then one screen should appear when
> it is clicked like MS-Paint application . With pencil , user should be able
> to write like we'll almost write in a paint application.
>
> I am new to Android and learning though !
>
> In my code, where should i do all the Functionalities of Menus ?
>
> How could i do this ? Any helps or suggestion greatly appreciated !
>
> And this is my Code :
>
> else if(q.trim().equals("A"))
>
>     {
> fillUp=new EditText(context);
> fillUp.setOnClickListener(new View.OnClickListener() {
> public void onClick(View arg0) {
>      }
> });
> fillUp.setBackgroundResource(R.drawable.option);
> fillUp.setId(9);
> fillUp.setOnCreateContextMenuListener(new OnCreateContextMenuListener() {
> public void onCreateContextMenu(ContextMenu arg0, View arg1,ContextMenuInfo
> arg2) {
> }
> });
> fillUp.setOnFocusChangeListener(new View.OnFocusChangeListener() {
> public void onFocusChange(View v, boolean hasFocus) {
> Toast.makeText(context, "Focused", Toast.LENGTH_LONG).show();
> if (hasFocus) {
> context.getWindow();
> context.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
>                 }
>             }
>         });
>
>         fillUp.setLayoutParams(Rl);
>         fillUp.setGravity(Gravity.CENTER);
>         fillUp.setId(9);
>         compLayout.addView(fillUp);
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to