摘要:要上传文件到后台的php服务器,服务器能收到中文,手机发送过去,却只能收到一堆转了UTF-8的编码(就是要decode后才是中文的编码).android这边上传文件通常是用stream方式上传的,用MultipartEntity这个开源包来上传了会有编码问题.首先设置字段的编码//CustomMultiPartEntity entity=new CustomMultiPartEntity(HttpMultipartMode.BROWSER_COMPATIBLE,null,Charset.forName("UTF-8"),listener);//不需要构造函数,只要对应的文字
阅读全文
03 2014 档案
摘要:修改host185.31.17.184 github.global.ssl.fastly.net207.97.227.239http://github.com65.74.177.129http://www.github.com207.97.227.252http://nodeload.github.com207.97.227.243http://raw.github.com204.232.175.78http://documentcloud.github.com204.232.175.78http://pages.github.com
阅读全文
摘要:(1)去掉EditText的背景颜色android:background="@null"(2)ListView 修改某行的值,因为一些功能逻辑,需要修改ListView某行的值,那么就可通过下面的方法,获取到对应的listView的某行,然后修改。private void updateView(in...
阅读全文
摘要:在ListView的Adapter中去直接获取传入View的LayoutParams是会报空指针异常的,唯一的方法是在xml中嵌套布局一层LinearLayout 然后再在Adapter的getView中去动态改变即可,关键代码: if (view == null) { view = getActivity().getLayoutInflater().inflate( R.layout.subject_list_item, null);...
阅读全文
摘要:Historically, programmers always designed computer interfaces in terms of pixels. For example, you mightmake a field 300 pixels wide, allow 5 pixels of spacing between columns, and define icons 16-by-16 pixels in size. The problem is that if you run that program on new displays with more and more do
阅读全文