0

タイトルの背景とフォントの色を変えたいのですがどうすればいいですか!!

4

2 に答える 2

0

この行だけ追加しました

label.setBackgroundColor(Color.BLUE);

private void createLabels() {
    Context context = new ContextThemeWrapper(getContext(), mLabelsStyle);

    for (int i = 0; i < mButtonsCount; i++) {
      FloatingActionButton button = (FloatingActionButton) getChildAt(i);
      String title = button.getTitle();

      if (button == mAddButton || title == null ||
          button.getTag(R.id.fab_label) != null) continue;

      TextView label = new TextView(context);
      label.setTextAppearance(getContext(), mLabelsStyle);
      label.setText(button.getTitle());
      label.setBackgroundColor(Color.BLUE);      
      addView(label);

      button.setTag(R.id.fab_label, label);
    }
  }
于 2015-03-22T08:35:38.997 に答える