开发一个Android的便捷库,大家觉得怎么样? 库httpandroid开发 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 原来曾经做过把Message消息中心,Network网络交互以及一些常用的工具类封装成jar供程序调用,一定程度上是可以减少工作量的。但是你会发现……这个jar会越变越大…… 有道理。网络部分使用起来感觉不是很麻烦,毕竟Android提供的库易用性还是不错的。关键是与UI关联部分,比较繁琐和麻烦。可以考虑从这个角度出发,提供一些自动关联的函数库来,效果会更好些。 根据大家的意见,我觉得,没有必要去使用xml文件来描述了。直接提供一个库就可以了。比如,我可以在Activity onCreate的时候做这些事情:HttpRequest req = new HttpRequest("http://localhost/hellowrold.xml");req.bind("//message", findViewById(R.id.text), "android:text");可以静态的绑定一个图片HttpRequest.bind("http://localhost/icon.png", findViewById(R.id.image), "android:src");如果发送一个postHttpRequest post_req = new HttpRequest("http://localhost/post.php", HttpRquest.METHOD_POST);post_req.setEntry("username", findViewById(R.id.edit_username), "android:text");post_req.setEntry("password", findViewById(R.id.edit_password), "android:text");post_req.setSubmit(findViewById(R.id.btn_submit)); 使用JDK1.7 eclipse报错 Android requires compiler compliance level 5.0 or 6.0. Android软件安装失败 android listView下拉刷新特效 如何获取系统当前壁纸图片?求指点! 关于findViewById引入的问题 求助Android中的C程序的内存空间分配的问题 Android 利用KSoap调用WebService的问题 在线等 急急急 手机上支持ASP.NET 运行程序没有结果 关于如何访问已root设备的/data目录 android怎么添加widget ViewGroup+gridview不刷新
req.bind("//message", findViewById(R.id.text), "android:text");
可以静态的绑定一个图片HttpRequest.bind("http://localhost/icon.png", findViewById(R.id.image), "android:src");
如果发送一个postHttpRequest post_req = new HttpRequest("http://localhost/post.php", HttpRquest.METHOD_POST);
post_req.setEntry("username", findViewById(R.id.edit_username), "android:text");
post_req.setEntry("password", findViewById(R.id.edit_password), "android:text");
post_req.setSubmit(findViewById(R.id.btn_submit));