klaus Expert Licensed User Longtime User Nov 6, 2010 #1 How can we access the images loaded in the Image Files list in the Designer ? How can we change variables: String to Double, Double to String, Int to Double etc. ? Best regards.
How can we access the images loaded in the Image Files list in the Designer ? How can we change variables: String to Double, Double to String, Int to Double etc. ? Best regards.
agraham Expert Licensed User Longtime User Nov 6, 2010 #2 There's a special file path for the assets. SmileyBitmap.Initialize(File.DirAssets, "smiley.gif") 'load the smiley file You can't change the type of a variable once it's declared but you can assign one type to another and Basic4Android will try to convert it. Dim d As Double Dim i As Int Dim s d = 123 s = d ' s contains "123.0" due to a floating point string conversion i = d s = i ' s contains "123" as it's an integer conversion
There's a special file path for the assets. SmileyBitmap.Initialize(File.DirAssets, "smiley.gif") 'load the smiley file You can't change the type of a variable once it's declared but you can assign one type to another and Basic4Android will try to convert it. Dim d As Double Dim i As Int Dim s d = 123 s = d ' s contains "123.0" due to a floating point string conversion i = d s = i ' s contains "123" as it's an integer conversion
Erel B4X founder Staff member Licensed User Longtime User Nov 6, 2010 #3 How can we access the images loaded in the Image Files list in the Designer ? Click to expand... The BitmapDrawable has an Image File property which you can set to one the files. As an example, change the Activity Drawable field to BitmapDrawable and then you will be able to set the file.
How can we access the images loaded in the Image Files list in the Designer ? Click to expand... The BitmapDrawable has an Image File property which you can set to one the files. As an example, change the Activity Drawable field to BitmapDrawable and then you will be able to set the file.