code: protected void setWidth(View view, int width) {
          ViewGroup.LayoutParams lp = view.getLayoutParams();
          lp.width = width;
          view.setLayoutParams(lp);
      }
docs: define the width of the given view
  
  @param view
  @param width