Android应用源码WebService ksoap2调用火车/列车时刻表信息
2015-05-08 10:05:37  By: shinyuu

本Demo是一个基于安卓的app查询火车列车时刻表的小项目源码、使用 http://webservice.webxml.com.cn/WebServices/ TrainTimeWebService.asmx 接口提供的列车数据、结合ksoap2进行数据解析、可以查询两站之间的车次信息和指定车次的到站信息

火车时刻查询


onCreate方法

super.onCreate(savedInstanceState); 
setContentView(R.layout.activity_main); 

train_textView2 = (TextView) findViewById(R.id.train_textView2); 
train_textView1 = (TextView) findViewById(R.id.train_textView1); 
// 查询
train_button1 = (Button) findViewById(R.id.train_button1); 
train_chaxun = (Button) findViewById(R.id.train_chaxun); 

// 车次查询
train_checi = (Button) findViewById(R.id.train_checi); 

// 始发站
train_editText1 = (EditText) findViewById(R.id.train_editText1); 
// 抵达站
train_editText2 = (EditText) findViewById(R.id.train_editText2); 
train_button1.setOnClickListener(this); 
train_checi.setOnClickListener(this); 
train_chaxun.setOnClickListener(this); 


以上是最基本的调用方法、代码量很多、这里就不一一贴了、有兴趣的可以下载源代码Demo看一下、可以体验一下

源代码下载链接: http://dwtedx.com/download.html?bdkey=s/1eQzXIUm 密码: eh7w

若资源对你有帮助、浏览后有很大收获、不妨小额打赏我一下、你的鼓励是维持我不断写博客最大动力

想获取DD博客最新代码、你可以扫描下方的二维码、关注DD博客微信公众号(ddblogs)

或者你也可以关注我的新浪微博、了解DD博客的最新动态:DD博客官方微博(dwtedx的微博)

如对资源有任何疑问或觉得仍然有很大的改善空间、可以对该博文进行评论、希望不吝赐教

为保证及时回复、可以使用博客留言板给我留言: DD博客留言板(dwtedx的留言板)

感谢你的访问、祝你生活愉快、工作顺心、欢迎常来逛逛


快速评论


技术评论

DD记账
top
+