U
unba1300
Guest
Anyone have any idea why this would not look right on the Galaxy S4 when it looks fine on all other devices in UI Cloud?
The goal is to add a file name to either a SingleLineLayout (text color gray) or TwoLinesLayout (text color white) depending on weather or not the file is found in a list of previously downloaded files. I am using AutoScaleAll in the designer, but doubt that makes any difference in this case? Thanks.
B4X:
lstDownload.SingleLineLayout.Label.TextColor= Colors.Gray 'Use to show files already downloaded.
lstDownload.TwoLinesLayout.Label.TextColor= Colors.White
lstDownload.SingleLineLayout.ItemHeight = 30dip
lstDownload.TwoLinesLayout.ItemHeight = 30dip
lstDownload.SingleLineLayout.Label.Gravity = Gravity.CENTER_VERTICAL
lstDownload.TwoLinesLayout.Label.Gravity = Gravity.CENTER_VERTICAL
lstDownload.SingleLineLayout.Label.TextSize = 18
lstDownload.TwoLinesLayout.Label.TextSize = 18
lstDownload.SingleLineLayout.Label.Height= 30dip
lstDownload.TwoLinesLayout.Label.Height= 30dip
Dim out As OutputStream
out = File.OpenOutput(File.DirInternal, "serFileList", False)
File.Copy2(Job.GetInputStream, out)
out.Close
lstFilesUploaded = File.ReadList(File.DirInternal, "serFileList")
lstFilesUploaded.Sort(True)
For i = 0 To Main.lstdownloadedfiles.Size-1
strDownloadedFiles = strDownloadedFiles & CRLF & Main.lstdownloadedfiles.Get(i)
Next
Dim varTempFile As String
For i = 0 To lstFilesUploaded.Size-1
varTempFile = lstFilesUploaded.Get(i)
If varTempFile.EndsWith(".zip") Then
If strDownloadedFiles.Contains(varTempFile) Then 'Previously downloaded.
lstDownload.AddSingleLine(varTempFile.Replace(".zip", "")) 'Add to list of files available for download in app.
Else 'Not previously downloaded.
lstDownload.AddTwoLines(varTempFile.Replace(".zip", ""), "") 'Add to list of files available for download in app.
End If
End If
Log("varTempFile = " & varTempFile)
Next
Last edited by a moderator: