Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2021-07

gritwiev layout issue

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bo Berglund
to Mgr. Janusz Chmiel
"Mgr. Janusz Chmiel wrote 28 lines
<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; font-size:11.0pt; font-family:"Calibri",sans-serif;} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;} .MsoChpDefault {mso-style-type:export-only;} @page WordSection1 {size:612.0pt 792.0pt; margin:70.85pt 70.85pt 70.85pt 70.85pt;} div.WordSection1 {page:WordSection1;} --></style></head><body lang=CS link=blue vlink="#954F72" style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>I AM using Pandroid for Windows package available here.</p><p class=MsoNormal><a href="https://github.com/zeljkoc/PandroidPackage">https://github.com/zeljkoc/PandroidPackage</a></p><p class=MsoNormal>I need to setup The following XMl attributes to make Gritwiev to look more attractively.</p><p class=MsoNormal>    android:layout_width=&quot;match_parent&quot;</p><p class=MsoNormal>    android:layout_height=&quot;match_parent&quot;</p><p class=MsoNormal>    android:gravity=&quot;center&quot;</p><p class=MsoNormal>    android:columnWidth=&quot;100dp&quot;</p><p class=MsoNormal>    android:numColumns=&quot;auto_fit&quot;</p><p class=MsoNormal>    android:verticalSpacing=&quot;24dp&quot;</p><p class=MsoNormal>    android:horizontalSpacing=&quot;10dp&quot;</p><p class=MsoNormal>    android:stretchMode=&quot;spacingWidthUniform&quot;</p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>I have followed The tutorial available from here.</p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>https://www.raywenderlich.com/995-android-gridview-tutorial</p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>I have issue how to create FPCJVM compatible line</p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>    android:stretchMode=&quot;spacingWidthUniform&quot;<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>And also lines</p><p class=MsoNormal>    android:layout_width=&quot;match_parent&quot;<o:p></o:p></p><p class=MsoNormal>    android:layout_height=&quot;match_parent&quot;<o:p></o:p></p><p class=MsoNormal>    android:gravity=&quot;center&quot;<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>are problematic too.</p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>I AM calling AndroidR25 API Pascal headers created by MR Željko Cvijanovi?. I need to call those new API functions version to be able to recall Ignore optimisation dialog window on Android. I know, that MR Bart have used much mmore different approach. He has used other technique so user could create androidmanifest.xml with The same official format. So XMl attributes could be simply pasted from The article which I have followed. Unfortunately, I AM not sure, if The approach from MR Bart can be safely used also with new Android Pascal Api header files.</p><p class=MsoNormal>I Am writing about app which is available here and it is excellent example of The programmers technique to build running Android apps by using only FPCJVM Android JVM target.</p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><a href="https://lazarus.lazarus.freepascal.narkive.com/37AJSzpC/finished-full-jvm-android-application">https://lazarus.lazarus.freepascal.narkive.com/37AJSzpC/finished-full-jvm-android-application</a></p><p class=MsoNormal>Do you think, that I could use this older approach to over come some issue with XML tags? So I do not have to transfer XML format to Pascal compatible format?</p><p class=MsoNormal>I do not see at all but I want to create acceptable user interfaces also for sighted majority.</p><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></body></html>

Could yu please stop posting in unreadable HTML format? These mail lists are designed to use plaintext only.

Bo Berglund Developer in Sweden

Reply by email

Mgr. Janusz Chmiel
to Bo Berglund

Dear specialists,

    I AM very sorry that I have spammed this mailing list by using my messages on HTMl format. Unfortunately, I can not find out, how to setup Microsoft E-mail Windows 10 app available on Windows store to send messages in plain text. So I have decided to communicate by using Thunderbird on this mailing list.

I would like to plea some advanced developers here, if somebody would write Me, how to convert The following XML attributes to Pandroid package compatible format.

android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:stretchMode="spacingWidthUniform"

Here are my settings.

Adapter := AWArrayAdapter.create(Self,
AR.innerLayout.simple_list_item_1, items);
GridView.setVerticalSpacing(24);
GridView.setHorizontalSpacing(10);
GridView.setStretchMode(AR.Innerattr.COLUMNWIDTH);

But how to add

stretchMode="spacingWidthUniform"

To get PPCJVM Android JVM target compatible line of code.

   GridView.setColumnWidth(100);
   GridView.setNumColumns(AWGridView.AUTO_FIT);
I Am working with Pandroid for Windows package available from here:

zeljkoc/PandroidPackage: Package for Lazarus , Create android application (github.com) <https://github.com/zeljkoc/PandroidPackage>

I Am calling AndroidR25 APi functions because I need to have ignore battery optimisations feature working.

Thank you very much for yours help and for yours programmers time.

With deepest appreciation and with The kindness regards.

Janusz Chmiel

Reply by email