use Activity title as window title

This commit is contained in:
Julian Winkler
2024-11-03 08:26:11 +01:00
parent e541d87fc2
commit fc0091a989
4 changed files with 22 additions and 0 deletions

View File

@@ -68,6 +68,7 @@ public class Window {
}
private native void set_widget_as_root(long native_window, long widget);
private native void set_title(long native_window, String title);
public native void take_input_queue(long native_window, InputQueue.Callback callback, InputQueue queue);
@@ -133,4 +134,8 @@ public class Window {
public boolean hasFeature(int featureId) {
return false;
}
public void setTitle(CharSequence title) {
set_title(native_window, title != null ? title.toString() : context.getPackageName());
}
}