Android Question Newbie questions

cemopolat

Member
Licensed User
I am planning to get the latest full B4A + B4i for a simple(?) project and would like to know if the followings are possible without being an expert on B4A (and with a good VB + VB.net background):
  1. Working with an offline SQLite db
  2. Retrieving and showing binary db content of types: .html, .png, .jpeg, .svg and very small PDF fragments, all embedded in the local SQLitedb
  3. Creating semi-transparent buttons/links "on the fly" and assign some actions to them (mostly for navigating to other pages/contents accordingly)
  4. Synchronizing the offline SQLite db with an online one (rarely, through http or ftp)
  5. Are all the above also possible in B4i without too much change in code ?
If you think that the above are very difficult or time consuming for a newbie, do you suggest me to outsource it on another forum on this community (such as "job offers") ?

Sorry if this is not the right place to ask and thanks in advance...
 
Last edited:

MarkusR

Well-Known Member
Licensed User
u need some weeks to understand b4x. here in the community you will find much example source codes.
for .svg and PDF if you will view it in app i guess you need a third party library.
for managing sqllite database i use "DB Browser for SQLite". binary data you store in blob type.
for web request we have okhttp & okhttputils2
creating ui in b4a at runtime is easy.
for html we have a webview control.
for multiplatform developing you need nerves of steel :eek: you can use b4x or xamarin or native android studio / xcode
 
Upvote 0

cemopolat

Member
Licensed User
Markus, thank you for your guidance.
Converting other formats to html can make more sense then (if we only have a web-view control).
Creating semi-transparent buttons on the fly and assigning dynamic navigating actions to them is mandatory for this project, is that also possible ?
To better explain:
  • On each screen, I will retrieve a content from the db (probably embedded as html)
  • I will retrieve several options from db related to that screen
  • I will create a semi-transparent button for each option (at runtime)
  • Each button will navigate to another screen depending on what is stored in related record
 
Upvote 0

MarkusR

Well-Known Member
Licensed User
i think you should install trial version https://www.b4x.com/b4a.html
this is a webview and a native button with transparent background.
Screenshot_2018-05-12-23-25-59.png
 
Upvote 0

MarkusR

Well-Known Member
Licensed User
you can add this buttons to any "view".
for transparent see Background property.
B4X:
x=0
y=0
Dim ButtonX As Button
            ButtonX.Initialize("Button")
           Dim draw As ColorDrawable
           draw.Initialize(Colors.ARGB(128,255,0,0),16)
           ButtonX.Background=draw

        ButtonX.Tag = your id/class/type here
        Activity.AddView(ButtonX,x*33%x,y*100dip,33%x, 100dip)

B4X:
Sub Button_Click
   
    Dim Button1 As Button
    Button1 = Sender
               
End Sub
 
Last edited:
Upvote 0

cemopolat

Member
Licensed User
Now things getting more clear; we can handle any number of "dynamically created" button's click event in a single method then.
That was a great tip, thank you very much again !
 
Upvote 0
Top