Relativelayout - place a view over another (Stack up views)

 As like we know SKETCHWARE doesn't support Relativelayout. But through relativelayout we can make Attractive UI that make your application looks amazing..

So today we are going to do how to place a view over another view in Sketchware using Relativelayout

Like this 👇



Here i Placed the search bar on top of a Scrollview..

Just like we seen in some of google apps(Google movies ...)

And yes its possible to make a ui like this on SKETCHWARE



CODE :

RelativeLayout rl = new RelativeLayout(this); RelativeLayout.LayoutParams lparams = new RelativeLayout.LayoutParams( RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT); rl.setLayoutParams(lparams); background.removeAllViews(); rl.addView(view1); rl.addView(view2); background.addView(rl);


⚠️ REPLACE COLOURED PART WITH YOUR NEED


Here the Green part is  the background view..

That holds every view in this sketchware or the view we are going to convert into Relativelayout

AND

The Red part is 

view1

The view that placed first

view2

The view you want to place next ( to place over view1)