Пример #1
0
  public RptTitle(Context context, String title) {
    super(context);
    this.setTextColor(Tool.getTextColor(context));
    this.setText(title);

    this.setTextSize(15);
    this.setPadding(Tool.dip2px(getContext(), 10), 1, Tool.dip2px(getContext(), 15), 1);
    this.setGravity(Gravity.CENTER_VERTICAL);

    this.setLayoutParams(getCurLayoutParams());
    this.setBackgroundResource(R.drawable.tabletop);
  }
Пример #2
0
  public RptTitle(Context context, Panal panal) {
    super(context);
    this.setTextColor(Tool.getTextColor(context));
    this.setText(panal.getCaption());

    this.setTextSize(15);
    this.setPadding(Tool.dip2px(getContext(), 10), 1, Tool.dip2px(getContext(), 15), 1);
    this.setGravity(Gravity.CENTER_VERTICAL);

    this.setLayoutParams(getCurLayoutParams());

    // if (panal.getPanalType() == 1)
    // {
    // this.setLayoutParams(getSurveyLayoutParams());
    // this.setBackgroundResource(R.drawable.tabletop);
    // }
    // else
    // {
    this.setMinHeight(Tool.dip2px(getContext(), 40));
    this.setLayoutParams(getCurLayoutParams());
    this.setBackgroundResource(R.drawable.tabletop);
  }