自定义utw背景,文字颜色等操作
2023-01-24 09:16:15 最后更新
//代码出自1335347584
javanew(弹窗对象,"android.app.AlertDialog$Builder", "android.content.Context", activity)
/.
sbp("@icon.png",图标)
java(图标,弹窗对象,"android.app.AlertDialog$Builder.setIcon","android.graphics.drawable.Drawable",图标)
./
//标题
java(null,弹窗对象,"android.app.AlertDialog$Builder.setTitle","CharSequence","标题")
//内容
java(null, 弹窗对象,"android.app.AlertDialog$Builder.setMessage","CharSequence","内容")
cls("android.content.DialogInterface$OnClickListener", 事件类)
//按钮事件
javacb(事件, 事件类)
{
  s qun=740788898
  ss("mqqapi://card/show_pslcard?src_type=internal&version=1&uin="+qun+"&card_type=group&source=qrcode",joinqq)
  sit(a,"action", "android.intent.action.VIEW")
  sit(a,"data",joinqq)
  uit(a, "chooser", "选择QQ")
}
javacb(事件2, 事件类)
{
  s qun=740788898
  ss("mqqapi://card/show_pslcard?src_type=internal&version=1&uin="+qun+"&card_type=group&source=qrcode",joinqq)
  sit(a,"action", "android.intent.action.VIEW")
  sit(a,"data",joinqq)
  uit(a, "chooser", "选择QQ")
}
//按钮文字
javax(null, 弹窗对象, "android.app.AlertDialog$Builder", "setPositiveButton", "CharSequence","加群", 事件类, 事件)
javax(null, 弹窗对象, "android.app.AlertDialog$Builder", "setNegativeButton", "CharSequence","按钮2", 事件类, 事件2)
javax(null, 弹窗对象, "android.app.AlertDialog$Builder", "setNeutralButton", "CharSequence","按钮3", 事件类, 事件2)
//点外部是否能关闭
//java(null, 弹窗对象,"android.app.AlertDialog$Builder.setCancelable", "boolean", false)
java(弹窗对象,弹窗对象,"android.app.AlertDialog$Builder.create")
java(null,弹窗对象,"android.app.Dialog.show")
java(win,弹窗对象,"android.app.Dialog.getWindow")
java(don,win,"android.view.Window.getDecorView")
s a = 5
s b = 50
s c = "#255779|#3e7492|#a6c0cd"
s d = "#333333"
s e = "trbl"
ngde(a, b, c, d, e, f)
//背景
us(don,"background",f)
//按钮颜色
javags(标识,null,"android.content.DialogInterface","BUTTON_POSITIVE")
javax(按钮1, 弹窗对象,"android.app.AlertDialog","getButton", "int", 标识)
javags(标识,null,"android.content.DialogInterface","BUTTON_NEGATIVE")
javax(按钮2, 弹窗对象,"android.app.AlertDialog","getButton", "int", 标识)
javags(标识,null,"android.content.DialogInterface","BUTTON_NEUTRAL")
javax(按钮3, 弹窗对象,"android.app.AlertDialog","getButton", "int", 标识)
us(按钮1,"textcolor","#ffff00")
us(按钮2,"textcolor","#0000ff")
us(按钮3,"textcolor","#00ff00")
//消息颜色
javags(对话框,弹窗对象,"android.app.AlertDialog","mAlert")
javags(消息,对话框,"com.android.internal.app.AlertController","mMessageView")
us(消息,"textcolor","#ff0000")
//标题颜色
javags(对话框,弹窗对象,"android.app.AlertDialog","mAlert")
javags(标题,对话框,"com.android.internal.app.AlertController","mTitleView")
us(标题,"textcolor","#00ffff")