You've already forked lazarus-ccr
android-sdk: Fixes string methods
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1787 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -39,7 +39,7 @@
|
|||||||
<PackageName Value="LCL"/>
|
<PackageName Value="LCL"/>
|
||||||
</Item2>
|
</Item2>
|
||||||
</RequiredPackages>
|
</RequiredPackages>
|
||||||
<Units Count="20">
|
<Units Count="21">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="android_bindings_generator.pas"/>
|
<Filename Value="android_bindings_generator.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
@@ -117,11 +117,10 @@
|
|||||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="android_sdk_bindings_gen"/>
|
<UnitName Value="android_sdk_bindings_gen"/>
|
||||||
<IsVisibleTab Value="True"/>
|
|
||||||
<EditorIndex Value="2"/>
|
<EditorIndex Value="2"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="134"/>
|
<TopLine Value="388"/>
|
||||||
<CursorPos X="90" Y="139"/>
|
<CursorPos X="114" Y="402"/>
|
||||||
<UsageCount Value="34"/>
|
<UsageCount Value="34"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit8>
|
</Unit8>
|
||||||
@@ -199,10 +198,13 @@
|
|||||||
</Unit17>
|
</Unit17>
|
||||||
<Unit18>
|
<Unit18>
|
||||||
<Filename Value="sdk_level_7/android_all.txt"/>
|
<Filename Value="sdk_level_7/android_all.txt"/>
|
||||||
|
<IsVisibleTab Value="True"/>
|
||||||
|
<EditorIndex Value="4"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="16"/>
|
<TopLine Value="38"/>
|
||||||
<CursorPos X="3" Y="46"/>
|
<CursorPos X="9" Y="46"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
<DefaultSyntaxHighlighter Value="None"/>
|
<DefaultSyntaxHighlighter Value="None"/>
|
||||||
</Unit18>
|
</Unit18>
|
||||||
<Unit19>
|
<Unit19>
|
||||||
@@ -213,6 +215,16 @@
|
|||||||
<CursorPos X="54" Y="525"/>
|
<CursorPos X="54" Y="525"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
</Unit19>
|
</Unit19>
|
||||||
|
<Unit20>
|
||||||
|
<Filename Value="../../../test/androidlcl/android/src/com/pascal/androidlcl/AndroidAll.java"/>
|
||||||
|
<EditorIndex Value="3"/>
|
||||||
|
<WindowIndex Value="0"/>
|
||||||
|
<TopLine Value="365"/>
|
||||||
|
<CursorPos X="63" Y="381"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
<DefaultSyntaxHighlighter Value="Java"/>
|
||||||
|
</Unit20>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="21" HistoryIndex="20">
|
<JumpHistory Count="21" HistoryIndex="20">
|
||||||
<Position1>
|
<Position1>
|
||||||
|
@@ -320,6 +320,8 @@ var
|
|||||||
DeclarationBase, TmpStr, lIDString: string;
|
DeclarationBase, TmpStr, lIDString: string;
|
||||||
FPasOutputImplCurLine: Integer;
|
FPasOutputImplCurLine: Integer;
|
||||||
lJavaParamVar, lJavaParams, lJavaParamSelf: string;
|
lJavaParamVar, lJavaParams, lJavaParamSelf: string;
|
||||||
|
// For adding the var for string params
|
||||||
|
HasStringParam: Boolean = False;
|
||||||
begin
|
begin
|
||||||
if ASourceLine = '' then Exit;
|
if ASourceLine = '' then Exit;
|
||||||
|
|
||||||
@@ -373,7 +375,15 @@ begin
|
|||||||
TmpStr := TmpStr + lParamPrefix + lParamName + ': ' + lParamTypePas + '; ';
|
TmpStr := TmpStr + lParamPrefix + lParamName + ': ' + lParamTypePas + '; ';
|
||||||
|
|
||||||
// Pascal parameter sending
|
// Pascal parameter sending
|
||||||
FPasOutputImpl.Add(' vAndroidPipesComm.SendInt(Integer(' + lParamName + '));');
|
if lParamTypePas = 'string' then
|
||||||
|
begin
|
||||||
|
FPasOutputImpl.Add(Format(' lString := TString.Create(%s);', [lParamName]));
|
||||||
|
FPasOutputImpl.Add(' vAndroidPipesComm.SendInt(lString.Index); // text');
|
||||||
|
FPasOutputImpl.Add(' lString.Free;');
|
||||||
|
HasStringParam := True;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
FPasOutputImpl.Add(' vAndroidPipesComm.SendInt(Integer(' + lParamName + '));');
|
||||||
|
|
||||||
// Java parameter reading
|
// Java parameter reading
|
||||||
lJavaParamVar := Format('l%s_%d', [ConvertPointToUnderline(lParamType), lParamNum]);
|
lJavaParamVar := Format('l%s_%d', [ConvertPointToUnderline(lParamType), lParamNum]);
|
||||||
@@ -404,8 +414,14 @@ begin
|
|||||||
FPasOutputImpl.Add(' Result := ' + lMethodReturnPas + '(vAndroidPipesComm.WaitForIntReturn());');
|
FPasOutputImpl.Add(' Result := ' + lMethodReturnPas + '(vAndroidPipesComm.WaitForIntReturn());');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// Insert the start
|
||||||
FPasOutputClasses.Add(' ' + DeclarationBase + TmpStr);
|
FPasOutputClasses.Add(' ' + DeclarationBase + TmpStr);
|
||||||
FPasOutputImpl.Insert(FPasOutputImplCurLine, DeclarationBase + FClassNamePas + '.' + TmpStr);
|
FPasOutputImpl.Insert(FPasOutputImplCurLine, DeclarationBase + FClassNamePas + '.' + TmpStr);
|
||||||
|
if HasStringParam then
|
||||||
|
begin
|
||||||
|
FPasOutputImpl.Insert(FPasOutputImplCurLine+1, 'var');
|
||||||
|
FPasOutputImpl.Insert(FPasOutputImplCurLine+2, ' lString: TString;');
|
||||||
|
end;
|
||||||
FPasOutputImpl.Add('end;');
|
FPasOutputImpl.Add('end;');
|
||||||
FPasOutputImpl.Add('');
|
FPasOutputImpl.Add('');
|
||||||
|
|
||||||
|
@@ -42,8 +42,8 @@ const INVISIBLE = 4;
|
|||||||
const GONE = 8;
|
const GONE = 8;
|
||||||
|
|
||||||
[ViewGroup] View
|
[ViewGroup] View
|
||||||
procedure addView(View child, LayoutParams params);
|
method void addView(View child, ViewGroup.LayoutParams params);
|
||||||
procedure addView(View child);
|
# method void addView(View child);
|
||||||
|
|
||||||
[LinearLayout] ViewGroup
|
[LinearLayout] ViewGroup
|
||||||
constructor Create(Activity);
|
constructor Create(Activity);
|
||||||
|
Reference in New Issue
Block a user