InitializeSample problem S3

Malky

Active Member
Licensed User
Longtime User
Hi I have started my app and wanted to see how it would look, so tested it and it's fine.

To double check, I compiled what I have and sent it to my mate who has a Galaxy S3. He installed the app and he cannot get the images to appear anywhere near the same way as mine?

I am using the InitializeSample method like so:

Bitmap1.InitializeSample(SD_PATH, Cursor1.Getstring("icon"),65dip,65dip)

Two Screenshots supplied.

Cheers,

Malky
 

Attachments

  • S3 Menu.jpg
    S3 Menu.jpg
    32.3 KB · Views: 186
  • menu.png
    menu.png
    23.7 KB · Views: 208

Malky

Active Member
Licensed User
Longtime User
Hi Erel, the code is in here within a ScrollView:-
B4X:
Sub FillMenuScrollView
'DBUtils.InsertMaps(SQL1, "langs", ListOfLangs)
   Log("Language -----" & language)

   Dim Cursor1 As Cursor
   Cursor1 = SQL1.ExecQuery("select id, " & language & " , icon from menus order by id" )
      Log("count = " & Cursor1.RowCount)
   'sqlRowCount= Cursor1.RowCount

   Dim Bitmap1 As Bitmap
   Dim Panel0 As Panel
   Dim pnlMenu As Panel
   Dim PanelTop, PanelHeight, Label2Top As Int
   
   PanelTop=0
   Panel0=scvMenu.Panel
   Panel0.Color=Colors.Gray
   For i=0 To Cursor1.RowCount - 1
      Cursor1.Position = i
      Log(Cursor1.Getstring("icon"))
      Bitmap1.InitializeSample(SD_PATH, Cursor1.Getstring("icon"),65dip,65dip)
      Dim pnlMenu As Panel
      Dim ImageView1 As ImageView
'      pnlLanguage.Visible = False
       pnlMenu.Initialize("pnlMenu")
      PanelHeight=72dip
      Label2Top=65dip
      
      Panel0.AddView(pnlMenu,0,PanelTop,scvMenu.Width,PanelHeight)
      pnlMenu.Color=Colors.Black
      Dim Label1, Label2 As Label
      
      Label1.Initialize("")
      pnlMenu.AddView(Label1,80dip,10dip,240dip,30dip)
'      Label1.Color=Colors.Black
      Label1.Color=Colors.Transparent
      Label1.Textsize=22
      Label1.Tag=Cursor1.GetString(language)
      Label1.Text=Cursor1.GetString(language)

      Label2.Initialize("")
      pnlMenu.AddView(Label2,80dip,35dip,240dip,30dip)
      Label2.TextSize=14
      Label2.Tag=Cursor1.GetString("id")
      Label2.Text=""
      Label2.TextSize=14
'      Label2.TextColor=Colors.Black
      Label1.Color=Colors.Transparent

      ImageView1.Initialize("")
      pnlMenu.AddView(ImageView1,5dip,5dip,66dip,66dip)
      ImageView1.Bitmap=Bitmap1
      pnlMenu.Visible = True
      PanelTop=PanelTop+PanelHeight+1dip
   Next
   Cursor1.Close
   Log("Menuview Finished!")
   Panel0.Height=PanelTop
   
   'If Started = 1 Then
      scvMenu.Visible = False
   'End If
   'ToastMessageShow("Started = " & Started, True)
   
   
End Sub

Just seems weird? I thought it should automatically scale?

Malky
 
Upvote 0

Malky

Active Member
Licensed User
Longtime User
Hi Erel, I'll try the GRAVITY bit when I get home.

I came across the Custom Scrollview and it looked like what I needed, so here I am :)

I don't mind what I use as long as it works.

It is a new version of an older app I had (not with b4a) and I want to just get it completed and working correctly, then take my time to learn more on b4a and start some other apps such as games etc, without rushing.

Cheers,

Malk
 
Upvote 0

Malky

Active Member
Licensed User
Longtime User
Ok, found what I did wrong, so deleted earlier message and did what you asked Erel. Works a treat!!!!!

Thank you so much once again.

Malky
 
Upvote 0
Top