use of org.odk.collect.android.utilities.ThemeUtils in project collect by opendatakit.
the class CustomTimePickerDialog method onResume.
@Override
public void onResume() {
super.onResume();
// Needed because the TimePickerDialog doesn't pick up theme colors properly for some reason
TimePickerDialog dialog = (TimePickerDialog) getDialog();
dialog.getButton(DialogInterface.BUTTON_POSITIVE).setTextColor(new ThemeUtils(getContext()).getColorPrimary());
dialog.getButton(DialogInterface.BUTTON_NEGATIVE).setTextColor(new ThemeUtils(getContext()).getColorPrimary());
}
use of org.odk.collect.android.utilities.ThemeUtils in project collect by opendatakit.
the class WidgetViewUtils method createAnswerTextView.
public static TextView createAnswerTextView(Context context, String text, int answerFontSize) {
TextView textView = new TextView(context);
textView.setId(R.id.answer_text);
textView.setTextColor(new ThemeUtils(context).getColorOnSurface());
textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, answerFontSize);
textView.setPadding(20, 20, 20, 20);
textView.setText(text);
return textView;
}
Aggregations