unify View construction and measurement

No longer allow constructing Views without Context.
Lets have only one onMeasure() method to unify behaviour
This commit is contained in:
Julian Winkler
2023-12-29 11:05:05 +01:00
parent 32f344c301
commit 757d689689
7 changed files with 25 additions and 54 deletions

View File

@@ -1,5 +1,6 @@
package android.view;
import android.content.Context;
import android.view.SurfaceHolder;
public class Window {
@@ -49,7 +50,7 @@ public class Window {
public View getDecorView() {
if (contentView != null)
return contentView;
return new View(); // FIXME: this can probably backfire
return new View(Context.this_application); // FIXME: this can probably backfire
}
private native void set_widget_as_root(long native_window, long widget);