I tried to stack two layouts at each other but I can't seem to do it. I have one Java class file as a view, in this one there are balls which I can move by dragging at the screen. The other one is a XML file which is made by the Graphical Editor in Eclipse.
This is my code I used to display them at once:
LinearLayout view = (LinearLayout)LayoutInflater.from(this).inflate(R.layout.main, null);
LinearLayout layout = new LinearLayout(this);
// Define the LinearLayout's characteristics
layout.setGravity(Gravity.CENTER);
layout.setOrientation(LinearLayout.VERTICAL);
// Set generic layout parameters
LayoutParams params = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
DrawView custom = new DrawView(this);
layout.addView(view);
layout.addView(custom, params);
setContentView(layout);
However, this does show the views both. My only problem is that they are not on top of each other. Now they are under each other. Also when they are stacked is there a way to make them both transparent (to see both layers)?