0

I have a view which is fully coded in Java

public class SurvivorLayout extends RelativeLayout { public SurvivorLayout(Context context, final List<Survivor> list) { super(context); // The Below functions actually build the view piece by piece this.initComponents(); this.setComponentsId(); this.setScrollViewAndHorizontalScrollViewTag(); ... } } 

As you can see the view is built entirety without XML or Compose etc.

What do I need to do in order to support the edge-to-edge requirement for SDK 35 since it's built programmatically?


UPDATE:

The Activities Class is as such:

class SurvivorActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // SDK 35+ EdgeToEdge.enable(this); // Enable edge-to-edge ... } } 

It is in this class that I will call the setContentView function to the above class which builds the view as such:

setContentView(new SurvivorLayout(this, sList); 

The components in the java class SurvivorLayout extends RelativeLayout is as follows:

 this.setScrollViewAndHorizontalScrollViewTag(); this.horizontalScrollViewB.addView(this.tableB); this.scrollViewC.addView(this.tableC); this.scrollViewD.addView(this.horizontalScrollViewD); this.horizontalScrollViewD.addView(this.tableD); // Add the components to be part of the main layout this.addComponentToMainLayout(); // Add some table rows this.addTableRowToTableA(); this.addTableRowToTableB(); 

Hope this is more helpful to help troubleshoot my issue.

3
  • What are the components of this view? Is it part of another parent view? Please share some more details. Commented Aug 20 at 12:34
  • @tomerpacific i have updated my question... hopefully you can provide some guidance !! Commented Aug 20 at 23:19
  • Is the parent container a relative layout and no other container? Also, did you try running your application on a device with OS >= 15 and seeing what the results are? Commented Aug 21 at 5:25

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.