コード例 #1
0
  public View getLongCellView(String inString, int resource) {
    GroupView groupView = new GroupView(this);

    TextView textView = new TextView(BozukoControllerActivity.this);
    textView.setPadding(0, 10, 0, 10);
    textView.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
    textView.setTextColor(Color.GRAY);
    // textView.setTypeface(Typeface.DEFAULT_BOLD);
    textView.setTextSize(14);
    textView.setGravity(Gravity.CENTER);
    groupView.setContentView(textView);
    textView.setText(Html.fromHtml(inString));

    groupView.setImage(resource);

    return groupView;
  }
コード例 #2
0
  public View getCellView(String inString, int resource) {
    GroupView groupView = new GroupView(this);

    TextView textView = new TextView(BozukoControllerActivity.this);
    textView.setLayoutParams(
        new LayoutParams(
            LayoutParams.FILL_PARENT, (int) (44 * getResources().getDisplayMetrics().density)));
    textView.setTextColor(Color.BLACK);
    textView.setTypeface(Typeface.DEFAULT_BOLD);
    textView.setTextSize(16);
    textView.setGravity(Gravity.CENTER);
    groupView.setContentView(textView);
    textView.setText(inString);

    groupView.setImage(resource);

    return groupView;
  }