I have to build a dialog that looks exactly the same across different devices regardless of the OS theme. At the moment, I created an AlertDialog and I call
Go for this
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
}
}
then use two line to show it from activity(May be onclickevent etc)
FullyscutomDialo hh=new FullyscutomDialo (this);
hh.show()
Edited For Transparent Dialog
use In onCreate of dialog class
this.getWindow().setBackgroundDrawable(new ColorDrawable(0));
Cheers :):)