Android examples for User Interface:View Size
add View Width
//package com.java2s; import android.view.View; import android.view.ViewGroup; public class Main { public static void addViewWidth(View view, int increasedAmount) { ViewGroup.LayoutParams headerLayoutParams = (ViewGroup.LayoutParams) view .getLayoutParams();/*from w ww .ja v a 2 s. c om*/ headerLayoutParams.width += increasedAmount; view.setLayoutParams(headerLayoutParams); } }