1

I'm trying to get heightPercent property value to achieve that I tried the bellow code but doesn't work :

Code

    PercentRelativeLayout mPercentRelativeLayout = new PercentRelativeLayout(getActivity());
    mPercentRelativeLayout = (PercentRelativeLayout) view.findViewById(R.id.percentRelativeLayout);

    PercentRelativeLayout.LayoutParams layoutParams = new PercentRelativeLayout.LayoutParams(mPercentRelativeLayout.getLayoutParams());
    Log.v("PercentRL Height :", "" + layoutParams.getPercentLayoutInfo().heightPercent);

output

PercentRL Height :﹕ -1

I would appreciate any help.

Onik
  • 19,396
  • 14
  • 68
  • 91
TooCool
  • 10,598
  • 15
  • 60
  • 85

0 Answers0