I have an ImageView in my app. My question is how I can set params to it?
ImageView header = new ImageView(getActivity());
I used this way but I face with classCastException
ImageView header = new ImageView(getActivity());
header.setImageResource(R.drawable.ahsan_hadis_img);
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(200, 1500);
header.setLayoutParams(layoutParams);