Search in sources :

Example 46 with AppCompatTextView

use of android.support.v7.widget.AppCompatTextView in project FaceSlim by indywidualny.

the class DownloadManagerResolver method createDialog.

private static AlertDialog createDialog(final Context context) {
    AppCompatTextView messageTextView = new AppCompatTextView(context);
    messageTextView.setTextSize(16f);
    messageTextView.setText(context.getString(R.string.download_manager_disabled));
    messageTextView.setPadding(50, 50, 50, 0);
    messageTextView.setTextColor(ContextCompat.getColor(context, R.color.black));
    return new AlertDialog.Builder(context).setView(messageTextView).setPositiveButton("ok", new DialogInterface.OnClickListener() {

        @Override
        public void onClick(DialogInterface dialog, int which) {
            enableDownloadManager(context);
        }
    }).setCancelable(false).create();
}
Also used : DialogInterface(android.content.DialogInterface) AppCompatTextView(android.support.v7.widget.AppCompatTextView)

Aggregations

AppCompatTextView (android.support.v7.widget.AppCompatTextView)45 View (android.view.View)26 AppCompatButton (android.support.v7.widget.AppCompatButton)9 AppCompatImageView (android.support.v7.widget.AppCompatImageView)7 ProgressBar (android.widget.ProgressBar)7 Sigchain (co.krypt.krypton.team.Sigchain)7 AlertDialog (android.support.v7.app.AlertDialog)6 Button (android.widget.Button)6 DialogInterface (android.content.DialogInterface)4 ConstraintLayout (android.support.constraint.ConstraintLayout)4 ViewGroup (android.view.ViewGroup)4 TextView (android.widget.TextView)4 Context (android.content.Context)3 Handler (android.os.Handler)3 Nullable (android.support.annotation.Nullable)3 Espresso.onView (android.support.test.espresso.Espresso.onView)3 MediumTest (android.support.test.filters.MediumTest)3 AppCompatEditText (android.support.v7.widget.AppCompatEditText)3 SuppressLint (android.annotation.SuppressLint)2 Intent (android.content.Intent)2