Android - 動態變成LinearLayout 的 layout_gravity
我的LinearLayout是放在ScrollView裡面,所以要用FrameLayout.LayoutParams,而非LinearLayout.LayoutParams,FrameLayout指的是ScrollView
((FrameLayout.LayoutParams) lin_content_version.getLayoutParams()).gravity = Gravity.CENTER_VERTICAL;