我正在尝试使用这段代码获取AlertDialog
中的TextView
引用:
AlertDialog.Builder logoutBuilder = new AlertDialog.Builder(getActivity());
TextView alertTextView = (TextView) logoutBuilder.findViewById(android.R.id.message);
alertTextView.setTextSize(40);
但是我在findViewById
处得到了编译器错误:
Cannot cast from AlertDialog.Builder to Dialog
The method findViewById(int) is undefined for the type AlertDialog.Builder