这是我自定义的一个控件由两个按钮 和一个editText组成 可是为什么我的控件不能显示出来呢
这是我的Java代码实现一些属性的设置public class MyTopbar extends RelativeLayout{
private String title,leftbutton,rightbutton;
private Button leftBtn,rightBtn;
private EditText editText;
private LayoutParams paramRight,paramsLeft,paramsTitle;
public MyTopbar(Context context, AttributeSet attrs) {
super(context, attrs);
TypedArray ta = context.obtainStyledAttributes(attrs,R.styleable.MyTopbar);
title = ta.getString(R.styleable.MyTopbar_title);
leftbutton = ta.getString(R.styleable.MyTopbar_leftbutton);
rightbutton = ta.getString(R.styleable.MyTopbar_rightbutton);
ta.recycle();
leftBtn = new Button(context);
rightBtn = new Button(context);
editText = new EditText(context);
leftBtn.setText(leftbutton);
rightBtn.setText(rightbutt