NCF参数化建筑论坛

标题: 【教学】processing 如何做android 程序 [打印本页]

作者: panhao1    时间: 2011-10-14 23:31
标题: 【教学】processing 如何做android 程序
本帖最后由 panhao1 于 2011-10-18 13:28 编辑 我主要讲下用p5 1.51版做 android 程序的步骤 1把android sdk 和那个蛋疼的虚拟器 都安装好 如果直接用p5 1.51的android mode虚拟器其实是自动生成的 2写代码 比较简单的例子是 void setup() { size(480,800);也可以是size(screenWidth, screenHeight); smooth(); noStroke(); fill(255); rectMode(CENTER); //This sets all rectangles to draw from the center point }; void draw() { background(#FF9900); rect(width/2, height/2, 150, 150); }; 然后事件神马的要自己添加 神马多点触摸啊 神马键盘事件啊
作者: panhao1    时间: 2011-10-14 23:36
本帖最后由 panhao1 于 2011-10-14 23:44 编辑 这是虚拟器[attach]22194[/attach] 极其蛋疼 经常崩 还有用phone或是ipad调试 那个很不错 我使用moto的调试的 首先装驱动 然后直接选择外部设备运行 就可以用了 这是phone调试 [attach]22195[/attach]
作者: panhao1    时间: 2011-10-15 00:40
import android.view.MotionEvent; float x1,y1,x2,y2,press1,press2; int pointNum; void setup() { size(screenWidth, screenHeight); stroke(0); } void draw() { background(240); fill(press1*200,0,0); ellipse(x1,y1,press1*300,press1*300); fill(0,press2*200,0); ellipse(x2,y2,press2*300,press2*300); } boolean surfaceTouchEvent(MotionEvent event) { x1=event.getX(0);x2=event.getX(1); y1=event.getY(0);y2=event.getY(1); press1=event.getSize(0); press2=event.getSize(1); return super.surfaceTouchEvent(event); }
作者: musofan    时间: 2011-10-15 10:56
提示: 作者被禁止或删除 内容自动屏蔽
作者: uranium    时间: 2011-10-15 12:16
这是什吗。。。略显高级了 吧
作者: rainfish    时间: 2011-10-15 12:28
好高级啊。。。
作者: mqcjackson    时间: 2011-10-17 11:41
APP的编程吗?膜拜之~~~
作者: yinlu1320    时间: 2011-11-2 16:12
什么都不说 服了!!
作者: 赫赫    时间: 2012-2-7 11:42
请问怎么选择外部设备运行啊
作者: Neo09    时间: 2012-2-12 15:45
门外看热闹的
作者: miaomiao    时间: 2012-4-3 05:09
楼主 虚拟器的功能是模仿传感器吗?如果有传感器的话还需要这个虚拟器吗
作者: porther    时间: 2012-4-24 18:32
http://www.creativeapplications. ... g-android-tutorial/
作者: 答案永恒    时间: 2015-10-24 01:44
为什么我跑processing 虚拟器一直没反应,processing一直提示debug?
作者: 横穿马路    时间: 2016-7-6 20:21
谢谢分享,回复看看

作者: DONNA    时间: 2016-7-6 21:43
太好了,学习中,支持一下。




欢迎光临 NCF参数化建筑论坛 (http://www.ncf-china.com/) Powered by Discuz! X3.2