【发布时间】:2011-02-27 03:14:43
【问题描述】:
我正在编写一个从 RelativeLayout 扩展而来的自定义视图,我想以编程方式调整它的大小,我该怎么做?
自定义视图类类似于:
public ActiveSlideView(Context context, AttributeSet attr){
super(context, attr);
LayoutInflater inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
if(inflater != null){
inflater.inflate(R.layout.active_slide, this);
}
【问题讨论】: