Android Tutorial How they do... #3

Mrjoey

Active Member
Licensed User
Longtime User
Tnx man i will try this , im now focusing on the file list and i have a quick question , i ve created a list containing all artists using
Artist <> oldartist , and its working well , now i want to click on that artist and display all songs by this artist , is that a quick way to do that? My ideas are lost tnx
 

Informatix

Expert
Licensed User
Longtime User
??? It's what I explain in the tutorial.
 

Mrjoey

Active Member
Licensed User
Longtime User
i think
AddAlbumItems(pnlAlbums, ID) is missing , i would like to know how to add albums from MB and then fill the songs from this album?
 

Mrjoey

Active Member
Licensed User
Longtime User
yes , anyway i will figure out how to implement my point in my app tnx for help man
 

Mrjoey

Active Member
Licensed User
Longtime User
B4X:
For i = 0 To (m.Size / 9) - 1
        Artist = m.Get("Artist" & i)
        If Artist <> DernArtist Then
            lstAudio.AddHeader(Artist)
            DernArtist = Artist
        End If
it adds a header for each artist , i would like to press on that header and fill a list of its items , without adding all the list in the loop , is that possible?
 

Informatix

Expert
Licensed User
Longtime User
I'm not sure that I still have the code of this tutorial (I can't find it) but AddAlbumItems was probably populating the panel of items with views. The contents was read with the MediaBrowser library by filtering the result of GetMediaAudioList (if Artist = "the artist that I want" Then).
 

Mrjoey

Active Member
Licensed User
Longtime User
can u give me an idea of doing this loop?
B4X:
For i = 0 To (m.Size / 9) - 1
        Artist = m.Get("Artist" & i)
        If Artist <> DernArtist Then
            lstAudio.AddHeader(Artist)
            DernArtist = Artist
        End If
        lstAudio.AddItemNoChkbx(m.Get("ID" & i), m.Get("Title" & i), m.Get("Album" & i),Null)
    Next

this loop add 1 header for 1 artist each and below a list of songs from this artist.
so in the filled map i have all artist names , so if i want to request lets say artist3 and then fill all songs from this artist3 how it could be? i think to make another map but how to fill it the way i can request artists by names and gives me the songs of the requested artist?
 

Informatix

Expert
Licensed User
Longtime User
If I understand you well, you have to filter the result:
If Artist = "the artist that I want" Then
 

Mrjoey

Active Member
Licensed User
Longtime User
If I understand you well, you have to filter the result:
If Artist = "the artist that I want" Then
yeah tnx it helped and worked great , tnx for u passion
anyway i have an outofmemory error and i started a new thread now called "got outofmemory error" i appreciate if u took a look at it since the calling handle includes one of urs wich is "createscaledbitmap" thank u in advance
 

Mrjoey

Active Member
Licensed User
Longtime User
these are buttons with statelist bitmaps , actually u have to pick up a graphic design sush as this , the design should be in psd format and u open it with photoshop and export each layer a s png files and transparency enabled , then u open the designer in B4A and design each button after u copy the png files onto ur project files called "Files" , if u want more help i can help u , i think mr Informatix has a small example about how to create statelist buttons if im not wrong programmaticaly.....
 

LucaMs

Expert
Licensed User
Longtime User
I think that it is better to start a new thread for this question.

Yes, I think so too, I did not want to sully this thread, but I did not know where ("Questions" is for B4A, this is more a question about graphic).


Thanks for help, Mrjoey. I'll try to do something.
I do not need to get exactly that interface. It is my technical curiosity, which can be useful to many people, I think.

Great tutorial, Informatix, thanks
 
Last edited:

Mrjoey

Active Member
Licensed User
Longtime User
hey Mr Informatix , i need some help with this line
B4X:
If spMode.SelectedIndex = 0 Then
        Dim Ratio As Float
        Ratio = (MaxAngle - MinAngle) / 100
        Activity.Title = Angle & "°  " & Round((Angle - MinAngle) / Ratio) & "/100"
    Else
im trying to change a number between 20 and 20000 so
B4X:
Round((Angle - MinAngle) / Ratio) *20000
is giving me a changing of 75 per step so when the angle is -135 its giving 0 and - 134 is giving 74
i tried to divide the ratio by 20000 but the same result , is there any equation to change number between 20 to 20000 with step = 1
im using rotary knob mode , tnx
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…