How to set width for image progragmaticall?
This is my code,
    txtone = (ImageView)findViewById(R.id.imageView);
    txttwo = (ImageView)findViewById(R.id.imageView2);
    height = metrics.heightPixels;
    width = metrics.widthPixels;
    if (height == 800 && width == 1217) {
    int a = txtone.getMeasuredWidth();
    txtone.getLayoutParams().width = 280;
    txttwo.getLayoutParams().width = 280;
    txtthree.getLayoutParams().width = 280;
    txtone.requestLayout();
    txttwo.requestLayout();
    txtthree.requestLayout();
 
    