Перейдите к этому
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
public class FullyscutomDialo extends Dialog{
public FullyscutomDialo(Context context) {
super(context);
// TODO Auto-generated constructor stub
}
@Override
public void dismiss() {
//do what you need before closing here
super.dismiss();
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//set your custom layout here
//use layout attribut just like activity
}
}
, затем используйте две строки, чтобы показать его по активности (может быть, onclickevent и т. Д.)
FullyscutomDialo hh=new FullyscutomDialo (this);
hh.show()
Отредактировано для прозрачного диалога
использовать В onCreate диалогового класса
this.getWindow().setBackgroundDrawable(new ColorDrawable(0));
Приветствия:):)