Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function 控件圆角(id,边框厚度,边框颜色,背景颜色,圆角大小)
- import "android.graphics.drawable.GradientDrawable"
- drawable=GradientDrawable()
- drawable.setShape(GradientDrawable.RECTANGLE)
- drawable.setStroke(边框厚度,tonumber(边框颜色))
- drawable.setColor(tonumber(背景颜色))
- drawable.setCornerRadius(圆角大小)
- id.BackgroundDrawable=drawable
- end
- 字体颜色=0xffb57b58
- bj=
- {
- LinearLayout,
- orientation='vertical',
- layout_width='fill',
- layout_height='wrap',
- {
- CardView;
- layout_gravity='center';
- elevation='';
- layout_width='90%w';
- layout_height='110%w';
- radius='50dp';
- id='弹窗框架';
- {
- ImageView;
- layout_gravity='center';
- layout_width='60%w';
- layout_height='60%w';
- ColorFilter="0xff0000ff";
- scaleType='fitXY';
- id='背景图片';
- };
- {
- LinearLayout,
- orientation='vertical',
- layout_width='fill',
- layout_height='fill',
- {
- TextView;
- layout_margin='13dp';
- gravity='center';
- layout_width='fill';
- textColor=字体颜色;
- text='标题';
- textSize='28';
- id='标题';
- };
- {
- CardView;
- layout_width='80%w';
- CardBackgroundColor="0xff0000ff";
- layout_height='2dp';
- radius='33dp';
- elevation='0';
- layout_gravity='center';
- };
- {
- LinearLayout,
- orientation='vertical',
- layout_width='fill',
- layout_height='66%w',
- {
- TextView;
- layout_marginTop='5dp';
- gravity='center';
- layout_width='fill';
- textColor=字体颜色;
- text='更新版本:';
- textSize='18';
- id='更新版本';
- };
- {
- TextView;
- layout_marginTop='5dp';
- layout_marginLeft='20dp';
- layout_width='wrap';
- layout_height='wrap';
- gravity='';
- textColor='0xffeb3f97';
- text='内容标题:';
- textSize='18dp';
- id='内容标题';
- };
- {
- TextView;
- layout_marginLeft='30dp';
- layout_marginRight='13dp';
- layout_width='wrap';
- layout_height='wrap';
- gravity='';
- textColor='0xff5a5758';
- text="暂无内容";
- textSize='15dp';
- id='内容';
- };
- };
- {
- CardView;
- layout_width='80%w';
- CardBackgroundColor="0xff0000ff";
- layout_height='2dp';
- radius='33dp';
- elevation='0';
- layout_gravity='center';
- };
- {
- LinearLayout,
- orientation='horizontal',
- layout_width='fill',
- layout_height='fill',
- background='#00FFFFFF',
- gravity='center';
- {
- TextView;
- layout_marginRight='10%w';
- gravity='center';
- layout_height='fill';
- textColor=字体颜色;
- text='取消';
- textSize='18';
- id='取消按键';
- onClick=function()
- activity.finish()
- end
- };
- {
- TextView;
- layout_marginLeft='10%w';
- gravity='center';
- layout_height='fill';
- textColor=字体颜色;
- text='确定';
- textSize='18';
- id='确定按键';
- onClick=function()
- activity.finish()
- end
- };
- };
- };
- };
- };
- import"android.graphics.drawable.ColorDrawable"
- a=AlertDialog.Builder(this).show()
- a.getWindow().setContentView(loadlayout(bj));
- a.getWindow().setBackgroundDrawable(ColorDrawable(0x00000000));
- a.setCancelable(false)
- 控件圆角(弹窗框架,10,0xff0000ff,0xffffffff,100)
- --[[CSL助手
- 作者:幻世楠木
- 禁止删除版权]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement