@Override
protected void onPostExecute(HashMap<String,String> result) {
super.onPostExecute(result);
dialog.dismiss();
if(!result.equals(null) || result.size() != 0 || !result.isEmpty() ){
if(result.get("ID").toString().equalsIgnoreCase("0")){
tvMandatory.setText(result.get("notification"));
tvMandatory.setTextSize(20);
tvMandatory.setTextColor(Color.RED);
// tvHeader.setText(result.get("headerText"));
}
}else if(result.get("ID").toString().equalsIgnoreCase("1")){
tvMandatory.setText(result.get("notification").toString());
// tvMandatory.setText("Invalid Userdata");
// tvMandatory.setTextColor(Color.RED);
}else{
Toast.makeText(getApplicationContext(), "Please try again later", Toast.LENGTH_SHORT).show();
}
// filterdata();
}
}Add a code snippet to your website: www.paste.org