Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - onKey method of OnKeyListener is not calling

onKey method of OnKeyListener is not calling

Put your problem here if it does not fit any of the other categories.

onKey method of OnKeyListener is not calling

Postby srinuv28 » Wed Dec 02, 2009 8:43 am

Hi..

Please help on this it's urgent..


When I press key from softkeypad onKey method is not calling, when I press back button at that time only it is calling, and when I press numbers at that time also onKey method is calling.

onKey mothod of OnKeyListener is calling when I am typing with Virtual keyboard .

I am posting my sample code please anyone help on this...

*******************************************************************************************
package com.demo;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnKeyListener;
import android.widget.EditText;
import android.widget.TextView;

public class TextFiledDemo extends Activity {

private TextView textView;
private EditText messageBox;
private String className = this.getClass().getSimpleName();


/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);


textView = (TextView) findViewById(R.id.textView);
messageBox = (EditText) findViewById(R.id.msgBox);
// messageBox.set

//messageBox.setOnKeyListener(onKeyListener);



messageBox.setOnKeyListener(new OnKeyListener() {


@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {

String methodName = "onKey";
String message = messageBox.getText().toString().trim();
textView.setText(message);
Log.d(className, methodName + " message[" + message + ".]");
return false;
}
});

}

//on
}

main.xml

<?xml version="1.0" encoding="utf-8"?>
<AbsoluteLayout android:id="@+id/layout"
android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">

<TextView android:id="@+id/textView" android:layout_width="245px"
android:layout_height="wrap_content" android:singleLine="true" android:text="TextView"
android:gravity="left" android:layout_x="37px" android:layout_y="51px">
</TextView>
<EditText android:id="@+id/msgBox" android:layout_width="303px"
android:layout_height="wrap_content" android:singleLine="true"
android:textSize="18sp" android:layout_x="7px" android:layout_y="374px" android:inputType="none">
</EditText>

</AbsoluteLayout>


*******************************************************************************************

Thanks
Srinu
Last edited by srinuv28 on Thu Dec 03, 2009 6:45 am, edited 1 time in total.
srinuv28
Developer
Developer
 
Posts: 36
Joined: Wed Nov 04, 2009 4:04 am

Top

Postby srinuv28 » Thu Dec 03, 2009 3:20 am

Hi..

Anyone help on this.. it's urgent..

Thanks
Srinu
srinuv28
Developer
Developer
 
Posts: 36
Joined: Wed Nov 04, 2009 4:04 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Exabot [Bot] and 13 guests