編輯:關於Android編程
package net.zmqc.service; import org.ksoap2.SoapEnvelope; import org.ksoap2.serialization.SoapObject; import org.ksoap2.serialization.SoapSerializationEnvelope; import org.ksoap2.transport.HttpTransportSE; public class InfoWebService { public static String soapCallWebService(double p_x,double p_y) { String result = "無數據出現!!!!!!!!"; String url = "http://127.0.0.1:8080/InfoGpsService/InfoServicePort"; String nameSpace = "http://service.zmqc.net/"; //調用的方法 String methodName = "getInfoList"; //創建httpTransportSE傳輸對象 HttpTransportSE ht = new HttpTransportSE(url); ht.debug = true; //使用soap1.1協議創建Envelop對象 SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); //實例化SoapObject對象 SoapObject request = new SoapObject(nameSpace, methodName); //設置參數,參數名不一定需要跟調用的服務器端的參數名相同,只需要對應的順序相同即可 request.addProperty("arg0", p_x+""); request.addProperty("arg1", p_y+""); envelope.bodyOut = request; try { // web service請求 ht.call(null, envelope); // 獲取返回的數據 result = envelope.getResponse().toString(); } catch (Exception e) { // TODO: handle exception e.printStackTrace(); result = "連接出錯了"; } return result; } }
一、Fragment介紹fragment在3.0被引入以後,項目使用fragment越來越多,特別是主界面是底部tab頁點擊切換更換內容,當然啦, Fragment 在項
GradientDrawable可以在res/drawable目錄下以xml文件用標簽來定義。看看官方文檔給出的xml定義說明吧。
FrameLayout(幀布局),LinearLayout (線性布局),AbsoluteLayout(絕對布局),RelativeLayout(相對布局),TableL
開始說正題。先上上一次的效果圖,其展現出的效果,是建造者模式的思想精髓。關注建造產品的共性,其細節的個性則讓其自由定義(是否顯示,顯示的內容);今天要做的PopupVie