Android examples for User Interface:View Size
set Height For View
//package com.java2s; import android.view.View; import android.view.ViewGroup; public class Main { public static void setHeightForView(View view, int heightInPixels) { ViewGroup.LayoutParams layoutParams = view.getLayoutParams(); layoutParams.height = heightInPixels; view.setLayoutParams(layoutParams); }/*from w ww . j a va2 s. com*/ }