zgz345

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
上一页 1 ··· 7 8 9 10 11 12 13 14 15 下一页

2013年3月28日

摘要: 先判断是否打开: intflag=Settings.System.getInt(context.getContentResolver(),Settings.System.ACCELEROMETER_ROTATION,0); 打开关闭,关闭打开: 1开启 0关闭Settings.System.putInt(context.getContentResolver(),Settings.System.ACCELEROMETER_ROTATION,flag==1?0:1); 阅读全文
posted @ 2013-03-28 14:33 zonyZhang 阅读(360) 评论(0) 推荐(0) 编辑

2013年3月11日

摘要: 在Activity中,注册广播的一个Demo。总共分3步第一步:定义一个BroadcastReceiver广播接收类:view plainprivate BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver(){ @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if(action.equals(ACTION_NAME)){ Toast.makeText(Test.this, 阅读全文
posted @ 2013-03-11 19:57 zonyZhang 阅读(156) 评论(0) 推荐(0) 编辑

2013年3月4日

摘要: 今天使用Fragment的时候,出现了这个错误IllegalStateException: Can not perform this action after onSaveInstanceState:E/AndroidRuntime(12747):Causedby:java.lang.IllegalStateException:CannotperformthisactionafteronSaveInstanceStateatandroid.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1314)at 阅读全文
posted @ 2013-03-04 12:25 zonyZhang 阅读(51647) 评论(1) 推荐(1) 编辑

2013年2月19日

摘要: 在拨号界面按 *#*#717717#*#* 自动就开启了。会弹出一个 Diag USB port enable。然后adb devices就可以找到设备 阅读全文
posted @ 2013-02-19 10:51 zonyZhang 阅读(362) 评论(0) 推荐(0) 编辑

2013年1月29日

摘要: 首先我们要了解,Ubuntu 的 Dash 里所有程序都是在 /usr/share/applications 中的,所以我们的思路很简单——建一个类似于“快捷方式”一样的东西扔进去就好了。所以第一步自然是打开终端,输入sudo gedit eclipse.desktop #创建一个eclipse.d... 阅读全文
posted @ 2013-01-29 10:13 zonyZhang 阅读(3383) 评论(0) 推荐(0) 编辑

2013年1月21日

该文被密码保护。 阅读全文
posted @ 2013-01-21 21:46 zonyZhang 阅读(4) 评论(0) 推荐(0) 编辑

2013年1月19日

摘要: VisualBox之所以在Linux上比传统的VMware快得多,关键一点就是它和Linux内核的结合比较紧密,这也是开源的优点。不过Linux内核更新很频繁,每次更新内核后启动VirtualBox都会提示:VirtualBox kernel driver not installed. The vboxdrv kernel module was either not loaded or /dev/vboxdrv was not created for some reason. Re-setup the kernel module by executing ‘/etc/init.d/vboxdr 阅读全文
posted @ 2013-01-19 11:06 zonyZhang 阅读(177) 评论(0) 推荐(0) 编辑

2013年1月11日

摘要: 点击赞时弹出+1向上弹出动画public class applaudAnimation extends Activity implements OnClickListener { private Button button; private TextView textView; private android.view.animation.Animation animation; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.lay.. 阅读全文
posted @ 2013-01-11 17:46 zonyZhang 阅读(4981) 评论(0) 推荐(4) 编辑

2013年1月9日

摘要: 1. 安装jdk我下载的jdk是bin格式的,直接运行解压,得到一个文件夹。这个文件夹作为jdk的安装目录,可以拷贝到任意目录。然后配置环境变量~/.bashrc,在最后添加:export JAVA_HOME=<jdk install dir>export JRE_HOME=$JAVA_HOME/jreexport PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH重启机器。2. 安装eclipse直接将下载的eclipse压缩包解压到任意目录,作为eclipse的安装目录。3. 运行eclipse进入eclipse的安装目录,双击eclipse,出现以 阅读全文
posted @ 2013-01-09 13:40 zonyZhang 阅读(306) 评论(0) 推荐(0) 编辑

2013年1月8日

摘要: Bitmap bmp = BitmapFactory.decodeFile(pePicFile.getAbsolutePath() + "/"+info.getImage());上面参数是我将要读取的图片文件及路径,当文件较小时,程序能够正常运行,但是当我选择一张大图时,程序立刻蹦出了java.lang.OutOfMemoryError: bitmap size exceeds VM budget的OOM错误!在android设备上(where you have only 16MB memory available),如果使用BitmapFactory解码一个较大文件,很大 阅读全文
posted @ 2013-01-08 15:31 zonyZhang 阅读(18359) 评论(0) 推荐(0) 编辑

上一页 1 ··· 7 8 9 10 11 12 13 14 15 下一页