setCustomAnimations()四个参数那个,前两个是fragment之间切换的动画,后两个对应出入栈动画。动画资源文件放在anim文件夹下,与activity的动画一致。
该方法必须在add,replace,remove方法前调用才有效
java.lang.SecurityException: Permission Denial: not allowed to send broadcast android.intent.action.MEDIAMOUNTED
解决:将Intent.ACTION_MEDIA_MOUNTED改为
ACTION_MEDIA_SCANNER_SCAN_FILE
Intent i = new Intent(Intent.ACTIONVIEW);
i.setDataAndType(Uri.parse("file://" + filepath,"application/vnd.android.package-archive");
i.addFlags(Intent.FLAGACTIVITYNEWTASK);
它的view.findview...然后一样的
使用自定义toast时,setText()方法调用的是系统默认布局的TextView,不可用,正确的方法是findview出自定义布局中的控件做相应的显示设置
得到堆栈中fragment的数量:mFragmentManager.getBackStackEntryCount()
完成进度条自定义
layer-list:将多个图片或上面两种效果按照顺序层叠起来
maxHeight属性
原文:http://jensen.blog.51cto.com/10505289/1711245