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
setLayoutParams(): better match Androids behaviour
View.setGravity() specifies gravity of children, not of the view itself LayoutParams.weight > 0 should cause expansion of widget
This commit is contained in:
@@ -16,6 +16,8 @@ JNIEXPORT jlong JNICALL Java_android_widget_TextView_native_1constructor(JNIEnv
|
||||
GtkWidget *wrapper = g_object_ref(wrapper_widget_new());
|
||||
GtkWidget *label = gtk_label_new(text);
|
||||
gtk_label_set_wrap(GTK_LABEL(label), TRUE);
|
||||
gtk_label_set_xalign(GTK_LABEL(label), 0.f);
|
||||
gtk_label_set_yalign(GTK_LABEL(label), 0.f);
|
||||
wrapper_widget_set_child(WRAPPER_WIDGET(wrapper), label);
|
||||
return _INTPTR(label);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user