Share My Creation XNoted : Free source

hello,
Of cource, Thank you @Erel for making this possible from us :)

This is the simplest app i have ever made in my life, seriously :)

for the past 3 hours i was wondering what can i make within 1 hour.
and i was writing the ideas in the notepad of the phone then it hit me, why not make a notepad LOL :)

so here it is, a notepad app :p
Not to brag but to let you know that the code is messy and not 100% functional because i made it within 30 minutes :)
Enjoy :)

*The source code is attached :
1- B4A Project
2- Sqlite database


Screenshot_20210119_232004_b4a.example.jpg


Screenshot_20210119_232016_b4a.example.jpg


Screenshot_20210119_232022_b4a.example.jpg
 

Attachments

  • XNoted.zip
    53.5 KB · Views: 558
Last edited:

aeric

Expert
Licensed User
Longtime User
I have a note app which I made when I started using B4A very long time ago.
 

asales

Expert
Licensed User
Longtime User
I have a note app which I made when I started using B4A very long time ago.
Very nice!
Can you share the code?
And of this demo too:
 

sfsameer

Well-Known Member
Licensed User
Longtime User
its only me or else? can't view saved notes after restarting app.
Hello,

Simply :
Go to the activity : Main

then in Activity_Create :

Replace these line :
B4X:
If File.Exists(File.DirInternal,"db.db") Then
        File.Delete(File.DirInternal,"db.db")
        File.Copy(File.DirAssets,"db.db",File.DirInternal,"db.db")
        
        Else
        File.Copy(File.DirAssets,"db.db",File.DirInternal,"db.db")
    End If

With these :
B4X:
If File.Exists(File.DirInternal,"db.db") Then
        'File.Delete(File.DirInternal,"db.db")
        'File.Copy(File.DirAssets,"db.db",File.DirInternal,"db.db")
        
        Else
        File.Copy(File.DirAssets,"db.db",File.DirInternal,"db.db")
    End If

:)
 
Last edited:

AnandGupta

Expert
Licensed User
Longtime User
Hi Saif,

I just downloaded the code and tested. Thanks for it.

Few queries,
  1. Views are created by code, and layout .bal not used. Any reason for it ?
  2. Long touch on notes deletes it, that why you are coping the db in create. Understand it is a quick make.
  3. back key does not exit the app. How to do it ?
Regards,

Anand
 

sfsameer

Well-Known Member
Licensed User
Longtime User
Hi Saif,

I just downloaded the code and tested. Thanks for it.

Few queries,
  1. Views are created by code, and layout .bal not used. Any reason for it ?
  2. Long touch on notes deletes it, that why you are coping the db in create. Understand it is a quick make.
  3. back key does not exit the app. How to do it ?
Regards,

Anand
Hello,

1- When creating the views in code you will have more control on how they are displayed and for me i have always felt more comfortable creating views by code :)
2- The long touch is intended, it's not a mistake it's a function we made to enable the user t o delete the notes when long touching the panel
3- Open the Main Activity and go to the : Sub Activity_Resume
and delete :
StartActivity(MainMenu)
 

AnandGupta

Expert
Licensed User
Longtime User
1- When creating the views in code you will have more control on how they are displayed and for me i have always felt more comfortable creating views by code :)
2- The long touch is intended, it's not a mistake it's a function we made to enable the user t o delete the notes when long touching the panel
3- Open the Main Activity and go to the : Sub Activity_Resume
and delete :
StartActivity(MainMenu)
Thanks for the reply.

1. I understand. But as far as I remember, Erel suggested to use designer most of the time. So just wondering, if we could have used two layouts and adjusted them. Just my thoughts. Your work is very good and I appreciate it that you gave it for free. 👍
2. Fine, just a confirm message will be best here as I was surprised to see the notes vanishing. :)
3. Thanks for the tip.

Regards,

Anand
 

sfsameer

Well-Known Member
Licensed User
Longtime User
Thanks for the reply.

1. I understand. But as far as I remember, Erel suggested to use designer most of the time. So just wondering, if we could have used two layouts and adjusted them. Just my thoughts. Your work is very good and I appreciate it that you gave it for free. 👍
2. Fine, just a confirm message will be best here as I was surprised to see the notes vanishing. :)
3. Thanks for the tip.

Regards,

Anand
Hello,

1- It's all about use case scenario and in this case it was faster to do that :)
2- there you go :
B4X:
Sub pNote_LongClick
    Try
        Msgbox2Async("Are you sure you want to delete the note?", "Confirm", "Yes", "Cancel", "No", Null, False)
        Wait For Msgbox_Result (Result As Int)
        If Result = DialogResponse.POSITIVE Then
            Dim p As Panel
            p = Sender
            Dim str As String
            str = "delete from NotesInfo where NotesID="&p.Tag
            Main.sql1.BeginTransaction
            Main.sql1.ExecNonQuery(str)
            Main.sql1.TransactionSuccessful
            Main.sql1.EndTransaction
        
            Load_Data
        End If
    
        
    Catch
        Log(LastException)
    End Try
End Sub

3- :)
 

asales

Expert
Licensed User
Longtime User
1. I understand. But as far as I remember, Erel suggested to use designer most of the time. So just wondering, if we could have used two layouts and adjusted them. Just my thoughts. Your work is very good and I appreciate it that you gave it for free. 👍
Hello @sfsameer , I understand that is better to you, but I agree with @AnandGupta .

I get your first realases in the forum, but (to me) is very unproductive to create a layout in code.
Do you saw the work of @ramezaniabbas in this post?
He created great layouts too, but put all the components in the layout file and made adjustments and animations in the code.

As you saw too, the users prefers MySQL instead MSSQL and now you provide the script to MySQL.
Maybe you can create a mid term with layouts too - like ramezaniabbas makes.

Think this.

Best regards and keep with the great work.
 

sfsameer

Well-Known Member
Licensed User
Longtime User
Hello @sfsameer , I understand that is better to you, but I agree with @AnandGupta .

I get your first realases in the forum, but (to me) is very unproductive to create a layout in code.
Do you saw the work of @ramezaniabbas in this post?
He created great layouts too, but put all the components in the layout file and made adjustments and animations in the code.

As you saw too, the users prefers MySQL instead MSSQL and now you provide the script to MySQL.
Maybe you can create a mid term with layouts too - like ramezaniabbas makes.

Think this.

Best regards and keep with the great work.
Hello,

Our next releases will be using the layouts and that's a promise :)

But for me I always loved creating the design in code because it gives me more power to control it and manipulate it as my needs, for example creating a custom view or importing wrapped design :)

Thank you very much for your beautiful suggestion ❤

Saif
 
Top