{hint: Pascal files location: ...\AppLAMWProject1\jni }
unit unit1;
{$mode delphi}
interface
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Classes, SysUtils, AndroidWidget, Laz_And_Controls, gridview;
type
{ TAndroidModule1 }
TAndroidModule1 = class(jForm)
Button1: jButton;
HorizontalScrollView1: jHorizontalScrollView;
procedure AndroidModule1Create(Sender: TObject);
procedure AndroidModule1Destroy(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
GridViewBarcode: array[1..100] of jGridView;
public
{public declarations}
end;
var
AndroidModule1: TAndroidModule1;
i,iLen:integer;
implementation
{$R *.lfm}
{ TAndroidModule1 }
procedure TAndroidModule1.Button1Click(Sender: TObject);
begin
end;
procedure TAndroidModule1.AndroidModule1Create(Sender: TObject);
begin
iLen:=52; //example, 52 chars for testing only
GridViewBarcode[1].Create(HorizontalScrollView1);
GridViewBarcode[1].Visible:=true;
GridViewBarcode[1].ColCount:=1;
GridViewBarcode[1].RowCount:=2;
GridViewBarcode[1].Cells[0,0]:='1';
GridViewBarcode[1].Cells[0,1]:='S1';
GridViewBarcode[1].PosRelativeToParent:=[rpLeft,rpCenterVertical];
GridViewBarcode[1].LayoutParamWidth:=lp96px;
for i:=2 to iLen do
begin
GridViewBarcode[i].Create(HorizontalScrollView1);
GridViewBarcode[i].Visible:=true;
GridViewBarcode[i].ColCount:=1;
GridViewBarcode[i].RowCount:=2;
GridViewBarcode[i].Cells[0,0]:=IntToStr(i);
GridViewBarcode[i].Cells[0,1]:='S'+IntToStr(i);
GridViewBarcode[i].Anchor:=GridViewBarcode[i-1];
GridViewBarcode[i].PosRelativeToAnchor:=[raToRightOf];
GridViewBarcode[i].LayoutParamWidth:=lp96px;
end;
end;
procedure TAndroidModule1.AndroidModule1Destroy(Sender: TObject);
begin
for i:=1 to iLen do
GridViewBarcode[i].Destroy;
end;
end.