Android Question how to show text/image/video in an app retrieved from mysql server

GudEvil

Member
Licensed User
Longtime User
hi

i have a website which display information containing image/text/video. which will update few times a week

I want to develop a frontend app to same info in android.

It should show listings with all different categories.n once it selected particular it will open in brief..

till now I design basic workflow of app (navdrawer n tabhost with panel.)

how to display info in an app

scrollview?? panels...how clicking is managed...
it should also have paging, i mean retrieve 5 record n then 5 next)

i tried sql connection n it is working but how to show data..something similar to webpage...

thanks
 

sorex

Expert
Licensed User
Longtime User
yes, a scrollview where you generate imageviews on the fly based on the data that you retrieved from the server.

I don't believe imageviews support urls so you'll need to write your download code aswell.
 
Upvote 0

GudEvil

Member
Licensed User
Longtime User
thanks for the reply.

can I add scrollview to panel??

my requirement is first I load home page with five listing (text n image)
if I select particlar then I will open detailed text

also from menu I had to choose videos, where all video listing will show..n it shold be click n then play..

till now my navdrawer working correctly but i used panels for user response?? how can I changed to to worked for my case to se scroll view.

also paging ?? how to

can I add buttons (click action) in scroll view..
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
can I add scrollview to panel??

sure.

I never used navdrawer so I can't answer that. your images have their own event which you enter during the initialize command.

for paging you just work with counters. you eiter work with page 1,2,3 or with record offsets 0,5,10,15
 
Upvote 0

GudEvil

Member
Licensed User
Longtime User
ok..

can scrollview be added/initiase to panel??/ i guessed/hoped so

image i got it, but let say I have a sql record containing image/text/video. I got to display five records.. If I click on any single entry it should generate event.
Also it should able to differetiate image/video.text event

if I say I display in tabular format, then how to achieve this..

many many thanks
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
you can add a scrollview to a panel but why do you need the extra panel?

the tabular stuff... in untested code it could be something like this

B4X:
tilesize=100%x/2
for x=page*5 to (page+1)*5
 dim iv as imageview
 iv.initialize("ivClick")
 iv.tag(x)
 mypanel.addview(iv,(x mod 2)* tilesize, floor(x/2)*tilesize,tilesize,tilesize)
next

sub ivClick_click
 dim iv as imageview
 iv=sender
 log(iv.tag &" clicked")
end sub

that should (if it works) generate a 3 rows where 2 rows have 2 images and 1 only 1.
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
the idea is the same.

he just grouped the image, progressbar and a few labels in to a panel.
then you can have 1 click for everything in the panel.
 
Upvote 0
Top