Woman In Love
Lurker
Hi,
I'm trying to set height and width to Relative Layout Programmaticaly:
final RelativeLayout Frame1 = (RelativeLayout) findViewById(R.id.Frame1);
Frame1.getLayoutParams().width = X;
Frame1.getLayoutParams().height = Y;
Works on smartphone but crashes on Ipad.
I tried also:
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams (RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
Frame1.setLayoutParams(params);
and again SetLayoutParams return null.
Why is that?
Thank you.
I'm trying to set height and width to Relative Layout Programmaticaly:
final RelativeLayout Frame1 = (RelativeLayout) findViewById(R.id.Frame1);
Frame1.getLayoutParams().width = X;
Frame1.getLayoutParams().height = Y;
Works on smartphone but crashes on Ipad.
I tried also:
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams (RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
Frame1.setLayoutParams(params);
and again SetLayoutParams return null.
Why is that?
Thank you.