Please consider ImageView
inside RelativeLayout
it has some specific layout params for RelativeLayout
. I need to change the width and height of my ImageView
programatically according to the screen size.
How can I save all layout parameters but only change width and height
Following code creates empty layout params but I need to save my old params and change only height and width.
imageViewArticleImage.setLayoutParams(new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, mScreenSize.y / 3));
How can I achieve this ?