Android Centering RecyclerView between toolbar and custom view -


i create media player app , managed align custom view witch media controller @ bottom of main layout , toolbar witch @ top of layout xml.

now have layout recyclerview want fit between toolbar , controller, managed align top below toolbar on bottom controller , layout overlap.

relativelayout.layoutparams params = new relativelayout.layoutparams(relativelayout.layoutparams.wrap_content, viewgroup.layoutparams.wrap_content); params.addrule(relativelayout.below, toolbar.getid()); params.addrule(relativelayout.above, musiccontroller.getid()); mainlayout.addview(musiclistlayout, params); 

also have tried setting height of layout mainlayout.getmeasuredheight() - musiccontroller.getmeasuredheight()

the solution of problem set id controller because created programatically.


Comments

Popular posts from this blog

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -