ポップアップ内に textview を設定しようとしていますが、textview PopUp に入る文字列は SOAP Web サービス呼び出しからのものです。logCat と PopUp に文字列メッセージが表示されますが、何らかの理由でテキストビューを設定してメッセージを表示することができません。何が欠けていますか。
ありがとうございます。
public void wtfPopUp()
{
//
String PopYesNo;
String PopMsgAll = null;
//
////////////////////////FIRST CALL FOR YES-NO POP Status BEGIN
SoapObject Request = new SoapObject(NAMESPACEPopYesNo, METHOD_NAMEPopYesNo);
SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
soapEnvelope.dotNet = true;
soapEnvelope.setOutputSoapObject(Request);
HttpTransportSE ahtt = new HttpTransportSE(URLPopYesNo);
//////////////////////// SECOND CALL FOR POP MESSAGE BEGIN
SoapObject Request2 = new SoapObject(NAMESPACEAllPop, METHOD_NAMEAllPop);
// Request.addProperty("c_idid", "1");
SoapSerializationEnvelope soapEnvelope2 = new SoapSerializationEnvelope(SoapEnvelope.VER11);
soapEnvelope2.dotNet = true;
soapEnvelope2.setOutputSoapObject(Request2);
HttpTransportSE ahtt2 = new HttpTransportSE(URLAllPop);
//////////////////////// SECOND CALL FOR MESSAGE END
try
{
Log.d("myAppWtf", "at getPopUpAllTRY");
ahtt.call(SOAP_ACTIONPopYesNo, soapEnvelope);
SoapObject oResponse = (SoapObject)soapEnvelope.bodyIn;
PopYesNo = oResponse.getPropertyAsString(0).toString();
Log.d("myAppYesNo", oResponse.getPropertyAsString(0).toString());
if(PopYesNo.equals("PopUp_ON") )
{
try{
//////////////////////// SECOND CALL FOR MESSAGE BEGIN
ahtt2.call(SOAP_ACTIONAllPop, soapEnvelope2);
SoapObject oResponse2 = (SoapObject)soapEnvelope2.bodyIn;
PopMsgAll = oResponse2.getPropertyAsString(0).toString();
Log.d("myAppMSGGGG", oResponse2.getPropertyAsString(0).toString());
///////////////////////////// SECOND CALL FOR MESSAGE END
}
catch(Exception ms){
ms.printStackTrace();
}
// POP UP CODE
LayoutInflater li = LayoutInflater.from(context);
View promptsView = li.inflate(R.layout.popup_all, null);
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context);
// set prompts.xml to alertdialog builder
alertDialogBuilder.setView(promptsView);
// set dialog message
alertDialogBuilder
.setCancelable(false)
.setNegativeButton("Cool",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,int id) {
dialog.cancel();
}
});
// create alert dialog
AlertDialog alertDialog = alertDialogBuilder.create();
// show it
alertDialog.show();
// TEXT FOR POP UP MSG
txtViewPop = (TextView)findViewById(R.id.txtMsgAll);
txtViewPop.setText(PopMsgAll.toString());
// txtViewPop.setTextColor(Color.rgb(2, 39, 72));
}
}
catch(Exception ix)
{
ix.printStackTrace();
}
}