使用布局文件创建菜单:(多级菜单)
在res下创建文件夹menu(如果已经有啦就不用再创建了)
在该menu文件夹下创建XML文件这里我把文件名命名为menu
在创建的menu.XML文件中
写入:
android:id="@+id/file"
android:title="file"/>
...
分类:
移动开发 时间:
2015-08-21 09:29:15
阅读次数:
352
安卓应用一般都害怕自己被杀,内存占用高是被杀的重要原因之一,所以大家都想尽各种招数应对,但效果都一般。...
分类:
移动开发 时间:
2015-08-21 09:28:46
阅读次数:
2322
原文出处:www.cnblogs.com/chsry非常感谢博客园的各位,按照你们的博文,还有利用百度和谷歌逐渐建立了android的开发环境,只是给自己备份参考查看,看过的人可以忽略这篇文章。本文章大部分参考了:http://www.cnblogs.com/zoupeiyang/p/4034517...
分类:
移动开发 时间:
2015-08-21 09:23:41
阅读次数:
257
ZoomButton控件是Android提供的一个缩放按钮,此控件的类ZoomButton继承自ImageButton类,有人会说ZoomButton能够实现的功能,用ImageButton不是都能够实现吗?下面我们来说一个ZoomButton和ImageButton区别,在功能上两者都能实现缩放功...
分类:
移动开发 时间:
2015-08-21 09:24:09
阅读次数:
149
//// Weibo.swift// UITableViewCellExample//// Created by XUYAN on 15/8/15.// Copyright (c) 2015年 com.world. All rights reserved.//import Foundatio...
分类:
移动开发 时间:
2015-08-21 09:24:07
阅读次数:
573
本文转载至http://blog.csdn.net/lixing333/article/details/7782539iosiphone网络filter工具我在另外一篇博客里,介绍了一款比Wireshark更轻量、更好用的软件:Charles:http://blog.csdn.net/lixing3...
分类:
移动开发 时间:
2015-08-21 07:02:55
阅读次数:
175
Xcode 7 创建新项目用到 UIWebView 发送请求时,报下面的错:“App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exc...
分类:
移动开发 时间:
2015-08-21 07:01:35
阅读次数:
216
本文转载至http://my.oschina.net/sunqichao/blog?disp=2&p=3虽然iOS 5.0版本之后加入了ARC机制,由于相互引用关系比较复杂时,内存泄露还是可能存在。所以了解原理很重要。这里讲述在没有ARC的情况下,如何使用Instruments来查找程序中的内存泄露...
分类:
移动开发 时间:
2015-08-21 06:57:41
阅读次数:
149
iOS单元测试(UnitTest)在iOS中进行测试可以选择XCTest和GHUnit测试两种框架。XCTest集成在Xcode中,而GHUnit则是一个著名的开源框架。所谓的单元测试,就是指把程序分割成若干个小单元,对每个小单元单独进行测试。所谓的小单元,可以是一个方法,一个UI控件,一次简单的事件等等。本文不重点讨论测试的意义,所以就选择最简单的加法函数,介绍iOS如何进行单元测试。XCTest...
分类:
移动开发 时间:
2015-08-21 01:54:05
阅读次数:
258
BridgeAsync batched bridge used to communicate with the JavaScript application.1. 寻找起点-RCTRootView在React-Native Based的工程中, 我们看到在AppDelegate.m文件中有以下代码:...
分类:
移动开发 时间:
2015-08-21 01:51:21
阅读次数:
218
Problem DescriptionConsider a positive integer X,and let S be the sum of all positive integer divisors of 2004^X. Your job is to determine S modulo 29...
分类:
移动开发 时间:
2015-08-21 01:40:15
阅读次数:
198
各大牛逼讲师的经典Jquery精品视频教程,大放送啦!!!(包括手机移动端JqueryWbd开发)!!!【1】jQuery手机端开发视频教程篇【10】扬中科JQuery基础教程.zip【15】Jquery基础视频教程【8】炫丽效果教你做之jQuery实战【3】曹鹏老师jQuery视频教程 下载链.....
分类:
移动开发 时间:
2015-08-21 01:39:03
阅读次数:
159
添加-encodinggbk即可编译成功javac-encodinggbk-cp.:activemq-all-5.11.1.jarJMSConsumer.javalinux下独立运行java程序http://os.51cto.com/art/201104/256055.htm
分类:
移动开发 时间:
2015-08-21 00:30:30
阅读次数:
1595
#include<stdio.h>
#include<assert.h>
#include<stdlib.h>
voidreplace_space(char*str)
{
assert(str);
char*pstr=str;
intspace=0;
intlen=0;
intnewlen=0;
while(*str)
{
if(*str==‘‘)
space++;
len++;
str++;
}
newlen=len+space..
分类:
移动开发 时间:
2015-08-21 00:29:11
阅读次数:
316
/**
* 保存图片到指定文件夹
*
* @param bmp
* @param filename
* @return
*/
private boolean saveBitmapTofile(Bitmap bmp, String filename) {
if (bmp == null || filename == null)
return false;
C...
分类:
移动开发 时间:
2015-08-21 00:18:12
阅读次数:
160
BufferedInputStream in = new BufferedInputStream(
new FileInputStream(new File(path)));
BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = false;
options.in...
分类:
移动开发 时间:
2015-08-21 00:16:16
阅读次数:
141
1、将Bitmap对象读到字节数组中
ByteArrayOutputStream baos = new ByteArrayOutputStream();
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, baos);
byte[] datas = baos.toByteArray();
2、将字节数组转为Bitmap对象
byte[] ...
分类:
移动开发 时间:
2015-08-21 00:17:36
阅读次数:
255