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

java - How to specify maven bin in eclipse maven plugin? -

Error while updating a record in APEX screen -

c++ - In an add-in in Excel, written in C(++), how does one get the name of the function which called into the addin? -