各类V7弹窗(可变色)
2023-01-24 09:16:15 最后更新
//Code By Rose
mian.iyu
//--普通消息弹窗:
cls("android.support.v7.app.AlertDialog$Builder", 弹窗类)
javanew(弹窗对象, 弹窗类, "android.content.Context", activity)

cls("android.text.Html", 文本类)
s title="标题"
s color="#E91E63"
ss("<font color=""+color+"">"+title+"</font>",title2)

javax(标题, null, 文本类, "fromHtml", "String", title2)
javax(null, 弹窗对象, 弹窗类, "setTitle", "CharSequence", 标题)
javax(消息, null, 文本类, "fromHtml", "String", "消\n息")
javax(null, 弹窗对象, 弹窗类, "setMessage", "CharSequence", 消息)
javax(null, 弹窗对象, 弹窗类, "setCancelable","boolean","true")
cls("android.content.DialogInterface$OnClickListener", 事件类)
javacb(左边按钮, 事件类)
{
}
javax(null, 弹窗对象, 弹窗类, "setNeutralButton", "CharSequence", "左边按钮", 事件类, 左边按钮)
javacb(中间按钮, 事件类)
{
}
javax(null, 弹窗对象, 弹窗类, "setNegativeButton", "CharSequence", "中间按钮", 事件类, 中间按钮)
javacb(右边按钮, 事件类)
{
}
javax(null, 弹窗对象, 弹窗类, "setPositiveButton", "CharSequence", "右边按钮", 事件类, 右边按钮)
javax(弹窗, 弹窗对象, 弹窗类, "show")

cls("android.support.v7.app.AlertDialog", 弹窗子类)
javax(左边按钮, 弹窗, 弹窗子类, "getButton", "int", -3)
javax(中间按钮, 弹窗, 弹窗子类, "getButton", "int", -2)
javax(右边按钮, 弹窗, 弹窗子类, "getButton", "int", -1)
us(左边按钮, "textcolor", color)
us(中间按钮, "textcolor", color)
us(右边按钮, "textcolor", color)

//--编辑框弹窗:
nvw(null, null, "线性布局", "", linear)
nvw(null, linear,"编辑框","width=-1\nheight=-2\ntext=\nlayout_marginleft=20dp\nlayout_marginright=20dp",textid)

cls("android.view.View",view)
cls("android.graphics.PorterDuff$Mode",pdm)
cls("android.graphics.Color",gc)
cls("android.graphics.PorterDuffColorFilter",pdf)
cls("android.graphics.drawable.Drawable",dr)
cls("android.graphics.ColorFilter",cf)
s ID=textid
us(ID,"textcursordrawable","#E91E63")
javax(bk,ID,view,"getBackground")
javags(sa,null,pdm,"SRC_ATOP")
javax(cl,null,gc,"parseColor","String","#E91E63")
javanew(pd,pdf,"int",cl,pdm,sa)
javax(null,bk,dr,"setColorFilter",cf,pd)

s cls = "android.support.v7.app.AlertDialog$Builder"

cls("android.support.v7.app.AlertDialog$Builder", 弹窗类)
javanew(弹窗对象, 弹窗类, "android.content.Context", activity)

cls("android.text.Html", 文本类)
javax(标题, null, 文本类, "fromHtml", "String", "标题")
javax(null, 弹窗对象, 弹窗类, "setTitle", "CharSequence", 标题)
javax(null, 弹窗对象, 弹窗类, "setView", "android.view.View", linear)

cls("android.content.DialogInterface$OnClickListener", 事件类)
javacb(左边按钮, 事件类)
{
  ug(textid,"text",tw)
  tw(tw)
}
javax(null, 弹窗对象, 弹窗类, "setNeutralButton", "CharSequence", "左边按钮", 事件类, 左边按钮)
javacb(中间按钮, 事件类)
{

}
javax(null, 弹窗对象, 弹窗类, "setNegativeButton", "CharSequence", "中间按钮", 事件类, 中间按钮)
javacb(右边按钮, 事件类)
{

}
javax(null, 弹窗对象, 弹窗类, "setPositiveButton", "CharSequence", "右边按钮", 事件类, 右边按钮)
javax(弹窗, 弹窗对象, 弹窗类, "show")

cls("android.support.v7.app.AlertDialog", 弹窗子类)
javax(左边按钮, 弹窗, 弹窗子类, "getButton", "int", -3)
javax(中间按钮, 弹窗, 弹窗子类, "getButton", "int", -2)
javax(右边按钮, 弹窗, 弹窗子类, "getButton", "int", -1)
us(左边按钮, "textcolor", "#E91E63")
us(中间按钮, "textcolor", "#E91E63")
us(右边按钮, "textcolor", "#E91E63")

//--拖动条弹窗:
nvw(null, null, "线性布局", "width=-1\nheight=-1\norientation=vertical\nlayout_marginleft=20dp\nlayout_marginright=20dp",linear)

nvw(null, linear,"文本","width=-2\nheight=-2\ntext=0\ntextcolor=#000000\ntextsize=16dp\nlayout_margintop=10dp\nlayout_marginleft=30dp",ss.txtid)
nvw(null, linear,"拖动条","width=-1\nheight=-2\nlayout_margin=15dp",preid)

cls("android.widget.ProgressBar",pb)
cls("android.graphics.Color",gc)
cls("android.graphics.PorterDuffColorFilter",pdf)
cls("android.graphics.drawable.Drawable",dr)
cls("android.graphics.ColorFilter",cf)
cls("android.graphics.PorterDuff$Mode",pdm)

s ID=preid
//拖动进度条着色
javax(pdd,ID,pb,"getProgressDrawable")
javags(sa,null,pdm,"SRC_ATOP")
javax(cl,null,gc,"parseColor","String", "#E91E63")
javanew(pd,pdf,"int",cl,pdm,sa)
javax(null,pdd,dr,"setColorFilter",cf,pd)
//滑块着色
javax(tm,ID,"android.widget.AbsSeekBar","getThumb")
javags(sa,null,pdm,"SRC_ATOP")
javax(cl,null,gc,"parseColor","String", "#E91E63")
javanew(pd,pdf,"int",cl,pdm,sa)
javax(null,tm,dr,"setColorFilter",cf,pd)

//不要动这个
ssj(preid, "onprogresschanged2")
{
  us(ss.txtid,"text",st_nS)
}

//文本更新改变时
ssj(ss.txtid,"ontextchanged")
{
  ug(st_vW,"text",number)
  syso(number)
}

cls("android.support.v7.app.AlertDialog$Builder", 弹窗类)
javanew(弹窗对象, 弹窗类, "android.content.Context", activity)

cls("android.text.Html", 文本类)
javax(标题, null, 文本类, "fromHtml", "String", "标题")
javax(null, 弹窗对象, 弹窗类, "setTitle", "CharSequence", 标题)
javax(null, 弹窗对象, 弹窗类, "setView", "android.view.View", linear)

cls("android.content.DialogInterface$OnClickListener", 事件类)
javacb(左边按钮, 事件类)
{
  ug(ss.txrid,"text",num)
  tw(num)
}
javax(null, 弹窗对象, 弹窗类, "setNeutralButton", "CharSequence", "左边按钮", 事件类, 左边按钮)
javacb(中间按钮, 事件类)
{

}
javax(null, 弹窗对象, 弹窗类, "setNegativeButton", "CharSequence", "中间按钮", 事件类, 中间按钮)
javacb(右边按钮, 事件类)
{

}
javax(null, 弹窗对象, 弹窗类, "setPositiveButton", "CharSequence", "右边按钮", 事件类, 右边按钮)
javax(弹窗, 弹窗对象, 弹窗类, "show")

cls("android.support.v7.app.AlertDialog", 弹窗子类)
javax(左边按钮, 弹窗, 弹窗子类, "getButton", "int", -3)
javax(中间按钮, 弹窗, 弹窗子类, "getButton", "int", -2)
javax(右边按钮, 弹窗, 弹窗子类, "getButton", "int", -1)
us(左边按钮, "textcolor", "#E91E63")
us(中间按钮, "textcolor", "#E91E63")
us(右边按钮, "textcolor", "#E91E63")

//--图片弹窗:
nvw(null, null, "线性布局", "width=-1\nheight=-1", linear)
nvw(null, linear,"图像","width=-1\nheight=-2\ntext=\nlayout_marginleft=20dp\nlayout_marginright=20dp",picid)

us(picid,"src","@icon_iapp.png")

cls("android.support.v7.app.AlertDialog$Builder", 弹窗类)
javanew(弹窗对象, 弹窗类, "android.content.Context", activity)

cls("android.text.Html", 文本类)
javax(标题, null, 文本类, "fromHtml", "String", "标题")
javax(null, 弹窗对象, 弹窗类, "setTitle", "CharSequence", 标题)
javax(null, 弹窗对象, 弹窗类, "setView", "android.view.View", linear)

cls("android.content.DialogInterface$OnClickListener", 事件类)
javacb(左边按钮, 事件类)
{

}
javax(null, 弹窗对象, 弹窗类, "setNeutralButton", "CharSequence", "左边按钮", 事件类, 左边按钮)
javacb(中间按钮, 事件类)
{

}
javax(null, 弹窗对象, 弹窗类, "setNegativeButton", "CharSequence", "中间按钮", 事件类, 中间按钮)
javacb(右边按钮, 事件类)
{

}
javax(null, 弹窗对象, 弹窗类, "setPositiveButton", "CharSequence", "右边按钮", 事件类, 右边按钮)
javax(弹窗, 弹窗对象, 弹窗类, "show")

cls("android.support.v7.app.AlertDialog", 弹窗子类)
javax(左边按钮, 弹窗, 弹窗子类, "getButton", "int", -3)
javax(中间按钮, 弹窗, 弹窗子类, "getButton", "int", -2)
javax(右边按钮, 弹窗, 弹窗子类, "getButton", "int", -1)
us(左边按钮, "textcolor", "#E91E63")
us(中间按钮, "textcolor", "#E91E63")
us(右边按钮, "textcolor", "#E91E63")

//--按键弹窗:
nvw(null, null, "线性布局", "orientation=vertical", linear)
nvw(null, linear,"按钮","width=-1\nheight=-2\ntext=www\nbackground=through\npaddingleft=30dp\ngravity=left|center_vertical",b1)
nvw(null, linear,"按钮","width=-1\nheight=-2\ntext=www\nlayout_marginleft=20dp\nlayout_marginright=20dp",b2)
nvw(null, linear,"按钮","width=-1\nheight=-2\ntext=www\nlayout_marginleft=20dp\nlayout_marginright=20dp",b3)

cls("android.support.v7.app.AlertDialog$Builder", 弹窗类)
javanew(弹窗对象, 弹窗类, "android.content.Context", activity)
cls("android.text.Html", 文本类)
javax(标题, null, 文本类, "fromHtml", "String", "标题")
javax(null, 弹窗对象, 弹窗类, "setTitle", "CharSequence", 标题)
javax(null, 弹窗对象, 弹窗类, "setView", "android.view.View", linear)

cls("android.content.DialogInterface$OnClickListener", 事件类)
javacb(左边按钮, 事件类)
{

}
javax(null, 弹窗对象, 弹窗类, "setNeutralButton", "CharSequence", "左边按钮", 事件类, 左边按钮)
javacb(中间按钮, 事件类)
{

}
javax(null, 弹窗对象, 弹窗类, "setNegativeButton", "CharSequence", "中间按钮", 事件类, 中间按钮)
javacb(右边按钮, 事件类)
{

}
javax(null, 弹窗对象, 弹窗类, "setPositiveButton", "CharSequence", "右边按钮", 事件类, 右边按钮)
javax(弹窗, 弹窗对象, 弹窗类, "show")

cls("android.support.v7.app.AlertDialog", 弹窗子类)
javax(左边按钮, 弹窗, 弹窗子类, "getButton", "int", -3)
javax(中间按钮, 弹窗, 弹窗子类, "getButton", "int", -2)
javax(右边按钮, 弹窗, 弹窗子类, "getButton", "int", -1)
us(左边按钮, "textcolor", "#E91E63")
us(中间按钮, "textcolor", "#E91E63")
us(右边按钮, "textcolor", "#E91E63")

ssj(b1, "clicki")
{
  tw("v7弹窗界面")
}

//--进度条弹窗(加载中弹窗):
nvw(null,null, "线性布局", "width=-1\nheight=80dp\ngravity=center_vertical\npadding=20dp",linear)
nvw(o,linear, "进度条", "width=56dp\nheight=56dp\nlayout_marginleft=24dp\nstyle=16842874",viw)
nvw(b,linear, "文本", "layout_marginleft=24dp\nlayout_marginright=24dp\ntextcolor=#7f000000\ntextsize=14sp\nsingleline=true\nellipsize=end",b)
us(b,"text","进度条")

s cls = "android.support.v7.app.AlertDialog$Builder"

cls("android.support.v7.app.AlertDialog$Builder", 弹窗类)
javanew(弹窗对象, 弹窗类, "android.content.Context", activity)

cls("android.text.Html", 文本类)
javax(标题, null, 文本类, "fromHtml", "String", "标题")
javax(null, 弹窗对象, 弹窗类, "setTitle", "CharSequence", 标题)
javax(null, 弹窗对象, 弹窗类, "setView", "android.view.View", linear)

cls("android.content.DialogInterface$OnClickListener", 事件类)
javacb(左边按钮, 事件类)
{

}
javax(null, 弹窗对象, 弹窗类, "setNeutralButton", "CharSequence", "左边按钮", 事件类, 左边按钮)
javacb(中间按钮, 事件类)
{

}
javax(null, 弹窗对象, 弹窗类, "setNegativeButton", "CharSequence", "中间按钮", 事件类, 中间按钮)
javacb(右边按钮, 事件类)
{

}
javax(null, 弹窗对象, 弹窗类, "setPositiveButton", "CharSequence", "右边按钮", 事件类, 右边按钮)
javax(弹窗, 弹窗对象, 弹窗类, "show")

cls("android.support.v7.app.AlertDialog", 弹窗子类)
javax(左边按钮, 弹窗, 弹窗子类, "getButton", "int", -3)
javax(中间按钮, 弹窗, 弹窗子类, "getButton", "int", -2)
javax(右边按钮, 弹窗, 弹窗子类, "getButton", "int", -1)
us(左边按钮, "textcolor", "#E91E63")
us(中间按钮, "textcolor", "#E91E63")
us(右边按钮, "textcolor", "#E91E63")

cls("android.widget.ProgressBar",pb)
cls("android.graphics.Color",gc)
cls("android.graphics.PorterDuffColorFilter",pdf)
cls("android.graphics.drawable.Drawable",dr)
cls("android.graphics.ColorFilter",cf)
cls("android.graphics.PorterDuff$Mode",pdm)

s ID=viw
javax(dic,ID,pb,"getIndeterminateDrawable")
javags(sa,null,pdm,"SRC_ATOP")
javax(cl,null,gc,"parseColor","String","#E91E63")
javanew(pd,pdf,"int",cl,pdm,sa)
javax(null,dic,dr,"setColorFilter",cf,pd)

//--弹窗中添加".iyu"界面:
nvw(null, null, "线性布局", "", linear)
addv(linear, "界面.iyu")

s cls = "android.support.v7.app.AlertDialog$Builder"

cls("android.support.v7.app.AlertDialog$Builder", 弹窗类)
javanew(弹窗对象, 弹窗类, "android.content.Context", activity)

cls("android.text.Html", 文本类)
javax(标题, null, 文本类, "fromHtml", "String", "标题")
javax(null, 弹窗对象, 弹窗类, "setTitle", "CharSequence", 标题)
javax(null, 弹窗对象, cls, "setView", "android.view.View", linear)

cls("android.content.DialogInterface$OnClickListener", 事件类)
javacb(左边按钮, 事件类)
{

}
javax(null, 弹窗对象, 弹窗类, "setNeutralButton", "CharSequence", "左边按钮", 事件类, 左边按钮)
javacb(中间按钮, 事件类)
{

}
javax(null, 弹窗对象, 弹窗类, "setNegativeButton", "CharSequence", "中间按钮", 事件类, 中间按钮)
javacb(右边按钮, 事件类)
{

}
javax(null, 弹窗对象, 弹窗类, "setPositiveButton", "CharSequence", "右边按钮", 事件类, 右边按钮)
javax(弹窗, 弹窗对象, 弹窗类, "show")

cls("android.support.v7.app.AlertDialog", 弹窗子类)
javax(左边按钮, 弹窗, 弹窗子类, "getButton", "int", -3)
javax(中间按钮, 弹窗, 弹窗子类, "getButton", "int", -2)
javax(右边按钮, 弹窗, 弹窗子类, "getButton", "int", -1)
us(左边按钮, "textcolor", "#E91E63")
us(中间按钮, "textcolor", "#E91E63")
us(右边按钮, "textcolor", "#E91E63")