随笔分类 -  Android

上一页 1 2 3
android开发
JSONObject 顺序问题
摘要:项目返回格式是JSON,用JSONObject解析后发现顺序乱了,原因是JSONObject类用的是HashMap网上说改成改为LinkedHashMap就OK了,因为HaspMap是无序,LinkedHashMap是有序的。改这个要修改源代码,本人不知道怎么修改.自己写的解析JSON格式 代码如下 阅读全文
posted @ 2012-06-02 13:42 freexiaoyu 阅读(27359) 评论(1) 推荐(0)
JAVA unicode转换成中文
摘要:/** * * unicode 转换成 中文 * @param theString * @return */ public static String decodeUnicode(String theString) { char aChar; int len = theString.length(); StringBuffer outBuffer = new StringBuffer(len); for (int x = 0; x < len;) { aChar = theString.charAt(x++); if (aChar == '\\') { aCh... 阅读全文
posted @ 2012-06-02 11:51 freexiaoyu 阅读(12920) 评论(0) 推荐(0)
java.lang.OutOfMemoryError: bitmap size exceeds VM budget
摘要:功能介绍 用户拍照上传服务器 调用系统拍照功能public static Uri CameraStart(Activity activity,int requestcode) { Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); ContentValues values = new ContentValues(); Uri photoUri = activity.getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, valu... 阅读全文
posted @ 2012-05-22 21:08 freexiaoyu 阅读(756) 评论(0) 推荐(0)
android.os.NetworkOnMainThreadException 异常处理
摘要:项目是2.1开发 测试手机是android4.0时候提示android.os.NetworkOnMainThreadException异常出错误地方是访问网络的webservice有问题在网上找了半天说是用@Override protected void onCreate(Bundle savedI... 阅读全文
posted @ 2012-04-13 14:07 freexiaoyu 阅读(151505) 评论(11) 推荐(8)
安装 android apk 提示应用程序未安装
摘要:今天把包android 安装第一个版本是1.0.1 第二个版本是1.0.2 安装1.0.2的时候提示 "应用程序未安装"原因是签名不一样 默认签名是debug打包Android Tool” – “Export Signed Application Package” 时候选择Use existing keystore 选择下面路径路径是C:\Users\administratro\.android\debug.keystore 默认密码是android 在次打包升级 成功。也可以自制签名Android Tool” – “Export Signed Application Pa 阅读全文
posted @ 2012-04-06 09:32 freexiaoyu 阅读(4899) 评论(0) 推荐(0)
activity 接回返回值
摘要:今天做订单列表显示 点击某一项显示订单详细信息,在详细activity中用户可以选择取消订单(未支付的状态下)当用户取消订单后订单列表也要改变状态,原来最初做法是所加载绑定显示放在了onStart方法中这样只要加载页面就重新绑定不这样可以解决上面问题,但问题是这样每次都要重新加载大家都知道 GPRS流量那叫一个宝贵啊。所以改变当前做法利用activity的onActivityResult方法父activity方法如下startActivityForResult(intent, 0);跳转activity时候用这个@Override protected void onActivityResult 阅读全文
posted @ 2012-04-01 10:51 freexiaoyu 阅读(1102) 评论(0) 推荐(0)
android listview button和EditText
摘要:点击按钮 让listview 所有edittext 显示可编辑,并显示删除按钮if(null!=dataList && 0<dataList.size()){ for(int i=0;i<dataList.size();i++) { view=listView.getChildAt(i); EditText edittxt=(EditText)view.findViewById(R.id.txt_number); Button btnprice=(Button)view.findViewById(R.id.btn_price); if(null!=e... 阅读全文
posted @ 2012-03-29 18:39 freexiaoyu 阅读(1866) 评论(0) 推荐(0)
ActivityGroup 单击meun键没反应
摘要:在Activity里面加入了以下二个重写方法单击menu键没有任何反应,当在没有ActivityGroup页面一切正常显示@Override public boolean onCreateOptionsMenu(Menu menu) { // TODO Auto-generated method stub return super.onCreateOptionsMenu(Popup_menu.CreateOptionsMenu(menu)); } @Override public boolean onOptionsItemSelected(MenuItem item) { return ... 阅读全文
posted @ 2012-03-15 23:19 freexiaoyu 阅读(418) 评论(0) 推荐(0)
Android EditText 提示验证信息
摘要:在XML中设置android:drawableRight="@drawable/input_error"在代码中设置txtName.setCompoundDrawablesWithIntrinsicBounds(null, null, getResources().getDrawable(R.drawable.indicator_input_error), null);原来一直以为是txtName.setCompoundDrawables(null,null,getResources().getDrawable(drawable.indicator_input_error) 阅读全文
posted @ 2012-03-12 14:57 freexiaoyu 阅读(2727) 评论(1) 推荐(0)
android ListView 重写 SimpleAdapter 显示图片 异步加载及文字处理
摘要:simpleAdapter=new SimpleAdapter(context, mData, R.layout.goods_info, new String[]{"name","small_pic","price"}, new int[]{R.id.goods_name,R.id.goodsimg,R.id.goods_price}){ @Override public void setViewImage(final Im... 阅读全文
posted @ 2012-03-11 21:25 freexiaoyu 阅读(5213) 评论(8) 推荐(0)
conversion to dalvik format failed with error 1
摘要:从SVN得到新版本后提示conversion to dalvik format failed with error 1在eclipse开发Android项目时出现的很多问题都可以使用Project-->clean就OK了 阅读全文
posted @ 2012-02-22 11:44 freexiaoyu 阅读(263) 评论(0) 推荐(0)
android 运行模拟器提示 INSTALL_FAILED_INSUFFICIENT_STORAGE
摘要:意思是空间不够用 操作方法如下:选择你的应用,右键选择【run as】--【run configurations】--【target】--【Additional Emulator Command Line Options】(见下图),填写“-partition-size 256”原文地址:http://kb.cnblogs.com/a/2287500/ 阅读全文
posted @ 2012-02-08 19:34 freexiaoyu 阅读(2000) 评论(0) 推荐(0)
android调用 asp.net webservice
摘要:public SoapPrimitive detail; // 命名空间 private static final String NAMESPACE = "http://tempuri.org/"; //webservice地址 private static String WebServiceURL = "http://www.xxx.com/Services/xxx.asmx"; //此处是命名空间+方法名 private static String SOAP_ACTION = "http://tempuri.org/GetComapnyXM 阅读全文
posted @ 2012-02-06 16:36 freexiaoyu 阅读(1170) 评论(0) 推荐(0)
in order to continue installation,please close the following application;
摘要:在mac os x 10.6.8 安装 xcode4.0.1 提示 in order to continue installation,please close the following application;操作方法:应用程序-实用工具-活动监视器 找到iTunesHelper进程杀掉 阅读全文
posted @ 2011-12-29 17:02 freexiaoyu 阅读(722) 评论(0) 推荐(0)
提示找不到 C:\Program Files\VMware\dndlogs\dndlog.conf
摘要:提示找不到 C:\Program Files\VMware\dndlogs\dndlog.conf打到相应目录新创建一个记事本文件把文件名改为 dndlog.conf 就可以了。 阅读全文
posted @ 2011-12-27 22:36 freexiaoyu 阅读(767) 评论(0) 推荐(0)
不支持mac os x软件虚拟化。要运行mac os x,您需要主机VMware workstation支持硬
摘要:我用的是 lenovo V460 出现这个问题,要在bios 设置,进入bios后选择Configuration-->intel virtual Technology 选择Enabled,按F10保存退出 阅读全文
posted @ 2011-12-27 22:35 freexiaoyu 阅读(1336) 评论(0) 推荐(0)

上一页 1 2 3