I'm getting exception when i do following:
findViewById(R.id.some_container).setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 50));
But when I change to new LinearLayout.LayoutParams
that's ok. If LinearLayout.LayoutParams
is child of ViewGroup.LayoutParams
that why I can't cast?