You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
Button/ImageButton: consume touch events
Androids button consumes touch events, while GTKs button lets touch events propagate to the parent. This previously caused some glitches with buttons inside a CoordinatorLayout.
This commit is contained in:
@@ -14,6 +14,7 @@ JNIEXPORT jlong JNICALL Java_android_widget_ImageButton_native_1constructor(JNIE
|
||||
GtkWidget *image = gtk_picture_new_for_resource("/org/gtk/libgtk/icons/16x16/status/image-missing.png"); // show "broken image" icon
|
||||
gtk_button_set_child(GTK_BUTTON(button), image);
|
||||
wrapper_widget_set_child(WRAPPER_WIDGET(wrapper), button);
|
||||
wrapper_widget_consume_touch_events(WRAPPER_WIDGET(wrapper)); // Android button consumes touch events
|
||||
wrapper_widget_set_jobject(WRAPPER_WIDGET(wrapper), env, this);
|
||||
|
||||
return _INTPTR(button);
|
||||
|
||||
Reference in New Issue
Block a user