目前我有一个空检查,它显示和警报(它运行正常)但是我希望这个警报显示为黑色背景,而不仅仅是警报对话框。
我已经尝试删除finish();
,但它只是显示警报及其后面的先前布局 - 离开它会导致警报出现在用户的主屏幕上 - 我的问题是:如何修改它以显示带有简单黑色背景的警报反而?
StartActivity.java
源代码片段:
} else {
// ICS and UP
if (isMDNPresent) {
//start SaveMDN activity
Intent i = new Intent(StartActivity.this, SaveMDN.class);
startActivity(i);
finish();
} else {
//start Update Activity
Intent i = new Intent(StartActivity.this,
UpdateActivity.class);
startActivity(i);
finish();
}
}
SaveMDN.java
源代码片段:
public class SaveMDN extends Activity {
EditText saveMDN;
TextView enterMdn;
Button save;
public static String mdn = "";
int version;
String temp;
TelephonyManager tm;
AlertDialog mErrorAlert = null;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
if (tm.getLine1Number()== null){
showAlert(getString(R.string.insert_sim_dialog));