androidlcl: Advances to implementing reading text values
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1819 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
b194db05d2
commit
2f49245f8b
@ -48,7 +48,7 @@
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="1"/>
|
||||
<CursorPos X="15" Y="14"/>
|
||||
<UsageCount Value="40"/>
|
||||
<UsageCount Value="42"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
@ -59,9 +59,9 @@
|
||||
<UnitName Value="mainform"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="6"/>
|
||||
<CursorPos X="80" Y="15"/>
|
||||
<UsageCount Value="40"/>
|
||||
<TopLine Value="1"/>
|
||||
<CursorPos X="3" Y="39"/>
|
||||
<UsageCount Value="42"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
</Unit1>
|
||||
@ -117,12 +117,11 @@
|
||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="android_sdk_bindings_gen"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="8"/>
|
||||
<CursorPos X="20" Y="45"/>
|
||||
<UsageCount Value="40"/>
|
||||
<TopLine Value="476"/>
|
||||
<CursorPos X="1" Y="497"/>
|
||||
<UsageCount Value="42"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit8>
|
||||
<Unit9>
|
||||
@ -201,9 +200,9 @@
|
||||
<Filename Value="sdk_level_7/android_all.txt"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="129"/>
|
||||
<CursorPos X="41" Y="147"/>
|
||||
<UsageCount Value="13"/>
|
||||
<TopLine Value="59"/>
|
||||
<CursorPos X="1" Y="81"/>
|
||||
<UsageCount Value="14"/>
|
||||
<Loaded Value="True"/>
|
||||
<DefaultSyntaxHighlighter Value="None"/>
|
||||
</Unit18>
|
||||
@ -230,7 +229,7 @@
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="1"/>
|
||||
<CursorPos X="26" Y="9"/>
|
||||
<UsageCount Value="13"/>
|
||||
<UsageCount Value="14"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit21>
|
||||
<Unit22>
|
||||
@ -244,11 +243,12 @@
|
||||
<Unit23>
|
||||
<Filename Value="../../../lazarus/lcl/interfaces/android/android_all.pas"/>
|
||||
<UnitName Value="android_all"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="5"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="128"/>
|
||||
<CursorPos X="20" Y="132"/>
|
||||
<UsageCount Value="13"/>
|
||||
<TopLine Value="132"/>
|
||||
<CursorPos X="23" Y="147"/>
|
||||
<UsageCount Value="14"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit23>
|
||||
<Unit24>
|
||||
@ -256,9 +256,9 @@
|
||||
<UnitName Value="androidpipescomm"/>
|
||||
<EditorIndex Value="6"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="222"/>
|
||||
<CursorPos X="10" Y="139"/>
|
||||
<UsageCount Value="13"/>
|
||||
<TopLine Value="38"/>
|
||||
<CursorPos X="15" Y="62"/>
|
||||
<UsageCount Value="14"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit24>
|
||||
<Unit25>
|
||||
@ -270,123 +270,127 @@
|
||||
<UsageCount Value="10"/>
|
||||
</Unit25>
|
||||
</Units>
|
||||
<JumpHistory Count="29" HistoryIndex="28">
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="sdk_level_7/android_all.txt"/>
|
||||
<Caret Line="76" Column="28" TopLine="41"/>
|
||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||
<Caret Line="582" Column="99" TopLine="507"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||
<Caret Line="582" Column="99" TopLine="507"/>
|
||||
<Caret Line="524" Column="1" TopLine="507"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||
<Caret Line="524" Column="1" TopLine="507"/>
|
||||
<Caret Line="525" Column="1" TopLine="507"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||
<Caret Line="525" Column="1" TopLine="507"/>
|
||||
<Caret Line="528" Column="1" TopLine="507"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||
<Caret Line="528" Column="1" TopLine="507"/>
|
||||
<Caret Line="529" Column="1" TopLine="507"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||
<Caret Line="529" Column="1" TopLine="507"/>
|
||||
<Caret Line="532" Column="1" TopLine="507"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||
<Caret Line="532" Column="1" TopLine="507"/>
|
||||
<Caret Line="535" Column="1" TopLine="507"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||
<Caret Line="535" Column="1" TopLine="507"/>
|
||||
<Caret Line="539" Column="1" TopLine="507"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||
<Caret Line="539" Column="1" TopLine="507"/>
|
||||
<Caret Line="541" Column="1" TopLine="507"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||
<Caret Line="541" Column="1" TopLine="507"/>
|
||||
<Caret Line="542" Column="36" TopLine="526"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||
<Caret Line="542" Column="36" TopLine="526"/>
|
||||
<Filename Value="sdk_level_7/android_all.txt"/>
|
||||
<Caret Line="145" Column="23" TopLine="99"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="sdk_level_7/android_all.txt"/>
|
||||
<Caret Line="145" Column="23" TopLine="99"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="sdk_level_7/android_all.txt"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
<Caret Line="143" Column="21" TopLine="99"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="sdk_level_7/android_all.txt"/>
|
||||
<Caret Line="143" Column="21" TopLine="99"/>
|
||||
<Caret Line="145" Column="23" TopLine="99"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="sdk_level_7/android_all.txt"/>
|
||||
<Caret Line="145" Column="23" TopLine="99"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||
<Caret Line="42" Column="20" TopLine="3"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="../../../lazarus/lcl/interfaces/android/android_all.pas"/>
|
||||
<Caret Line="666" Column="17" TopLine="653"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||
<Caret Line="864" Column="22" TopLine="858"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="sdk_level_7/android_all.txt"/>
|
||||
<Caret Line="150" Column="1" TopLine="103"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="sdk_level_7/android_all.txt"/>
|
||||
<Caret Line="150" Column="1" TopLine="103"/>
|
||||
<Caret Line="42" Column="1" TopLine="1"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="sdk_level_7/android_all.txt"/>
|
||||
<Caret Line="42" Column="1" TopLine="1"/>
|
||||
<Caret Line="151" Column="1" TopLine="108"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="sdk_level_7/android_all.txt"/>
|
||||
<Caret Line="151" Column="1" TopLine="108"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="sdk_level_7/android_all.txt"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
<Caret Line="37" Column="1" TopLine="14"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="sdk_level_7/android_all.txt"/>
|
||||
<Caret Line="37" Column="1" TopLine="14"/>
|
||||
<Caret Line="267" Column="1" TopLine="220"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="sdk_level_7/android_all.txt"/>
|
||||
<Caret Line="267" Column="1" TopLine="220"/>
|
||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||
<Caret Line="797" Column="48" TopLine="781"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||
<Caret Line="797" Column="48" TopLine="781"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
<Caret Line="33" Column="29" TopLine="1"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||
<Caret Line="33" Column="29" TopLine="1"/>
|
||||
<Caret Line="410" Column="23" TopLine="396"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||
<Caret Line="410" Column="23" TopLine="396"/>
|
||||
<Caret Line="552" Column="23" TopLine="512"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||
<Caret Line="552" Column="23" TopLine="512"/>
|
||||
<Filename Value="mainform.pas"/>
|
||||
<Caret Line="15" Column="80" TopLine="6"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="android_sdk_bindings_gen.pas"/>
|
||||
<Caret Line="486" Column="65" TopLine="468"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
|
@ -185,6 +185,7 @@ begin
|
||||
ADest.Add(' float lResult_float;');
|
||||
ADest.Add(' int lResult_int;');
|
||||
ADest.Add(' boolean lResult_boolean;');
|
||||
ADest.Add(' CharSequence lResult_CharSequence;');
|
||||
ADest.Add(' Display lResult_Display;');
|
||||
ADest.Add('');
|
||||
ADest.Add(' switch (Buffer)');
|
||||
@ -452,6 +453,11 @@ begin
|
||||
TmpStr := TmpStr + ');';
|
||||
FPasOutputImpl.Add(' vAndroidPipesComm.WaitForReturn();');
|
||||
end
|
||||
else if (lMethodReturn = 'CharSequence') or (lMethodReturn = 'String') then
|
||||
begin
|
||||
TmpStr := TmpStr + '): ' + lMethodReturnPas + ';';
|
||||
FPasOutputImpl.Add(' Result := vAndroidPipesComm.WaitForStringReturn();');
|
||||
end
|
||||
else
|
||||
begin
|
||||
TmpStr := TmpStr + '): ' + lMethodReturnPas + ';';
|
||||
@ -487,7 +493,7 @@ begin
|
||||
else
|
||||
begin
|
||||
FJavaOutputMethods.Add(' lResult_' + lMethodReturn + ' = ' + lJavaParamSelf + '.' + lMethodName + '(' + lJavaParams + ');');
|
||||
if IsBasicJavaType(lMethodReturn) then
|
||||
if IsBasicJavaType(lMethodReturn) or (lMethodReturn = 'CharSequence') or (lMethodReturn = 'String') then
|
||||
FJavaOutputMethods.Add(' MyAndroidPipesComm.' + GetJavaResultFunction(lMethodReturn) + '(lResult_' + lMethodReturn + ');')
|
||||
else
|
||||
begin
|
||||
@ -808,8 +814,9 @@ end;
|
||||
function TAndroidSDKBindingsGen.GetJavaResultFunction(AReturnType: string
|
||||
): string;
|
||||
begin
|
||||
if AReturnType = 'boolean' then Result := 'SendBoolResult'
|
||||
else if AReturnType = 'float' then Result := 'SendFloatResult'
|
||||
if AReturnType = 'boolean' then Result := 'SendBoolResult'
|
||||
else if AReturnType = 'float' then Result := 'SendFloatResult'
|
||||
else if (AReturnType = 'CharSequence') or (AReturnType = 'String') then Result := 'SendStringResult'
|
||||
else Result := 'SendIntResult';
|
||||
end;
|
||||
|
||||
|
@ -2,19 +2,11 @@ object Form1: TForm1
|
||||
Left = 479
|
||||
Height = 414
|
||||
Top = 137
|
||||
Width = 434
|
||||
Width = 433
|
||||
Caption = 'Android Bindings Generator'
|
||||
ClientHeight = 414
|
||||
ClientWidth = 434
|
||||
ClientWidth = 433
|
||||
LCLVersion = '0.9.31'
|
||||
object Label1: TLabel
|
||||
Left = 8
|
||||
Height = 18
|
||||
Top = 8
|
||||
Width = 43
|
||||
Caption = 'Label1'
|
||||
ParentColor = False
|
||||
end
|
||||
object editInputPath: TDirectoryEdit
|
||||
Left = 88
|
||||
Height = 25
|
||||
|
@ -16,7 +16,6 @@ type
|
||||
Button1: TButton;
|
||||
Button2: TButton;
|
||||
editInputPath: TDirectoryEdit;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
|
@ -73,6 +73,7 @@ constructor Create(Activity); virtual;
|
||||
method void setText(CharSequence AText); virtual;
|
||||
callbacksettercaller setOnClickListener callOnClickListener OnClickListener = procedure (v: TView) of object;
|
||||
method void setTextSize(int unit_; float size);
|
||||
method CharSequence getText()
|
||||
|
||||
[EditText] TextView
|
||||
constructor Create(Activity); override;
|
||||
|
Loading…
Reference in New Issue
Block a user