Android Example FREE Source Code's !

Discussion in 'Tutorials & Examples' started by ilan, Apr 23, 2015.

  1. freedom2000

    freedom2000 Well-Known Member Licensed User

    Thank you Ilan
     
  2. Peter Simpson

    Peter Simpson Expert Licensed User

    Hey @ilan,
    I've just been looking at your website, nice...
     
  3. ilan

    ilan Expert Licensed User

    thanx peter, your new pic is a little bit scary :D
     
  4. ilan

    ilan Expert Licensed User

    MySql+PHP (b4j/b4a/b4i)

    here is a simple example of how to use mysql+php.
    this example icludes 2 screens:

    * Login Screen
    * Data Preview Screen (Read,Delete,Edit,Count,Insert)

    ** all free sources from me are free for personal use only, you may not sell them or publish them on your site or any forum, they are meant to learn from them. By downloading them you agree!

    screen1.jpg

    screen2.jpg
     

    Attached Files:

    Last edited: May 19, 2016
    Procesor, iz0ndg, Levit and 7 others like this.
  5. DonManfred

    DonManfred Expert Licensed User

    You must see him LIVE. THAT´S SCARY! :D
     
    Peter Simpson, Roger Daley and ilan like this.
  6. ilan

    ilan Expert Licensed User

    Have you?
     
  7. DonManfred

    DonManfred Expert Licensed User

    Hangout Videochat. A lot of times...

    But never met him LIVE. One Day we will....
     
  8. PABLO2013

    PABLO2013 Active Member Licensed User

    gracias
     
  9. ilan

    ilan Expert Licensed User

    here is an example how you can draw circles randomly without overlapping each other.

    ** all free sources from me are free for personal use only, you may not sell them or publish them on your site or any forum, they are meant to learn from them. By downloading them you agree!

    B4J:

    Code:
    #Region  Project Attributes
        
    #MainFormWidth: 600
        
    #MainFormHeight: 400
    #End Region

    Sub Process_Globals
        
    Private fx As JFX
        
    Private MainForm As Form
        
    Dim c As Canvas
        
    Type crl(x As Float,y As Float,r As Int)
        
    Dim circle_list As List
    End Sub

    Sub AppStart (Form1 As Form, Args() As String)
        MainForm = Form1
        MainForm.SetFormStyle(
    "UNIFIED")
        MainForm.Show
        c.Initialize(
    "canvas")
        circle_list.Initialize
        MainForm.RootPane.AddNode(c,
    0,0,MainForm.RootPane.Width,MainForm.RootPane.Height)
        fill_circles(
    1000)
    End Sub

    Sub fill_circles(amount As Int)
        
    Dim overlap As Boolean
        circle_list.Clear
        
    Dim i As Int = 0

        
    Do Until i = amount
            
    Dim circle, old_crl As crl
            
    circle.r = Rnd(2,25)
            
    circle.x = Rnd(circle.r,MainForm.RootPane.Width-(circle.r*2))
            
    circle.y = Rnd(circle.r,MainForm.RootPane.Height-(circle.r*2))

            overlap = 
    False
            
    For j = 0 To circle_list.Size - 1
                old_crl = circle_list.Get(j)
                
    If distance_x(circle.x,old_crl.x,circle.r+old_crl.r) And distance_y(circle.y,old_crl.y,circle.r + old_crl.r) Then
                    overlap = 
    True
                    
    Exit
                
    End If
            
    Next

            
    If Not(overlap) Then
               c.DrawCircle(
    circle.x,circle.y,circle.r,fx.Colors.ARGB(100,Rnd(0,255),Rnd(0,255),Rnd(0,255)),True,0)
               circle_list.Add(
    circle)
               i = i + 
    1
            
    End If
        
    Loop
    End Sub

    Sub distance_x(x1 As Float,x2 As Float,r2 As Int) As Boolean
        
    Return(Abs(x1-x2)<r2)
    End Sub

    Sub distance_y(y1 As Float,y2 As Float,r2 As Int) As Boolean
        
    Return(Abs(y1-y2)<r2)
    End Sub
    and here is an example of a raining day in my car

    Code:
    #Region  Project Attributes
        
    #MainFormWidth: 600
        
    #MainFormHeight: 400
    #End Region

    Sub Process_Globals
        
    Private fx As JFX
        
    Private MainForm As Form
        
    Dim c As Canvas
        
    Type crl(x As Float,y As Float,r As Int)
        
    Dim circle_list As List
        
    Dim t1, wiper As Timer
        
    Dim wiperCD As Int = 80
        
    Dim deg As Double = -90
        
    Dim now_back As Boolean
    End Sub

    Sub AppStart (Form1 As Form, Args() As String)
        MainForm = Form1
        MainForm.SetFormStyle(
    "UNIFIED")
        MainForm.Show
        c.Initialize(
    "canvas")
        circle_list.Initialize
        MainForm.RootPane.AddNode(c,
    0,0,MainForm.RootPane.Width,MainForm.RootPane.Height)
        t1.Initialize(
    "t1",50)
        t1.Enabled = 
    True
        wiper.Initialize(
    "wiper",10)
    End Sub

    Sub t1_tick
        
    'c.ClearRect(0,0,c.Width,c.Height)
        fill_circles(Rnd(10,25))
        wiperCD = wiperCD - 
    1
        
    If wiperCD < 0 Then wiper.Enabled = True
    End Sub

    Sub wiper_tick
        
    If deg > 90 Then now_back = True
        
    If now_back =  True Then deg = deg - 2 Else deg = deg + 2  

        
    If deg < -90 Then
            wiper.Enabled = 
    False
            deg = -
    90
            wiperCD = 
    80
            now_back = 
    False
        
    Else
            c.DrawRectRotated(MainForm.Width/
    2,0,20,MainForm.Height*2,fx.Colors.White,True,0,deg)  
        
    End If
    End Sub

    Sub fill_circles(amount As Int)
        
    Dim overlap As Boolean
        circle_list.Clear
        
    Dim i As Int = 0
     
        
    Do Until i = amount
            
    Dim circle, old_crl As crl
            
    circle.r = Rnd(2,25)
            
    circle.x = Rnd(circle.r,MainForm.RootPane.Width-(circle.r*2))
            
    circle.y = Rnd(circle.r,MainForm.RootPane.Height-(circle.r*2))

            overlap = 
    False
            
    For j = 0 To circle_list.Size - 1
                old_crl = circle_list.Get(j)
                
    If distance_x(circle.x,old_crl.x,circle.r+old_crl.r) And distance_y(circle.y,old_crl.y,circle.r + old_crl.r) Then
                    overlap = 
    True
                    
    Exit
                
    End If
            
    Next 
         
            
    If Not(overlap) Then
               c.DrawCircle(
    circle.x,circle.y,circle.r,fx.Colors.ARGB(100,Rnd(0,255),Rnd(0,255),Rnd(0,255)),True,0)
               circle_list.Add(
    circle)
               i = i + 
    1
            
    End If
        
    Loop
    End Sub

    Sub distance_x(x1 As Float,x2 As Float,r2 As Int) As Boolean
        
    Return(Abs(x1-x2)<r2)
    End Sub

    Sub distance_y(y1 As Float,y2 As Float,r2 As Int) As Boolean
        
    Return(Abs(y1-y2)<r2)
    End Sub
    wiper.jpg
     

    Attached Files:

    Last edited: May 19, 2016
    Levit and ugokhan like this.
  10. ilan

    ilan Expert Licensed User

    hallo b4a community, it has been a long time but i got a new surprise for you.

    B4A MultiTouch Piano Example. You will need @agraham Gestures Lib to run this example.

    Have fun :)

    ** all free sources from me are free for personal use only, you may not sell them or publish them on your site or any forum, they are meant to learn from them. By downloading them you agree!

    piano_keys.jpg
     

    Attached Files:

    Last edited: May 19, 2016
    metrick, Daniel-White, aidymp and 9 others like this.
  11. ilan

    ilan Expert Licensed User

    hi again,

    here you have a fireworks class that you can use in all b4x platforms (after making some minor changes)

    have fun :) (and dont forget to like, if you like it of course :p)

    ** all free sources from me are free for personal use only, you may not sell them or publish them on your site or any forum, they are meant to learn from them. By downloading them you agree!

    (Source is included in the zip file)

    firegif.gif
     

    Attached Files:

    Last edited: Jul 4, 2016
  12. cambopad

    cambopad Active Member Licensed User

    Nice firework effects! Thanks you for sharing!
     
  13. lazreg

    lazreg Active Member Licensed User

    Hi ilan,, How to open the project in b4a? i didn't find a project file
     
  14. ilan

    ilan Expert Licensed User

    Hi,

    Its a b4j project but u can use the class module also in b4a. The code should be 90% the same. So it should not be to hard to convert it to b4a.
     
    lazreg likes this.
  15. lazreg

    lazreg Active Member Licensed User

    thanl u so much i will try..
     
  16. Toky Olivier

    Toky Olivier Member Licensed User

    Thank you so much for all of these sources. So kind of you to share them...
     
    ilan likes this.
  17. Johan Hormaza

    Johan Hormaza Active Member Licensed User

    Thanks ILAN. We are waiting for other projects soon, but with the new XUI2D library, since you are very good at this.
    Blessings!
     
    Toky Olivier likes this.
  18. FernandoMassa

    FernandoMassa Member Licensed User

    sorry, I know that this post has been done for over 3 years, but would you have the sources of this game to make it available again?
    thanks :)
     
  19. ilan

    ilan Expert Licensed User

    I will try to make it using xui2d when i will find the time so u can run it on all b4x products.
     
    b4aAmateur and Johan Hormaza like this.
  20. victormedranop

    victormedranop Active Member Licensed User

    hi, what license are we using. Gpl, Apache.

    thanks

    Victor Medrano
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice