`
renzhe20092584
  • 浏览: 10491 次
  • 性别: Icon_minigender_1
最近访客 更多访客>>
社区版块
存档分类
最新评论
文章列表
  1.先声明后使用,有顺序的   2.全局(引进文件的时候就执行了) 全局变量  var layerTestSceneIdx = -1; 全局方法  var nextLayerTest = function () { };   nextLayerTest()调用 静态变量 Best.string = "dsdsds" 静态方法 Best.scene=function(){ }                   Best.scene();  调用   3. 对象  new xxx以后在调用里面得方法   (0)数组  var testNames ...

java调用cpp

  0.头文件引入 #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) #include<jni.h> #include"platform/android/jni/JniHelper.h"    //引不到JniHelper.h #include "JniHelper.h"                                 //编译不能通过 #include<android/log.h> #endif   1.传递一个int类型的参数   CaddCa ...

cpp调用java

    0.引进头文件 #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) #include<jni.h> #include"platform/android/jni/JniHelper.h"    //引不到JniHelper.h #include "JniHelper.h"                                 //编译不能通过 #include<android/log.h>   #endif   1.传递两参数 string类型并且 ...

真机调试

1.小米2调试 *#*#717717#*#*
1.头文件引入 #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) #include <jni.h> #include "platform/android/jni/JniHelper.h" #include <android/log.h> #endif   2.按钮事件代码 调用非静态方法的关键代码 org/test/ActivityTest ActivityTest类名、org/test/包名 调用playVedio方法是jni又创建了ActivityTest类的一个对象,通过这个 ...
1.文件引入   #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) #include <jni.h> #include "platform/android/jni/JniHelper.h" #include <android/log.h> #endif     2.按钮部分代码   void HelloWorld::menuCloseCallback(CCObject* pSender) { bool isHave; const char* msgRet; JniMeth ...

cocos2dx android

1.cocos2dx从android的sd卡里读取图片 http://cocos2d.cocoachina.com/bbs/forum.php?mod=viewthread&tid=1252 CCSprite* sprite = CCSprite::spriteWithFile("sd开路径")   获取sd卡路径 java代码 public static String getSDPath() { File file = Environment.getExternalStorageDirectory(); String sdPath = f ...

小知识

1.android模拟器管理 mac下 http://www.qings.com/web/index.php/blogs/study/809-android cd /Users/admin/Documents/android/android-sdk-macosx/tools ./android  

eclipse cocos2dx

 
参考网址  http://blog.csdn.net/stupidcodegenerator/article/details/8590821 http://www.himigame.com/android-game/725.html http://blog.sina.com.cn/s/blog_663b47050100hh94.html http://andilyliao.iteye.com/blog/494255   0.eclipse上编写C++ stringHelloWorld::init() {} //无return程序会崩溃     1.文件 CCFileUt ...

文件读写

  0.读写权限xml文件里 <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>   1.获得sd卡路径  http://www.eoeandroid.com/thread-169876-1-1.html   //sd卡操作 getAbsolutePath、ge ...

xml文件

 
  1.开头 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:paddingBottom="@dim ...

简单语句

1.隐藏控件 .setVisibility(View.INVISIBLE);  //View类方法 一般控件的父类都是View?   2.手动设定控件大小和位置 /* * 宽高确定了,给出距离上和左的距离,下和右直接写0,视频会根据实际情况自动缩放 *rect的设定:设定width, height优先级高、下面的设定top, left优先级高:左,下,右,上 */ RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(300, 300); params.setMargins(50, 50, ...

Others

 
1.移除控件 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity ...

database

  1.eclipse连接mysql乱码 设置utf8 mysql的my.ini default-character-set=utf8 alter database test1 character set utf8; alter table register convert to charset  utf8; eclipse编码设置成utf8 在mysql终端插入有汉字的数据失败,因为windows的编码方式gbk,而mysql设置成了utf8,可以用图形工具插入数据。 eclipse连接mysql报错 Unknown character set: 'utf8mb4'   设 ...
Global site tag (gtag.js) - Google Analytics