After I have put in AndroidManifest.xml:
<application
android:allowBackup="true"
android:icon="@drawable/icon"
android:label="@string/app_name"
android:theme="@style/myTheme" >
and in styles.xml:
<style name="myTheme" parent="android:Theme">
<item name="android:background">@color/BG</item>
<item name="android:windowNoTitle">true</item>
</style>
The background color of every dialog alert became the color BG, how can I put the default background without removing that?
DialogInterface.OnClickListener dialogClickListener=new DialogInterface.OnClickListener()
{
@Override
public void onClick(DialogInterface dialog, int which)
{
switch(which)
{
case DialogInterface.BUTTON_POSITIVE:
//Some code
break;
case DialogInterface.BUTTON_NEGATIVE:
//Some code
break;
}
}
};
AlertDialog.Builder builder=new AlertDialog.Builder(this);
builder.setMessage("Are you sure? (Reset)").setPositiveButton("Yes", dialogClickListener).setNegativeButton("No", dialogClickListener).show();