Delphi XE5 under Android development skills

Source: Internet
Author: User

Delphi XE5 under Android development skills

First, the mobile phone shortcut displays the Chinese name

project->options->Version Info-label(改成需要显示的中文名即可),但是需要安装到安卓手机才可以(IOS的没有试过)

Second, the use of sqllite storage Chinese

SqlLite中,字段类型要设置为nvarchar,保存时,有两种方式
1)用Post时,对中文的字段要进行UTF8转换
先用一个string变量转换一下(不转换的话Win32编译没有问题,Android编译时出错)
str_temp:=UTF8ENCODE(Trim(edit1.Text));,然后再赋值字段;
2)用ExecSql时
FdQuery.Sql.Text:=UTF8ENCODE(sql_text)

Third, use MESSAGEDLG format

if  MessageDlg(‘确认要退出吗?‘, TMsgDlgType.mtConfirmation, [TMsgDlgBtn.mbYes,Tmsgdlgbtn.mbNo], 0)=mrYes then

Iv. Withdrawal procedure

1)先加入一个单元:

Uses

{$IFDEF ANDROID}

  FMX.Platform.Android,

{$ENDIF ANDROID}

2)在FormCloseQuery事件中

If Messagedlg (' Do you want to quit? ‘,

Else

3)在FormClose中写入

{$IFDEF ANDROID}

{$ENDIF ANDROID}

Five, after connecting the real machine, can not generate APK, solution

The problem appears in Peas pod, 360 mobile phone assistant and other programs, can not generate APK, in the task Manager, the Peas pod, such as the end, OK

Original: http://www.wedelphi.com/Delphi-XE5-Android-Develop-Tips.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.