Android - GridLayout.LayoutParams cannot be cast to RelativeLayout.LayoutParams -


im trying use layoutparams set width , height of relativelayout, error gridlayout.layoutparams cannot cast relativelayout.layoutparams. i'm using code layoutparams:

relativelayout.layoutparams middlelayoutlayoutparams =(relativelayout.layoutparams)middlelayout.getlayoutparams();

i'm not sure why though. pretty easy solve, set relativelayout.layoutparams gridlayout.layoutparams, thing middlelayout relativelayout , shouldn't cast gridlayout.

the reason parent of middlelayout gridlayout, i'm not sure.

any appreciated.

thanks!


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -