Mercurial > dwindows
comparison android/dw.cpp @ 2701:9df2c11f020f
Android: Fix dw_mle_set_word_wrap() and dw_mle_set_cursor().
Calling the wrong method in dw_mle_set_cursor().
Set maxWidth on MLE resize based on Word Wrap setting.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 16 Nov 2021 20:15:18 +0000 |
parents | 4470089e14b3 |
children | 4f12dc8e8f18 |
comparison
equal
deleted
inserted
replaced
2700:246f23670e3b | 2701:9df2c11f020f |
---|---|
2715 if((env = (JNIEnv *)pthread_getspecific(_dw_env_key))) | 2715 if((env = (JNIEnv *)pthread_getspecific(_dw_env_key))) |
2716 { | 2716 { |
2717 // First get the class that contains the method you need to call | 2717 // First get the class that contains the method you need to call |
2718 jclass clazz = _dw_find_class(env, DW_CLASS_NAME); | 2718 jclass clazz = _dw_find_class(env, DW_CLASS_NAME); |
2719 // Get the method that you want to call | 2719 // Get the method that you want to call |
2720 jmethodID mleSetWordWrap = env->GetMethodID(clazz, "mleSetWordWrap", | 2720 jmethodID mleSetCursor = env->GetMethodID(clazz, "mleSetCursor", |
2721 "(Landroid/widget/EditText;I)V"); | 2721 "(Landroid/widget/EditText;I)V"); |
2722 // Call the method on the object | 2722 // Call the method on the object |
2723 env->CallVoidMethod(_dw_obj, mleSetWordWrap, handle, point); | 2723 env->CallVoidMethod(_dw_obj, mleSetCursor, handle, point); |
2724 _dw_jni_check_exception(env); | 2724 _dw_jni_check_exception(env); |
2725 } | 2725 } |
2726 } | 2726 } |
2727 | 2727 |
2728 /* | 2728 /* |