我在DELPHI XE8中为android创建了一个应用程序.如果我想在Google Play和Google上发布它,它应该是分类设备平台ARMEABI,ARMEABI-V7A,MIPS和x86,而DELPHI XE8(以及所有以前的版本)仅支持架构ARMEABI-V7A.
不要作为Google Play上的专业发布应用程序来安装您的应用程序,并且有人会告诉他该平台不受支持.
分析APK安装包生成DELPHI XE8我发现它是为所有上述平台自动生成的.
谷歌在其网站(http://developer.android.com/google/play/filters.html)推荐使用Android NDK的解决方案 - 不幸的是,我仍然无法弄清楚如何做到这一点......
因为建议另一种解决方案来读取和编辑ANDROID.mk(遗憾的是,此文件不会生成DELPHI XE8).
问题是如何只为ARMEABI-V7A实现DELPHI XE8编译的APK文件?
任何人都有这方面的经验或解决方案吗?
可以使用类似的东西将枚举转换为字符串:
uses
TypInfo;
type
Language = (Delphi,Delphi_Prism,CBuilder);
var
StrLanguage : String;
begin
StrLanguage := GetEnumName(TypeInfo(Language),integer(Delphi)) ;
end;
Run Code Online (Sandbox Code Playgroud)
(摘自theroadtodelphi)
是否可以对具有自定义值的枚举执行相同操作?
像这样的东西:
type
THotkey = (hkShift= 1, hkSpace= 3, hkEnter= 6);
Run Code Online (Sandbox Code Playgroud)
作为一种解决方法,我使用占位符来跳过未使用的枚举.
然而,这不是很好,如果我不得不跳过巨大的差距是有问题的.
type
THotkeys = (hkShift, hkUnused1, hkSpace, hkUnused2, hkUnused3, hkEnter);
Run Code Online (Sandbox Code Playgroud) 帮助文件说右键单击项目管理器中的目标平台并选择"添加平台",但是当我这样做时,"添加平台"项目将显示为灰色.
还有另一种方法可以添加64位平台吗?
我有一个带有与TMultiView组件链接的速度按钮的表单.在多视图上我有一些按钮.单击任何按钮时,我希望多视图关闭,并根据单击的按钮,调用不同的功能.我试图将MultiView的Visible属性设置为false,但表单上的阴影仍然存在.如果我再次点击速度按钮,则菜单会消失,阴影也会如预期的那样消失.有办法解决这个问题吗?
我正在使用Deplhi XE 8.1
目前我有这个代码来添加一些节点 VST
function AddVSTStructure(AVST: TCustomVirtualStringTree; ANode: PVirtualNode; AObject: TDATArecord): PVirtualNode;
var
Data: PUserData;
begin
Result := AVST.AddChild(ANode);
Data := AVST.GetNodeData(Result);
AVST.ValidateNode(Result, false);
Data^.FObject := AObject;
end;
//adding node
VDT1.BeginUpdate;
try
DATArecord.name := 'nodename';
DATArecord.Visible:= False;
AddVSTStructure(VDT1, nil, DATArecord);
finally
VDT1.EndUpdate;
end;
Run Code Online (Sandbox Code Playgroud)
我想在非可见状态下添加节点,我的意思是完全不可见.
我知道我可以在添加它之后设置节点的可见性VDT1.IsVisible[Node] := boolean;但我想在树中显示之前将其设置为不可见,考虑到我添加的记录设置为DATArecord.Visible:= False;
因此,如果Datarecord.visible等于true,则添加具有可见状态的节点.如果是false,添加具有不可见状态的节点我该怎么做?
所以我花了一个小时试图让它发挥作用.我正在对TWebBrowser进行一些测试,所以我可以在项目中应用我的发现.我想测试不同的加载内容的方法(URL,LoadFromStrings()和EvaluateJavaScript()).问题是,我无论如何都不能将一个简单的字符串传递给最后一个方法而不会被错误地包含在撇号中.
procedure TForm1.FormCreate(Sender:TObject);
const S='<span style="color:red">ABC</span><span style="color:green">ABC</span><span style="color:blue">ABC</span>';
begin
WebBrowser1.LoadFromStrings('<html><body><div id="target">[x]</div></body></html>','');
WebBrowser1.EvaluateJavaScript('document.getElementById("target").insertAdjacentHTML('+
'"beforend",'#39+S+#39');');
end;
Run Code Online (Sandbox Code Playgroud)
看到#39?如果没有它们,字符串将完全没有撇号发送,因此生成的JavaScript脚本无效.如果它们仍然存在,我会在字符串的每一端都有两个撇号,但仍然会弄乱脚本.这是什么?
我在使用Delphi的TMemoryStream(或TFileStream)时遇到了一个奇怪的问题.在将流的一部分读入字节数组时.这里有一些代码作为例子.
procedure readfromstream();
var
ms : TMemoryStream;
buffer : array of byte;
recordSize : Integer;
begin
try
begin
ms := TMemeoryStream.Create();
ms.LoadFromFile(<some_path_to_a_binary_file>);
while ms.Position < ms.Size do
begin
buffer := nil;
SetLength(buffer, 4);
ms.ReadBuffer(buffer, 4);
move(buffer[0], recordSize, 4);
SetLength(buffer, recordSize);
ms.Position := ms.Position - 4; // Because I was having issues trying to read the rest of the record into a specific point in the buffer
FillChar(buffer, recordSize, ' ');
ms.ReadBuffer(buffer, recordSize); // Issue line ???
// Create the record …Run Code Online (Sandbox Code Playgroud) 我正在尝试编写自定义日期选择器(日历)。日期将显示在字符串网格上。我正在尝试用自定义颜色填充单击的单元格并使所选的单元格文本变为粗体。
这是我的代码:
type
TStringGrid = Class(Vcl.Grids.TStringGrid)
private
FHideFocusRect: Boolean;
protected
Procedure Paint;override;
public
Property HideFocusRect:Boolean Read FHideFocusRect Write FHideFocusRect;
End;
TfrmNepaliCalendar = class(TForm)
...
...
...
end;
procedure TfrmNepaliCalendar.StringGridDrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
begin
if gdSelected in State then begin
StringGrid.Canvas.Brush.Color := $00940A4B;
StringGrid.Canvas.FillRect(Rect);
StringGrid.Canvas.Font.Style := [fsBold];
StringGrid.Canvas.Font.Color := clHighlightText;
StringGrid.Canvas.TextOut(Rect.Left + 3, Rect.Top + 5, StringGrid.Cells[ACol,ARow]);
StringGrid.HideFocusRect := True;
end;
end;
{ TStringGrid }
procedure TStringGrid.Paint;
var
LRect: TRect;
begin
inherited;
if HideFocusRect then begin …Run Code Online (Sandbox Code Playgroud) 我在Delphi中有这个Json String,
{
"bpd": {
"euro": {
"buying_rate": "48.50",
"selling_rate": "52.70"
},
"dollar": {
"buying_rate": "45.30",
"selling_rate": "45.80"
},
"source": "https://www.popularenlinea.com/_api/web/lists/getbytitle('Rates')/items"
},
"blh": {
"euro": {
"buying_rate": "48.50",
"selling_rate": "52.00"
},
"dollar": {
"buying_rate": "45.35",
"selling_rate": "45.80"
},
"source": "http://www.blh.com.do/Inicio.aspx"
}
}
Run Code Online (Sandbox Code Playgroud)
我想为银行blh提取buy_rate和sell_rate美元
我试试这个,但我得到AV
var
LJsonObj : TJSONObject;
LRows, LElements, LItem : TJSONValue;
begin
LJsonObj := TJSONObject.ParseJSONValue(TEncoding.ASCII.GetBytes(s),0) as TJSONObject;
try
LRows:=LJsonObj.Get(0).JsonValue;
LElements:=TJSONObject(TJSONArray(LRows).Get(0)).Get(0).JsonValue;
LItem :=TJSONObject(TJSONArray(LElements).Get(0)).Get(0).JsonValue;
ShowMessage(TJSONObject(LItem).Get('buying_rate').JsonValue.Value);
finally
LJsonObj.Free;
end;
Run Code Online (Sandbox Code Playgroud) ListView1.items.filter := nil;
Run Code Online (Sandbox Code Playgroud)
我知道上面的内容将清除listview的过滤器,但是如果列表视图的搜索是可见的并且输入了某些内容,那么无论如何都要从中清除文本?
delphi ×10
delphi-xe8 ×10
firemonkey ×2
android ×1
apk ×1
google-play ×1
json ×1
multiview ×1
tstringgrid ×1