Hi
I'm using a scrollview to show data in my app.
Works fine in Galaxy S2,S3,Tab7 and Tab10.1, but not in low resolutions devices like Galaxy Mini and Galaxy Duo. The labels and imageviews are out of position.
Here is the code i'm using to display the labels and images:
I think must be something with dip and width convertion.
I'm using a scrollview to show data in my app.
Works fine in Galaxy S2,S3,Tab7 and Tab10.1, but not in low resolutions devices like Galaxy Mini and Galaxy Duo. The labels and imageviews are out of position.
Here is the code i'm using to display the labels and images:
B4X:
lblEquipe1.Initialize("View")
PainelLinha.AddView(lblEquipe1,4dip,PanelHeight-20dip,scvMain.Width/2dip,20dip)
lblEquipe1.Gravity = Gravity.CENTER_HORIZONTAL
lblEquipe1.Color=Colors.Transparent
lblEquipe1.TextColor = Colors.Black
lblEquipe1.TextSize = 14
lblEquipe1.text=TrocaNomeEquipe( Resultado(i).Jogo(j).Equipe1)
' exibe o nome da equipe 2
lblEquipe2.Initialize("View")
PainelLinha.AddView(lblEquipe2,scvMain.Width - (scvMain.Width/2dip)-4dip,PanelHeight-20dip,scvMain.Width/2dip,20dip)
lblEquipe2.Gravity = Gravity.CENTER_HORIZONTAL
lblEquipe2.Color=Colors.Transparent
lblEquipe2.TextColor = Colors.black
lblEquipe2.TextSize = 14
lblEquipe2.text=TrocaNomeEquipe( Resultado(i).Jogo(j).Equipe2)
'exibe o escudo da equipe 1
Bitmap1.Initialize(File.DirAssets,RetornaEscudo(Resultado(i).Jogo(j).Equipe1) & ".png")
ivEscudoTime1.Initialize("View")
PainelLinha.AddView(ivEscudoTime1,((lblEquipe1.Width - 54dip) / 2) + lblEquipe1.left , lblEquipe1.Top - 60dip, 54dip, 60dip)
ivEscudoTime1.bitmap=Bitmap1
I think must be something with dip and width convertion.