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

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -