Here are two code samples which have been created as A demonstration by The elite Lamw developer by MR Jose Marques Pessoa.
procedure TAndroidModule1.AndroidModule1JNIPrompt(Sender: TObject);
begin
jTextView1.Text:= 'App Runtime Layouting Demo';
jTextView1.LayoutParamWidth:= lpWrapContent;
jTextView1.LayoutParamHeight:= lpWrapContent;
jTextView1.PosRelativeToParent:= [rpTop, rpCenterHorizontal];
jTextView1.UpdateLayout();
jButton1.Text:= 'Click Me!';
jButton1.LayoutParamWidth:= lpTwoThirdOfParent;
jButton1.LayoutParamHeight:=lpWrapContent;
jButton1.Anchor:= jTextView1;
jButton1.PosRelativeToAnchor:= [raBelow];
jButton1.PosRelativeToParent:= [rpCenterHorizontal];
jButton1.UpdateLayout();
end;
If somebody who is visually impaired with no sight at all would want to put more GUi elements which will be displaied on The Android device screen one below the other there is possibility to use this code example
btnPlay2.LayoutParamWidth:= lpTwoThirdOfParent;
btnPlay2.LayoutParamHeight:=lpWrapContent;
btnPlay2.Anchor:= btnPlay1; /// <<----- FIXED HERE!!!
btnPlay2.PosRelativeToAnchor:= [raBelow];
btnPlay2.PosRelativeToParent:= [rpCenterHorizontal];
btnPlay2.UpdateLayout();
btnPlay3.LayoutParamWidth:= lpTwoThirdOfParent;
btnPlay3.LayoutParamHeight:=lpWrapContent;
btnPlay3.Anchor:= btnPlay2; /// <<----- FIXED HERE!!!
btnPlay3.PosRelativeToAnchor:= [raBelow];
btnPlay3.PosRelativeToParent:= [rpCenterHorizontal];
btnPlay3.UpdateLayout();
etc......
Original Github issue link wwhich I have been used to citate The code is
https://github.com/jmpessoa/lazandroidmodulewizard/issues/103I would like to realisticly emphasize The fact, that only sighted person can use his brain optical perception to create The nice GUi. But I Am hoping, that The approach which I have writte here can be a big inspiration for advanced Pascal developers to improve this approach or to use it.
I would also to publicly congratulate Lamw developers that Lazarus users can use The components window to add chosen component to The Android module form when using Form designer of Lamw.
This kind access of Lamw community improve The opportunity of Lamw developers without seeing to write professional pascal applications.
It is also very important to emphasize The fact, that Lamw have been professionally integrated in to lazarus IDE. So it is possible to use The default event for many included Android GUI components.
Very practical positive feature of The Lazarus IDE is The filtering feature of The components window.
Lazarus user can type jbutton
jedit
And only this Lamw specific component will be find. And user only press on The Use button. And chosen component will be moved to The Android module1 Lamw form.
So it is not necessary to use drag and drop mouse feature.
So I would like to thank all lamw developers for their very kind approach to my pleas. And for their extreme patience with Me.
I Am deeply appreciating their kind access to my pleas because I Am aware, that The visually impaired Pascal developers with no sight at all are The very very little minority of programmers.
So it is necessary to express The deepest possible aappreciation to them.
I believe, that this little article will bring The new development opportunity for many visually impaired Pascal developers.
So they will be able to use The best features of Lazarus enterprise IDE and Lamw features.