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