Search in sources :

Example 11 with ThemeUtils

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());
}
Also used : ThemeUtils(org.odk.collect.android.utilities.ThemeUtils) TimePickerDialog(android.app.TimePickerDialog)

Example 12 with ThemeUtils

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;
}
Also used : ThemeUtils(org.odk.collect.android.utilities.ThemeUtils) TextView(android.widget.TextView)

Aggregations

ThemeUtils (org.odk.collect.android.utilities.ThemeUtils)12 TextView (android.widget.TextView)3 Bundle (android.os.Bundle)2 View (android.view.View)2 ViewModelProvider (androidx.lifecycle.ViewModelProvider)2 ArgbEvaluator (android.animation.ArgbEvaluator)1 ValueAnimator (android.animation.ValueAnimator)1 SuppressLint (android.annotation.SuppressLint)1 DatePickerDialog (android.app.DatePickerDialog)1 TimePickerDialog (android.app.TimePickerDialog)1 Intent (android.content.Intent)1 Drawable (android.graphics.drawable.Drawable)1 Handler (android.os.Handler)1 OnClickListener (android.view.View.OnClickListener)1 Button (android.widget.Button)1 DividerItemDecoration (androidx.recyclerview.widget.DividerItemDecoration)1 CircleOptions (com.google.android.gms.maps.model.CircleOptions)1 MarkerOptions (com.google.android.gms.maps.model.MarkerOptions)1 CurrentProjectViewModel (org.odk.collect.android.activities.viewmodels.CurrentProjectViewModel)1 MainMenuViewModel (org.odk.collect.android.activities.viewmodels.MainMenuViewModel)1