自定义Dialog(自定义button样式)

本文详细介绍了如何在Android开发中自定义Dialog,特别是聚焦于如何创建独特的按钮样式。通过定制布局文件和使用自定义对话框类,开发者可以实现与应用风格相匹配的完全定制化Dialog体验。
摘要由CSDN通过智能技术生成
	 dialog = new Dialog(this, R.style.MyDialog);
		dialog.setCancelable(false);
		//dialog.setContentView(R.layout.first_entry_dialog);
		View view = View.inflate(this, R.layout.normal_entry_dialog, null);
		et_pwd = (EditText) view.findViewById(R.id.et_normal_entry_pwd);
		Button bt_normal_ok = (Button) view.findViewById(R.id.bt_normal_dialog_ok);
		Button bt_normal_cancle =  (Button) view.findViewById(R.id.bt_normal_dialog_cancle);
		bt_normal_ok.setOnClickListener(this);
		bt_normal_cancle.setOnClickListener(this);
		dialog.setContentView(view);
		dialog.show();
R.style.MyDialog
<?xml version="1.0" encoding="utf-8"?>
<resources>

    <style name="MyDialog" parent="@android:style/Theme.Dialog">
        <item name="android:windowBackground">@drawable/
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值