Toolbar
android:layout_ width=" match_ _parent"
android:layout_ height="?attr/actionBarSize"
android:backgroud-="fffffff0"
app:navigationlcon=" @drawable/ic. baseline_ arrow. back. 24"
app:title="主标题"
app:titleTextColor=" #ff0000"
app:titleMarginStart="90dp"
app:subtitle="子标题"
app:subtitleTextColor=" #00ffff"
app:logo=" @mipmap/ic. _launcher"
AlertDialog
AlertDialog.Builder builder = new AlertDialog.Builder(context);构建Dialog的各种参数
Builder.setlcon(int iconld);添加ICON
Builder.setTitle(CharSequence title);添加标题
Builder.setMessage(CharSequence message);添加消息
Builder.setView(Viewview);设置自定义布局
Builder.create();创建Dialog
Builder.show);显示对话框
setPositiveButton确定按钮
setNegativeButton取消按钮
setNeutralButton中间按钮
PopupWindow
setContentView(View contentView):设置PopupWindow显示的View
showAsDropDown(View anchor):相对某个控件的位置(正左下方),无偏移
showAsDropDown(View anchor, int xoff, int yoff);相对某个控件的位置,有偏移
setFocusable(boolean focusable)设置是否获取焦点
setBackgroundDrawable(Drawable background)设置背景
dismiss() 关闭弹窗
setAnimationStyle(int animationStyle)设置加载动画
setTouchable(boolean touchable)设置触摸使能
setOutsideTouchable(boolean touchable)设置PopupWindow外面的触摸使能