Share My Creation RemAll - 2014 project

Hello to all.
I present to you today the real evolution of the program Remme which had already been the subject of several posts in the forum.
This time it is not a revision to correct errors or new theme for the program.
The current version has also a new name, RemAll and has been totally rewritten, modifying the use of the interface and inserting the code of the experimental programs already presented here (Combo Box by code, Dynamic List multitext and Scroll/Write dynamic list that is the basis of the new way to edit and insert the data into the archive.
Using RemAll you can read and write (edit) the data using the same window of the activity as inpur/output unlike the previous version, which used a kind of command line shown on top of the screen.
The attached pictures will be the most effective of the explanation showing how to insert a new record using the new interface.

The program is no longer a BETA version though, as is often the case do not exclude further corrections and / or improvements hereinafter.
Even the graphical interface has been redesigned, lighter and with fewer elements but without penalizing the information provided.
The views created by Designer are about 30 while all other elements are created, managed and deleted directly from the code. I so avoided the 3 ListView used in previous versions while the editbox are created only in the positions required to use them and discard them when no longer needed and the same happens for the Panel
You can find below some tips and tricks used to run this program (PDF format) and i will continue to post them if the project will receive important changes.
The last note, using the new interface RemAll (for the moment) is no longer compatible with the RemMe Archive.
To download the last final version use the link RemAll-1_2_2.zip

All the previously released versions (Beta or Final) are available in changelog message.
 

Attachments

  • RemAll0.png
    RemAll0.png
    25.3 KB · Views: 6,219
  • RemAll1.png
    RemAll1.png
    18.9 KB · Views: 347
  • RemAll2.png
    RemAll2.png
    28.7 KB · Views: 358
  • RemAll4.png
    RemAll4.png
    34.4 KB · Views: 321
  • RemAll-1_1_0.zip
    169.9 KB · Views: 234
  • RemAll-1_2_0.png
    RemAll-1_2_0.png
    39.4 KB · Views: 260
  • RemAll1-1-0.jpg
    RemAll1-1-0.jpg
    48.6 KB · Views: 234
  • RemAll-2014_1_2_0.jpg
    RemAll-2014_1_2_0.jpg
    66.8 KB · Views: 244
  • RemAll-1_2_1.zip
    174.6 KB · Views: 238
  • RemAll-1_2_2.zip
    174.8 KB · Views: 243
Last edited:

efsoft

Member
Licensed User
Longtime User
Hello to all,
Changelog :
2013-12-08
Added the version 1.2 di RemAll-B (as first Beta version)
2013-12-11 Added the update version 1.3 that includes the following bug fix.
Locked the dynamic lists useless attivation not requested during the normal use.
Navigation of a selected archive without to need to reopen archive to read each Record..
Modified the search of duplicate record's name when you add a new record.
Minor adjustment to the interface a to the help step by step messages.
Reduced dimension Apk: 142 Kb - App installated on SD + data: 304 kb
Still valid the warning to not use versions different from the Italian or English
2013-12-18 added the update Beta version 1.4 that includes the following bug fix.
Now operative la possibility to load immage to personalize your credit cards
linked by name to the relative Record.
Fixed the Records counter previously showing wrong figures sometime.
Fixed the incomplete cancellation of the "Cancel Record" procedure if
stopped by scroll button..
Revised the translation text of the the 4 languages.(They should work now
but some further adjustment could be required. Ather minor bugs fixed.
Current Dimension of the APK 140 KB
2014-01-01 Added the final version of RemAll. The program is no longer a Beta
Many minor bugs have been solved and also the GUI has been upgraded by centering
the lists, now with a transparent panel to scroll the pages. Fixed a problem in detecting
duplicated records under Android 4.2 and wrong behavior of the process to modify a record.
Now user will be able to execute several changes without closing the record simply selecting "modify Record" in menu.
Added some new messages in the help.
Changed the process New Record. The user now is able to insert record name (1st Label) and thence complete the wanted remaining fields. No longer required edit all fields.
The Save process will complete the Record autonatically.
2014/01/03- This version is now identified by the original name RemAll-2014 Vers.1.0.2
The auto-completion while functioning correctly, causes incorrect behavior of the procedure for amendment of record applied later. solved
The "Save" button, activated when inserting a new record, not deleted if you canceled the process. solved. Last file is now RemAll-2014_2.zip
2013-01-06 Locked the change Name and Titles of the Fields for the Cards Archive. This is to due to the fact that RemAll uses a proprietary code to show this kind of documents so the relative archive elements cannot be modified by the user as happens for the remaining 9 archives.
Correct the handling of the optional icons that the user can add for the stored Cards.
Fixed also wrong storage for records added to Archive1 free
Last file is now RemAll-2014_3.zip
2013/01/14
Added a Photo archive to collect informations about your pictures but also to show them if they have been loaded in the device. RemAll Vers.1.1.0
Last file is now RemAll-1_1_0 .zip
2013/01/23

Added a Beta version on internal Web Browser to call by a click on a stored Url.
Also modified the code to search special fields. The ones containing Url or Pictures in whatever position in archive.
Added two new picture extention (jpeg, png) to launch the internal pictures viewer.
Last file is now RemAll-1_2_1.zip
2013/01/30
Added the update that enable the information of "Loading" for the Web Viewer. The notification appears each time a new page is loaded.
Last file is now RemAll.1_2_2.zip
 

Attachments

  • RemAll_B1.3.zip
    138.9 KB · Views: 234
  • RemAllB-1.4.zip
    137.3 KB · Views: 227
  • RemAll-2014_2.zip
    137.9 KB · Views: 207
  • RemAll-2014_3.zip
    138.2 KB · Views: 209
  • RemAll-1_1_0.zip
    169.9 KB · Views: 220
  • RemAll-1_2_1.zip
    174.6 KB · Views: 222
  • RemAll-1_2_2.zip
    174.8 KB · Views: 219
Last edited:

Beja

Expert
Licensed User
Longtime User
efsoft,
Thank you very much for presenting this work to us.. we will benefit from it of course.
is it possible to share the code (if not a business app)
 

efsoft

Member
Licensed User
Longtime User
Hi, Beja
Thank you for your attention to my message and i shall be glad if this will be usefull to somebody.
As i previously wrote (no in this 3d) the program code includes also proprietary routines to crypt /decrypt data, password and store them.
These code is the same i wrote on 2002 and during the time, up to now,i know that there are friends of mine and others persons that still use my program RemMe (Win and NSbasic version) that is the base of the evolution RemAll under Android.
For this reason, even if this is not a commercial program and never will be (as happens for all my programs always developed for amusement) i can not, to be correct, publish the full code of RemMe/RemAll.
Anyway i shall continue to write and to post here all i can relating to dynamic items (views by code) used in my program. (about 2 or 3 part again i assume).
Please also note that i think my code be very difficult to understand as, i start to learn by myself the basic on a ZX81 and my code is what was called, many time ago, "Spaghetti Code" (That is correct as i am Italian).:)
Well, thanks again for your kind attention.
efsoft
P.S. Sorry for my googled English
 

Beja

Expert
Licensed User
Longtime User
it's ok.. was just wondering..
Spaghetti code is not limited to Italian speaking. it has been common expression for straight code, in contrast
to object-oriented. I also started with BASICA and then GWBASIC to Qbasic (all interpreters) and finally to
Quik Basic 4.5 which was the first compiler for DOS. We are now using Pizza with all the toppings!.
I am just wondering how you coding Spaghetti in a fully and true Object-Oriented environment. May be you
mean it is not commented or carefully written.
 

efsoft

Member
Licensed User
Longtime User
it's ok.. was just wondering..
Spaghetti code is not limited to Italian speaking. it has been common expression for straight code, in contrast
to object-oriented. I also started with BASICA and then GWBASIC to Qbasic (all interpreters) and finally to
Quik Basic 4.5 which was the first compiler for DOS. We are now using Pizza with all the toppings!.
I am just wondering how you coding Spaghetti in a fully and true Object-Oriented environment. May be you
mean it is not commented or carefully written.

Hi Beja,
i know that 'spaghetti code' was not an italian espression but a way to identify a manner of developing of the code.
What i mean is that you are right when you think that my code is not commented and tangled.
I usualli start from the graphic interface of an idea of mine and go over to write the code, often without following any specific organization
What i usually do is simply solving the problems step by step
And for this my code remembers a dish of tangled italian spaghetti.
I am too old to change, i hope anyway that what i can write may help somebody.
 

efsoft

Member
Licensed User
Longtime User
RemAll-2014 NOW!

Happy New Year to all,
here's the final version (no longer BETA ) program RemAll. as originally defined : Remall-2014 - Vers.1.0.1
Have been solved various problems and changed some aspects of the program. ( Changelog can provide further details)
I
It 'been changed the use of the main list. To better understand the one that serves as the input and output and to show the list of available records.
Now, after completing the first field that gives its name to the record (action that shows also the button to save the data in the archive) the user can fill in only the fields that are needed in any order without any problems. Only thing to remember is that for validate what has been entered in the field you must always use the Enter / Done buttons on the keyboard.
This system is more natural to use and reduces the possibility of error that we met when requested to fill out all the fields in sequence.
Of course, the new method continues to use the list of dynamic type.
The program presented is available here as a zip file, attached to the message of the changelog, and also the first message of this 3D .

Update.
Detected incorrect program behavior.(see Changelog)
Both correct.
For the last version available see also the enclosure of the first message or the Changelog
.
 

Attachments

  • RemAll-2014.zip
    138 KB · Views: 239
  • RemAll-2014-1.png
    RemAll-2014-1.png
    28.5 KB · Views: 216
  • RemAll-2014-2.png
    RemAll-2014-2.png
    24.9 KB · Views: 211
  • RemAll-2014_2.zip
    137.9 KB · Views: 216
  • RemAll-2014_3.zip
    138.2 KB · Views: 210
Last edited:

efsoft

Member
Licensed User
Longtime User
Some Code Details
NOTE:
The attached files pdf contain the previously published texts. "As Promised - Part..."
that show some details and part of the code created for this application.
For the future similar documents, showing text/code, will be available for some time in clear and later will be all converted and attached here as pdf files
 

Attachments

  • RemAllSharedCodePart1-2.pdf
    22.7 KB · Views: 271
  • RemAllSharedCodePart3-4.pdf
    20.2 KB · Views: 257
  • RemAllSharedCodePart5-6.pdf
    154.1 KB · Views: 299
Last edited:

efsoft

Member
Licensed User
Longtime User
RemAll-2014 The Upgrade
Vers.1.1.0
The project go over

As i wrote my experience in developing programs under Android (i.e. to use B4A) started firstly with the translation of a program of mine created with nsbasic for PPC mobile devices (RemMe).
The revision of that first program was the RemAll application that with the version 1.0.3 reached the last version optimized to handle and show the archives content.
But, in the meantime RemAll becames RemAll-2014 (i.e a project for development to learn more about programming with B4A adding to the base program different functions to better handle the recorded data).
So, while up to the version 1.0.3 the target was to use core code and views only mantaining the application dimension lowest as possible with the
UPGRADE vers 1.1.0 the project start accepting to increase dimension and to use, if needed, some of the many libraries that this language can use.

To introduce you the upgraded RemAll-2014 Vers.1.1.0 the only thing to say is :

Added a Photo archive to collect informations about your pictures but also to show them if they have been loaded in the device.
To do this has been used the Archive No.10 originally used as Free Archive1 to customize or test the program' functions.
The only particularity added is that the last field of the list if contains your picture file name can launch an Image view and show, even if not at the best, your photo.

Note that while the image is visible you you will be able to see its title and the file name at the bottom .
If you touch theTitle you can delete the image and select a new picture in the archive list.

Nothing of important as you can see but this will be the trace of further changes with the target to make live some of the archived data allowing them to access to more complex functions.
Will be possible? I am not sure but..... why do not try.
 

Attachments

  • RemAll-1_1_0.zip
    169.9 KB · Views: 209
  • RemAll1-1-0.jpg
    RemAll1-1-0.jpg
    48.6 KB · Views: 200
  • RemAll1-1-0B.jpg
    RemAll1-1-0B.jpg
    48.7 KB · Views: 212

efsoft

Member
Licensed User
Longtime User
UPGRADE No.2 -
A Step Forwards
Remall-2014 Vers.1.2.1

I wrote previously that the idea was to make to live some of the static informations.
The first result was to add a picture viewer to allow the user to see directly the picture thru the name of files recorded in the archive.(for the moment only if stored into a folder of the archive).Vers.1.1.0

Now looking at the web addresses stored into the records i added also in RemAll a Mini Browser to get connection with the URL directly from the application. I used, once again, a Core view (i.e. WebView) that became a good mini browser although somewhat primitive.
Firstly because no new command has been added to the program because, thanks to layout, i used three existing buttons adding to them few lines of code. Only exception is the use of WebViewExtras (thanks Martin) to clear the Browser cache on exit. (and this has been a good occasion to start to learn and to use some libraries)

I changed code used to automatic search of picture and Url that now can used with any fields of the records that contain compatible data to search.
Also allowed different extensions of pictures (Jpeg,png),
The base program remains the same and it seems to run fine but the added browser will require several updates to be considered the final version and not a beta browser
 

Attachments

  • RemAll-Layout0.jpg
    RemAll-Layout0.jpg
    29.9 KB · Views: 212
  • RemAll-2014_1_2_0.jpg
    RemAll-2014_1_2_0.jpg
    66.8 KB · Views: 196
  • RemAll-1_2_1.zip
    174.6 KB · Views: 205

efsoft

Member
Licensed User
Longtime User
RemAll Update
Vers. 1.2.2


The previous version of the program does not allow the user to visualize the loading of a page when he uses the Web Viewer. It is not a big problem but i noted that to close te viewer during the loading of a page may cause a lock of the web viewer that after this event appears to be unable to load any site .(if this happens you need to fully close the program and restart it to recover the connection ability)
I am still investigating about the matter but, in the meantime, in this updated version i modified the code to get the indication "LOADING" shown in red on top of the screen in order to avoid to close the browser before the full download of the page..(the information disappears as soon as the page is fully loaded. The advice appears changing pages also)
 

Attachments

  • RemAll-2014-1_2_2.jpg
    RemAll-2014-1_2_2.jpg
    44.3 KB · Views: 201
  • RemAll-1_2_2.zip
    174.8 KB · Views: 211

efsoft

Member
Licensed User
Longtime User
AS PROMISED - Part. 7/a
RemAll-2014 Vers.1.2.2

As I have done so far, this time also, i add a comment to the changes made to my program RemAll.
However this time it is not just to talk about the code that it is well known, but to make some considerations on the use of a significant percentage of dynamic elements.
These were added gradually after the replacement of the Lists view with dynamic lists of labels. (Then become editable and flanked by other dynamic objects of different types.)
This type of experiment leads to some considerations on the layout, even before of the code developed for its control and operation.
The attached images that serve as a reference to my comments.

To the left is visible the result obtained with the use of the designer of B4A, which represents the true layout of the program RemAll.
On the right you see the layout (this also apparently made with the designer) that is instead a representation of the dynamic layout, (which did not match any files Bal).

The actual layout uses 35 elements of which slightly more than 1/3 of risultranno visible while using the program.
The hidden layout counts instead 23 (33 in editing state) hidden items but the objects are not only invisible, they do not exist until the program requests their creation (or elimination at the end).
This division is perhaps only the result of my desire to create programs with the fewest number of windows (activities). but still leads to develop different considerations.

The first layout must have the maximum number of controls within a minimum of space and these must be also easily usable by the user.
The first layout presents an exception to the above because it also contains the elements necessary to reproduce your Credit Cards etc..that are not commands for general pourpose.

The second layout came into being with different needs.
Must take into account the position of the fixed elements,to overlap them only if necessary to the function running, and this is easy for components created from time to time, Their position may share the same space with other without making the layout to heavy. Problem that you otherwise meet with fixed elements only into a single designer.

This division (virtual) reiterates what has already been said. namely that;
Established the number of all fixed objects (true layout) the ones added later, to continue the development of the program, should be dynamic objects only. This is, for example, the addition made of an Image View and of a Web View to provide remall of internal browsers created as dynamic items.

The 2 pictures show how these last ones interact with the fixes or already created dynamic controls.
The first shows how all the fixed items are still usable (less 2 maintained invisible) while the first and last field of the list allow user to see picture's title and name of file.

The second image, by adding a web view and changing the behavior of some fixed objects changes the window in a web browser quite usable.
Please note that final single elements added as above do not need (if you want) of count of the active views to be deleted. The RemoveView event can help.

In the next part (7/b) of this text we shall see the full code used to get the wanted result
 

Attachments

  • RemAll-Layout0.jpg
    RemAll-Layout0.jpg
    29.9 KB · Views: 219
  • HiddenLayout.png
    HiddenLayout.png
    15.8 KB · Views: 208
  • RemAll1-1-0.jpg
    RemAll1-1-0.jpg
    48.6 KB · Views: 187
  • RemAll-2014-1_2_2.jpg
    RemAll-2014-1_2_2.jpg
    44.3 KB · Views: 191

efsoft

Member
Licensed User
Longtime User
AS PROMISED - Part. 7/b
RemAll-2014 Vers.1.2.2

Well, it is time to speak about the code,
As previously said the code depends also from the layout chosen.
In our case you do not need of a starting button because you start the required function by a click on the archive fields.
The matter is quite easy. When you click on a label of the list relative to the selected archive if the text of the label contain a key word (I.E jpg, png etc or http,www etc) the item needed to show the field contents, picture or web page woòò be created.
The code used is the following;

Sub Labelio_Click
If BtnBack2.Text = Lang.L(F,42) Then Return
)
If BtnS.Text = Lang.L(F,28) Then Return ) 'these lines lock the use of top bar buttons
If Lfun.Text = Lang.L(F,67) Then Return )
Dim Lio As Label
Lio.Initialize("Labelio")
Lio = Sender
If (Lio.Text).IndexOf(".jpeg") <> -1 Then
FileIm = Lio.Text
CreaImage
Return
End If
If (Lio.Text).IndexOf(".png") <> -1 Then
FileIm = Lio.Text
CreaImage
Return
End If
If (Lio.Text).IndexOf(".jpg") <> -1 Then
FileIm = Lio.Text
CreaImage
Return
End If
.............
...............
If (Lio.Text).IndexOf("http") <> -1 Then
NamUr = Lio.Text
CreaWebView
Return
End If
If (Lio.Text).IndexOf("www.") <> -1 Then
NamUr = "http://" & Lio.Text
CreaWebView
Return
End If
RecSrc = Lio.Text : If RecSrc = "-" Then Return


'Others possible extensions can be tested obviously

The last line gets the value to pass to the Image or Web View (avoiding to utilize empty fields)
If one of the If/End if coded to select the enclosed key search is true then starts the relative dynamic object construction.
To do this the program uses the following code

Sub CreaImage
Dim Im As ImageView
Im.Initialize("ImageView")
Im.Visible = True

'Im.Color = Colors.Gray 'used during the developing time to verify position
Im.BringToFront
Activity.AddView(Im, 0, LG.Top+LG.Height, SceltaLbl.Width, ClblNote.Width)


Note that i fixed dimensions using the values of others differentes items. Usually the instruction should be
Activity.AddView(ViewName, Left, Top, Width, Height) with the dip notation

Im.Gravity = Gravity.Fill
Im.Bitmap = LoadBitmap("/mnt/sdcard/Ricon/", FileIm)
qq = Activity.NumberOfViews : LN = qq-1
End Sub


or for URL browser
(do not forget to add the WebViewExtras library to the project)

Sub CreaWebView
If WL = False Then
BtnF_Click
BtnGo.Gravity = Gravity.RIGHT
BtnGo.Typeface = Typeface.DEFAULT_BOLD
BtnGo.Text = ">>" : BtnGo.Visible = True
BtnEnd.Gravity = Gravity.LEFT
BtnEnd.Typeface = Typeface.DEFAULT_BOLD
BtnEnd.Text = "<<" : BtnEnd.Visible = True
BtnBack2.Text = Lang.L(F,85) '"Chiudi-Browser"
SceltaLbl.Text = Lang.L(F,84)
WV.Initialize ("WV")
WV.JavaScriptEnabled = True
WVx.addJavascriptInterface(WV,"B4A")
Activity.AddView (WV, Label7.Height, BtnEnd.Top, Label4.Width+BtnEnd.Top, SceltaLbl.Width)
WV.Visible = True : WL = True
Lfun.TextColor = Colors.Red : Lfun.Text = Lang.L(F,86)
WV.LoadUrl(NamUr)
.................


The boolean value WL check if the Web View exists and if value is False the webview will be created, while the lines of code that follow modify the title of the 2 buttons, usually invisible, showing them both marked with << or >> to use them with the browser.

Sub BtnEnd_Click
If WL = True Then
WV.Back
Return
End If
If EditText.Text = "" Then Return
IME.HideKeyboard
SearchDat
End Sub


and the same for the other button.
The privacy button also has been used to close the browser changing the code that usually close the activity.

Sub BtnBack2_Click
If WL = True Then
Dim o As Reflector
o.Target = WV
o.RunMethod2("clearCache","True","java.lang.boolean")
BtnGo.Gravity = Gravity.CENTER_HORIZONTAL
BtnGo.Text = "" : BtnGo.Visible = False
BtnEnd.Gravity = Gravity.CENTER_HORIZONTAL
BtnEnd.Text = "" : BtnEnd.Visible = False
If Lfun.Text <> "" Then
WV_PageFinished(UU)
End If
Lfun.TextColor = Colors.Black :
WV.StopLoading
WVx.clearCache(WV,False)
WV.RemoveView
SceltaLbl.Text = Lang.L(F,21)
BtnBack2.Text = Lang.L(F,26)
qq = Activity.NumberOfViews : LN = qq
WL = False
Return
End If
.....................
.....................
Activity.finish
End Sub


We can note that clicking the button the WL value turns False so the previously mentiomed buttons are reinstated in their original function.
To close browser also stop loading and removes the webview but, more important, uses WebViewExtras (WVx) to clear cache.
Last adding to the code are few lines that show the information "loading" any time the browser connects to the request url or a new page is called.
The code uses the WebView events pagefinished and override as shown below.

Sub WV_PageFinished(Url As String)
Lfun.Text = ""
UU = Url
End Sub

Sub WV_OverrideUrl(Url As String) As Boolean
Lfun.Text = Lang.L(F,86)
End Sub


Well, that's all. A I have said many times that I do not want to teach anything, but just to show a little 'code that works for me.
The attached image shows to which of the dymanic items the above code refers.
 

Attachments

  • HiddenLayout1.png
    HiddenLayout1.png
    21 KB · Views: 215
Last edited:
Top