Being able to change background color java

Based on my previous post:

@SimpleFunction(description="Set Background Color")
  public void SetBackgroundColor(AndroidViewComponent component){
    // Get the View of a Visible Component 
    View v = component.getView();

    // Find the root View
    View root = v.getRootView();

    // Set the color
    root.setBackgroundColor(Color.GREEN);
  }

&

=

Note: The Screen’s background color must be transparent or you won’t be able to see the backgroundcolor of the rootview:
Screenshot_20191107-020836_Chrome

5 Likes