diff --git a/src/api-impl-jni/generated_headers/android_widget_TextView.h b/src/api-impl-jni/generated_headers/android_widget_TextView.h index 40cd8a33..ecd57bc9 100644 --- a/src/api-impl-jni/generated_headers/android_widget_TextView.h +++ b/src/api-impl-jni/generated_headers/android_widget_TextView.h @@ -239,14 +239,6 @@ JNIEXPORT void JNICALL Java_android_widget_TextView_setTextSize JNIEXPORT void JNICALL Java_android_widget_TextView_native_1setTextColor (JNIEnv *, jobject, jint); -/* - * Class: android_widget_TextView - * Method: getText - * Signature: ()Ljava/lang/CharSequence; - */ -JNIEXPORT jobject JNICALL Java_android_widget_TextView_getText - (JNIEnv *, jobject); - /* * Class: android_widget_TextView * Method: native_setCompoundDrawables diff --git a/src/api-impl-jni/widgets/android_widget_TextView.c b/src/api-impl-jni/widgets/android_widget_TextView.c index bfb0998f..c2d82a20 100644 --- a/src/api-impl-jni/widgets/android_widget_TextView.c +++ b/src/api-impl-jni/widgets/android_widget_TextView.c @@ -97,11 +97,6 @@ JNIEXPORT void JNICALL Java_android_widget_TextView_native_1set_1markup(JNIEnv * gtk_label_set_use_markup(label, value); } -JNIEXPORT jobject JNICALL Java_android_widget_TextView_getText(JNIEnv *env, jobject this) -{ - return _JSTRING(gtk_label_get_text(box_get_label(env, _PTR(_GET_LONG_FIELD(this, "widget"))))); -} - JNIEXPORT void JNICALL Java_android_widget_TextView_native_1setCompoundDrawables(JNIEnv *env, jobject this, jlong widget_ptr, jlong left, jlong top, jlong right, jlong bottom) { GtkWidget *box = GTK_WIDGET(_PTR(widget_ptr)); diff --git a/src/api-impl/android/widget/TextView.java b/src/api-impl/android/widget/TextView.java index 42f5677c..e902b3db 100644 --- a/src/api-impl/android/widget/TextView.java +++ b/src/api-impl/android/widget/TextView.java @@ -26,8 +26,8 @@ import android.view.KeyEvent; import android.view.View; public class TextView extends View { - public String text; private ColorStateList colors = new ColorStateList(new int[][] {new int[0]}, new int[1]); + private CharSequence text; public TextView(Context context, AttributeSet attrs) { this(context, attrs, 0); @@ -82,6 +82,7 @@ public class TextView extends View { protected native long native_constructor(Context context, AttributeSet attrs); public void setText(CharSequence text) { + this.text = text; native_setText(text != null ? text.toString() : null); if (text instanceof android.text.Spanned) @@ -194,7 +195,9 @@ public class TextView extends View { public int getCompoundPaddingTop() {return 0;} public int getCompoundPaddingBottom() {return 0;} - public native CharSequence getText(); + public CharSequence getText() { + return text; + }; public void setCompoundDrawablePadding(int pad) {}