views:

42

answers:

0

Hi all,

I implemented a edittext and a button on a status bar. The problem i face here is, when the edittext is focused and i click it, i couldnt see the Keyboard popup not happening.

But if i focus it, cursor blinks, and when i type some characters it is handled by quick search box Activity(intent ).!!!

I have implemented onClick() function for editext. So that i thought to launch the keyboard input forcefully, even then it doesnot work.!!

W/KeyCharacterMap( 144): No keyboard for id 0 W/KeyCharacterMap( 144): Using default keymap: /system/usr/keychars/ qwerty.kcm.bin I/ActivityManager( 68): Starting activity: Intent { act=android.search.action.GLOBAL_SEARCH flg=0x10000000 cmp=com.android.quicksearchbox/.SearchActivity (has extras) } I/ActivityManager( 68): Start proc com.android.quicksearchbox for activity com.android.quicksearchbox/.SearchActivity: pid=331 uid=10026 gids={3003} I/ActivityManager( 68): Starting activity: Intent { act=android.search.action.GLOBAL_SEARCH flg=0x10000000 cmp=com.android.quicksearchbox/.SearchActivity (has extras) }

what is the problem ?

How should i receive the keyboard popup for editext on status bar and characters typed in being sent to edittext on the status bar.?

Can someone help me with this.

private void makeStatusBarView(Context context) {
urlTextbox = (EditText)sb.findViewById(R.id.urltextbox);
urlTextbox.setFocusable(true);
//urlTextbox.requestFocusFromTouch();
urlTextbox.setOnClickListener(new View.OnClickListener(){
public void onClick(View v) {
String url = urlTextbox.getText().toString();
System.out.println("Status Bar - Onclick of textbox"+url);
InputMethodManager inputMethodManager = (InputMethodManager)
mContext.getSystemService ( Context.INPUT_METHOD_SERVICE );
inputMethodManager.showSoftInput ( urlTextbox,
InputMethodManager.SHOW_FORCED );
}
});
Button mButton = (Button) sb.findViewById(R.id.Go);
mButton.setOnClickListener(new Button.OnClickListener(){
public void onClick(View v) {
String url = urlTextbox.getText().toString();
System.out.println("Status Bar - Onclick of GO"+url);
Intent browserIntent = new
Intent("android.intent.action.VIEW", Uri.parse("http://
www.google.com"));
browserIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
mContext.startActivity(browserIntent);
}
});
}

I implemented in makestatusbarview()
~mydroid/frameworks/base/services/java/com/android/server/status/ StatusBarService.java

Thanks, Mani