LucaMs Expert Licensed User Longtime User Aug 18, 2024 #1 In B4XPage_Created of B4XMainPage I have this code: B4X: xivSnapshot.mBase.Width = 0 Log("On start: " & xivSnapshot.mBase.Width) The log does not report zero but the initial width of the View (350, just to say). I tried many things: SetLayoutAnimated(0, ... Sleep(....) xivSnapshot.Update
In B4XPage_Created of B4XMainPage I have this code: B4X: xivSnapshot.mBase.Width = 0 Log("On start: " & xivSnapshot.mBase.Width) The log does not report zero but the initial width of the View (350, just to say). I tried many things: SetLayoutAnimated(0, ... Sleep(....) xivSnapshot.Update
teddybear Well-Known Member Licensed User Aug 18, 2024 #2 Do you mean this? B4X: Log("Not set: "&B4XImageView1.mBase.Width) B4XImageView1.mBase.Width=0 Log("Set: "&B4XImageView1.mBase.Width) Logs B4X: Not set: 270 Set: 0 Upvote 0
Do you mean this? B4X: Log("Not set: "&B4XImageView1.mBase.Width) B4XImageView1.mBase.Width=0 Log("Set: "&B4XImageView1.mBase.Width) Logs B4X: Not set: 270 Set: 0
LucaMs Expert Licensed User Longtime User Aug 19, 2024 #3 teddybear said: Do you mean this? B4X: Log("Not set: "&B4XImageView1.mBase.Width) B4XImageView1.mBase.Width=0 Log("Set: "&B4XImageView1.mBase.Width) Logs B4X: Not set: 270 Set: 0 Click to expand... Where did you write that code? And is it B4J? I don't get zero. Attachments xiv.zip xiv.zip 2.1 KB · Views: 369 Upvote 0
teddybear said: Do you mean this? B4X: Log("Not set: "&B4XImageView1.mBase.Width) B4XImageView1.mBase.Width=0 Log("Set: "&B4XImageView1.mBase.Width) Logs B4X: Not set: 270 Set: 0 Click to expand... Where did you write that code? And is it B4J? I don't get zero.
teddybear Well-Known Member Licensed User Aug 19, 2024 #4 It is B4J, it works in b4xpages project. I don't know why it does not work as you said at post#1 Attachments Project.zip Project.zip 8.8 KB · Views: 400 Upvote 0
LucaMs Expert Licensed User Longtime User Aug 19, 2024 #5 teddybear said: It is B4J, it works in b4xpages project. I don't know why it does not work as you said at post#1 Click to expand... This is increasingly strange, because I had tried it in a B4XPages-B4J project, initially using SetLayoutAnimated with zero duration (I only needed to resize the B4XImageView, I didn't need to display the animation). Something really strange happens using SetLayoutAnimated with 0 duration, but it's a long story to "tell". Upvote 0
teddybear said: It is B4J, it works in b4xpages project. I don't know why it does not work as you said at post#1 Click to expand... This is increasingly strange, because I had tried it in a B4XPages-B4J project, initially using SetLayoutAnimated with zero duration (I only needed to resize the B4XImageView, I didn't need to display the animation). Something really strange happens using SetLayoutAnimated with 0 duration, but it's a long story to "tell".