Android Question SetVisibleAnimated working too fast

BaGRoS

Active Member
Licensed User
Longtime User
Hi!

I have used
B4X:
ImageView1.SetVisibleAnimated(10000, True)
and ImageView1 is visible, but veeeery fast, not 10 second...
Why?

Best regards
 

DonManfred

Expert
Licensed User
Longtime User
can you upload a sample project which shows the problem?
 
Upvote 0

BaGRoS

Active Member
Licensed User
Longtime User
Yes, of coz
And I have second problem, if I start in emulator then always have error.
 

Attachments

  • FollowMe.zip
    7.2 KB · Views: 177
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
dont try to use visibleanimated with a time of 10 seconds and a line later you call visibleanimated to hide it.

Call the animation when the activity is running (after or in resume). Set a timer to check things after the time is gone (maybe hide the label).

Maybe you are complicating things.

What exatly you want to archieve???
 
Upvote 0

BaGRoS

Active Member
Licensed User
Longtime User
On Galaxy S7
B4X:
Sub Activity_Resume
    ImageView1.SetVisibleAnimated(10000,True) '10 sec to show
    ImageView1.SetVisibleAnimated(10000,False)
   
    'reklamy
    AdView1.Resume
   
End Sub
shows immediately disappears approx. 1.5 seconds
 
Upvote 0

BaGRoS

Active Member
Licensed User
Longtime User
I want to show ImageView (for now) in ~200ms, and hide in ~200ms (maybe 500ms) I don't now how fast exactly, then I want to test
 
Upvote 0

BaGRoS

Active Member
Licensed User
Longtime User
Ok, I make another test:
B4X:
Sub Button1_Click
    ImageView1.SetVisibleAnimated(10000,True) '10 sec to show
End Sub

Sub Button2_Click
    ImageView1.SetVisibleAnimated(10000,False) '10 sec to hide
End Sub
I expect 10 sec to show but:

samsung s7
 
Last edited:
Upvote 0

BaGRoS

Active Member
Licensed User
Longtime User
What exatly you want to archieve???

Show and hide ImageView with fade in and fade out EXACTLY in 400ms or 1000ms (I don't know now) on ALL PHONE from 1 core to 8 core like mine
Then I start from test 10 sec because I can see IS 10 sec OR NOT
 
Last edited:
Upvote 0

BaGRoS

Active Member
Licensed User
Longtime User
And now...
The problem is that I disabled the animations from the developer option the android settings, and when I set to x1.0 and disable GPU in 2D, then everything start working well. I must forget about this.
I must looking for another way, independent of the settings android.
 
Upvote 0
Sub Process_Globals
Public csu As CallSubUtils
End Sub

Sub Service_Create
csu.Initialize
End Sub

Excuse me that I will not write in english.

¿Qué librería (libraries) debo de tener cargado (loaded) para CallSubUtils este ACTIVO/FUNCIONAL en B4J?
He cargado todas las librerías que me despliega el Libraries Manager.

Por que, me despliega el siguiente mensaje de ERROR:
Unknown type: CallSubUtils
Are you missing a library reference?


Gracias por su apoyo.
 
Upvote 0
Top