I have a problem with the subclass NativeActivityI'm working on, my goal is to catch and process key events from Java code instead (this is mainly due to this), unfortunately, I don’t see the Log()one present in the method onKeyDown, although Logs onCreate()are printed as well as printed magazines that I posted in my own code. It seems like onKeyDownmy subclass is NativeActivitynever called.
NativeActivity
Log()
onKeyDown
onCreate()
Any idea?
public class CNativeActivity extends NativeActivity{ private final static String TAG = "CNativeActivity"; protected void onCreate(Bundle savedInstanceState) { Log.v(TAG, "onCreate"); super.onCreate(savedInstanceState); } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { Log.v(TAG, "onKeyDown"); return true; } }
add KeyEvent.Callback tools
public class @activity@ extends NativeActivity implements KeyEvent.Callback { public boolean onKeyMultiple (int keyCode, int count, KeyEvent event) }
KeyEvent.Callback- , AInputEvent; - , , ÷, √, €, £,...