Published 2010. 6. 3. 14:49
tabHost.getTabWidget().getChildAt(0).setLayoutParams(new LinearLayout.LayoutParams(100, 30, 1));
탭 위젯이 LinearLayout을 상속받아서 구현 되었기 때문에 리니어 레이아웃의 레이아웃을 변경하면 됨.
width와 height 값을 설정하고 마지막 1은 weight를 아래는 API 설명이다.
public LinearLayout.LayoutParams (int width, int height, float weight)
Since: API Level 1 
Creates a new set of layout parameters with the specified width, height and weight.
Parameters width the width, either
FILL_PARENT,WRAP_CONTENT
or a fixed size in pixels height the height, either
FILL_PARENT,WRAP_CONTENT
or a fixed size in pixels weight the weight



복사했습니다!