Quantcast
Channel: 《Android常用工具类》的评论
Browsing latest articles
Browse All 33 View Live

作者:果汁

HttpClient加HttpGet传递带中文字符的参数是可以的,但URLConnection的话不行,URL中文字符必须经过编码

View Article



作者:Trinea

嗯,HttpClient属于apache的,在这方面比较专业,URLConnection是java的。不过google对URLConnection维护力度会更大点,而且HttpClient能做的URLConnection基本也都能做

View Article

作者:levis

楼主 你好 在HttpCache例子中,在哪个地方设置编码方式,如果服务端返回gbk的数据,protected void onPostGet方法中的httpResponse.getResponseBody();新人 诚心请教 谢谢。

View Article

作者:Trinea

HttpRequest request = new HttpRequest("<a href="http://www.baidu.com/" rel="nofollow">http://www.baidu.com/</a>");String charset = "utf-8";request.setRequestProperty("Accept-Charset",...

View Article

作者:levis

楼主 谢谢。按照你的方式进行设置了,httpCache.httpGet(request, new HttpCacheListener() {但是服务端返回的汉字依然是乱码,还有其他地方需要注意的吗,这个缓存机制涉及到的数据库不用设置编码方式吗?

View Article


作者:levis

请求头Accept-Charset 是告诉服务器,客户端提交的表单可能使用的编码。在这里设置这个属性,是否恰当。如下是服务器返回的http头消息。。< HTTP/1.1 200 OK< Server: nginx/1.5.7< Date: Sun, 22 Dec 2013 08:50:37 GMT< Content-Type:...

View Article

作者:Trinea

数据库不用设置编码。你用浏览器访问看正常情况下,浏览器请求头中的编码格式是什么,然后按照上面设置下charset

View Article

作者:levis

找到了 在HttpUtil类中的public static HttpResponse httpGet(HttpRequest request)我增加了一个方法,多加个编码参数,将里面的input = new BufferedReader(new...

View Article


作者:Trinea

赞,你可以github提交一下,我帮你merge一下

View Article


作者:Android常用工具类【转发】 |别路寻忆

[...] 本文转发自http://www.trinea.cn/android/android-common-utils/ [...]

View Article

作者:博客推荐 - 移动端开发 - 开发者

[...] Trinea [...]

View Article

作者:小鱼儿

东西不错,只是内容工具类稍少

View Article

作者:Trinea

内容工具类具体指的是?

View Article


作者:小鱼儿

说简化了,就是说工具类的内容方面还不够多。算是提供了个基础把。

View Article

作者:Trinea

嗯,这块大都跟我目前接触的项目有关,暂时只会慢慢添加了

View Article


作者:szu_papa

感觉有点奇怪啊,HttpResponse和HttpRequest跟SDK提供的同名?是把源码改了吗

View Article

作者:szu_papa

为什么都用HttpURLConnection?安卓下不是推荐使用HttpClient、HttpPost、HttpGet这些SDK下自带的org.apache.http包下的类吗,而不是java.net下的,我看很多新出的书都是用org.apache.http包下的

View Article


作者:Trinea

不是,自己写的一个简单实现

View Article

作者:Trinea

推荐用HttpURLConnection,HttpClient、HttpPost、HttpGet这些都属于apacha的。当然具体哪个更好也没有明确的对比分析。

View Article

作者:szu_papa

好的,谢谢分享

View Article

作者:黄国华

您好,我是初学者,有个问题想请教您,我在项目中引入您的jar类库后,编译后的app为啥手机管家提示有米迪广告插件呢

View Article


作者:Trinea

common那个库里面是没广告的,demo那个app是有google的广告

View Article


作者:黄国华

哦哦 我也是觉得应该没有广告代码,应该是腾讯管家误报了吧 我下载了最新的类库,直接在一个简单的Demo(空白的)里面引用类库,然后打包后就检测到有米迪的广告,很奇怪,看来只能是误报了把

View Article

作者:舞影凌风

不错,赞一个 <img src="http://img.t.sinajs.cn/t35/style/images/common/face/ext/normal/6e/panda_org.gif" />

View Article

作者:优淘TAE系统

顶呀…好东东,可以省很多时间去写代码了. 哈!!!!

View Article


作者:ifleave

transformIntArray(int[] source) Integer 数组转换为int数组是不是应该是 int 数组转换为Integer数组

View Article

作者:Trinea

嗯,直接看源码就好

View Article

作者:oxkey

好东西。。。伸手手下了。。

View Article

作者:一枝小眼

好东西啊,感谢大神

View Article



作者:Joe

I’ve been having issues with a couple of assholes hacking my accounts. I work half the day construction they dont have jobs. I’d be willing to pay for them to be removed from my shit and taught a...

View Article
Browsing latest articles
Browse All 33 View Live




Latest Images