public final class GrantPermissionsViewHandlerImpl implements GrantPermissionsViewHandler, OnClickListener { private static final String ARG_GROUP_NAME = "ARG_GROUP_NAME"; private final Context mContext; private ResultListener mResultListener; private String mGroupName; private LinearLayout mRootView; private TextView mMessageView; private ImageView mIconView; private TextView mCurrentGroupView; private Button mAllowButton; private Button mSoftDenyButton; private Button mHardDenyButton; public GrantPermissionsViewHandlerImpl(Context context) { mContext = context; } @Override public GrantPermissionsViewHandlerImpl setResultListener(ResultListener listener) { mResultListener = listener; return this; } @Override public View createView() { mRootView = (LinearLayout) LayoutInflater.from(mContext) .inflate(R.layout.grant_permissions, null); mMessageView = (TextView) mRootView.findViewById(R.id.permission_message); mIconView = (ImageView) mRootView.findViewById(R.id.permission_icon); mCurrentGroupView = (TextView) mRootView.findViewById(R.id.current_page_text); mAllowButton = (Button) mRootView.findViewById(R.id.permission_allow_button); mSoftDenyButton = (Button) mRootView.findViewById(R.id.permission_deny_button); mHardDenyButton = (Button) mRootView.findViewById( R.id.permission_deny_dont_ask_again_button); mAllowButton.setOnClickListener(this); mSoftDenyButton.setOnClickListener(this); mHardDenyButton.setOnClickListener(this); return mRootView; }设置mRootView的字体大小
时间: 2024-02-27 10:52:12 浏览: 94
java_ms.rar_Math Class_java collection
要设置 `mRootView` 中的字体大小,您需要分别获取到 `mMessageView`、`mCurrentGroupView`、`mAllowButton`、`mSoftDenyButton`、`mHardDenyButton` 这些控件,并调用它们的 `setTextSize()` 方法来设置字体大小。
以下是一个示例代码,将 `mMessageView`、`mCurrentGroupView`、`mAllowButton`、`mSoftDenyButton`、`mHardDenyButton` 这些控件的字体大小都设置为20sp:
```
mMessageView.setTextSize(20);
mCurrentGroupView.setTextSize(20);
mAllowButton.setTextSize(20);
mSoftDenyButton.setTextSize(20);
mHardDenyButton.setTextSize(20);
```
您可以根据需要调整字体大小的值。
阅读全文