随笔分类 -  XE5 Android

摘要:不多讲,直接上代码了。代码来自网络http://files.cnblogs.com/nywh2008/Bluetooth_LEDs_android.rar 阅读全文

posted @ 2013-11-13 21:33 至今 阅读(1854) 评论(1) 推荐(1) 编辑 |

摘要:unit Android.JNI.Toast;// Java bridge class imported by hand by Brian Long (http://blong.com)interface{$IFDEF ANDROID}uses Androidapi.JNIBridge, Androidapi.JNI.JavaTypes, Androidapi.JNI.GraphicsContentViewText;{$ENDIF}{$IFDEF ANDROID}type TToastLength = (LongToast, ShortToast); JToast = interfa... 阅读全文

posted @ 2013-11-13 21:21 至今 阅读(2292) 评论(0) 推荐(0) 编辑 |

摘要:直接上代码:unit OpenViewUrl;interface // URLEncode is performed on the URL// so you need to format it protocol://pathfunction OpenURL(const URL: string; const DisplayError: Boolean = False): Boolean;implementationuses IdURI, SysUtils, Classes, FMX.Dialogs,{$IFDEF ANDROID} FMX.Helpers.Android, Androida... 阅读全文

posted @ 2013-11-06 16:12 至今 阅读(1351) 评论(0) 推荐(1) 编辑 |

摘要:如何设计并使用FireMonkeyStyleFireMonkey使用Style来控制控件的显示方式。每个控件都有一个StyleLookup属性,FireMonkey就是通过控件的这个属性来在当前窗体的StyleBook控件中查找匹配的Style,如果找到了这个Style,那么控件就使用这个Style来显示。StyleBook是一个Style的集合,里面可以有窗体的Style,按钮的Style,文本框的Style,等等。每个Style其实就是一个控件,像常用到的TLayout,TRectangle等等,只是这个控件需要设置它的StyleName。比如我在StyleBook中设计这样一个按钮:l 阅读全文

posted @ 2013-11-05 13:40 至今 阅读(3887) 评论(0) 推荐(1) 编辑 |

摘要:以下代码能监控到以下几个事件: FinishedLaunching BecameActive WillBecomeInactive EnteredBackground WillBecomeForeground WillTerminate LowMemory TimeChange OpenURLunit Unit11;interfaceuses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graph.. 阅读全文

posted @ 2013-10-28 21:48 至今 阅读(1795) 评论(2) 推荐(0) 编辑 |

摘要:C:\Users\Public\Documents\RAD Studio\12.0\Samples\FireMonkeyMobile\ListView路径下有两个dpk,装完后listview也能实现listbox的效果了procedure TFormMain.FillListBox;var // item:TMetropolisUIListBoxItem; // listitem:TListboxItem; p: PpatientData; LItem: TListViewItem; i: Integer;begin ListViewPatient.Items.Clear; i... 阅读全文

posted @ 2013-10-15 15:12 至今 阅读(6748) 评论(9) 推荐(1) 编辑 |

摘要:下载style 然后在deployment里添加进去http://files.cnblogs.com/nywh2008/styles.rar在AndroidManifest.template.xml 中增加段儿(粗体部分): 阅读全文

posted @ 2013-10-12 15:48 至今 阅读(2525) 评论(1) 推荐(0) 编辑 |

摘要:实现下拉菜单式的效果,本代码是国外的网站上下载的。。,不是原创。源码下载地址 : http://files.cnblogs.com/nywh2008/popumenu.rar 阅读全文

posted @ 2013-10-10 14:01 至今 阅读(1240) 评论(4) 推荐(0) 编辑 |

摘要:unit Androidapi.JNI.Network;interfacefunction IsConnected: Boolean;function IsWiFiConnected: Boolean;function IsMobileConnected: Boolean;implementationuses System.SysUtils, Androidapi.JNIBridge, Androidapi.JNI.GraphicsContentViewText, Androidapi.JNI.JavaTypes, FMX.Helpers.Android;type JConnect... 阅读全文

posted @ 2013-10-07 21:07 至今 阅读(1763) 评论(0) 推荐(1) 编辑 |

摘要:uses AndroidAPI.JNI.GraphicsContentViewText, AndroidAPI.JNI.JavaTypes, AndroidAPI.JNI.OS; function BatteryPercent(const aContext: JContext): Integer; var filter: JIntentFilter; battery: JIntent; level, scale: Integer; begin filter := TJIntentFilter.Create; filter.addAction(TJIntent... 阅读全文

posted @ 2013-10-05 22:06 至今 阅读(1486) 评论(0) 推荐(0) 编辑 |

摘要:本文摘自 http://redboy136.blog.163.com/blog/static/107188432201381872820132要发布android应用,必须做签名的。看一下具体的操作步骤: 1.进入Project-Options: 2.打开Options窗口,选择Provisioning,在这里,可以为目标平台选择签名文件,也可生成新的签名文件。2.1 选择目标平台,可以为dubug或release设置签名,默认情况下,debug签名文件是存在的,可不用设置,这也是我们建立一个新的Android项目,就可以不用签名就能在模拟器上跑的原因,真正发布时,是必须做签名的。2.2,为发 阅读全文

posted @ 2013-10-05 17:23 至今 阅读(1091) 评论(2) 推荐(0) 编辑 |

摘要:转自: http://bbs.2ccc.com/topic.asp?topicid=438595首先感谢iny的绿色版,因为我的精简Win7 32位安装原版镜像4.63G过程正常,但是编译出错,后来用绿色版一切正常。 由于iny绿色版自带的SDK和NDK都是原版ISO里面提取的非最新版本,所以下载更新里面的文件后,绿色程序不能配置安卓环境。所以这里从头到尾说一次安装方法,成功人士或者完全版人士请略过。一、下载以下文件:1:最新的JDK--> http://www.oracle.com/technetwork/java/javase/downloads/index.html-->;J 阅读全文

posted @ 2013-09-29 15:20 至今 阅读(2500) 评论(0) 推荐(0) 编辑 |

摘要:listbox实现以下效果:\关键代码,采用数据集的方式type PpatientData=^RpatientData; RpatientData= record patient_id:string; admiss_times:Integer; inpatient_no:string; name:string; sex:string; bed_no:string; nurse_level:string; diag:string; end; ... 阅读全文

posted @ 2013-09-29 14:57 至今 阅读(2164) 评论(1) 推荐(0) 编辑 |

摘要:经过测试,将sqlserver里的字段由varchar 或者char 改为 nvarchar 或者nchar然后在手机端的clientdataset 增加字段的时候数据类型选择widestring如图 阅读全文

posted @ 2013-09-26 21:27 至今 阅读(1461) 评论(8) 推荐(1) 编辑 |

摘要:TTS是Text To Speech的缩写,即“从文本到语音”,是人机对话的一部分,让机器能够说话。以下代码实现xe5 开发的文本转语音的方法和访问蓝牙一样,这里用javaclass的接口实现接口声明部分:{*******************************************************}{ }{ CodeGear Delphi Runtime Library }{ Copyright(c) 2013 Jeff O... 阅读全文

posted @ 2013-09-25 13:03 至今 阅读(2741) 评论(3) 推荐(0) 编辑 |

摘要:C:\Users\Public\Documents\RAD Studio\12.0\Samples\FireMonkeyMobile例子中的绑定方式如下图:1、拖拽一个listview到界面上,然后用绑定向导2、选择listview3、选择tprototypebindsource4、点击增加5、选择前九个类型6、在绑定设计界面将 colorname1 拖拽至 item.text 就完成了帮点显示颜色名称了如图7、imagelist 如图:选择listview的itemapperance属性为 imagelistitem然后在绑定向导里 将contactbitmap1 拖拽至 itm.bitma 阅读全文

posted @ 2013-09-24 16:57 至今 阅读(1267) 评论(2) 推荐(0) 编辑 |

摘要:摘自:http://blogs.embarcadero.com/vsevolodleonov/2013/09/19/are-you-asking-about-app-size-by-delphi-for-android/You’re asking about app size? Not a news. Since Delphi 1 people’re asking "why Windows calculator is 33 kb, while Delphi version of the same exe is 300 kb"? Then and now it’s a que 阅读全文

posted @ 2013-09-22 12:03 至今 阅读(1452) 评论(0) 推荐(0) 编辑 |

摘要:本文部分内容摘自: http://www.pclviewer.com/android/用以下代码中的接口实现控制蓝牙的开、关及详细信息unit Androidapi.JNI.BluetoothAdapter;// (c) RedTitan Technology 2013// JNI BLUETOOTH import demo// Note - REQUIRES - PROJECT OPTIONS - USES PERMISSIONS - BLUETOOTHinterfaceuses Androidapi.JNIBridge, Androidapi.JNI.JavaTypes, Classe.. 阅读全文

posted @ 2013-09-21 13:41 至今 阅读(2571) 评论(1) 推荐(0) 编辑 |

摘要:Delphi XE5 Device compatibilityhttps://docs.google.com/spreadsheet/ccc?key=0AoEN2CEsVvJ0dGhVaWJEdWRJTVYzZ1NKT2NoQkF4N3c&usp=sharing#gid=0看看支持的手机型号,里面有华为等几个测试不成功的 阅读全文

posted @ 2013-09-20 21:32 至今 阅读(843) 评论(0) 推荐(0) 编辑 |

摘要:本篇文章我们来看一下delphi xe5 在android程序里怎样启动照相机并获取所拍的照片,本代码取自xe自带打sample,路径为:C:\Users\Public\Documents\RAD Studio\12.0\Samples\MobileCodeSnippets\AccessCameraApp1、前两步骤新建firemonkey mobile application 然后 选择blank application2、界面摆放如下: toolbar 、image 、actionlist 2、右键点击new standard action然后选择 TakePhotoFromCameraA 阅读全文

posted @ 2013-09-20 21:08 至今 阅读(3874) 评论(0) 推荐(0) 编辑 |

Copyright © 2024 至今
Powered by .NET 8.0 on Kubernetes