B4A Library NineOldAndroids

This is my version of the NineOldAndroids lib for B4A. It's free and provided with the Java source code.

This library offers more possibilities of animation than AnimationPlus (rotation or translation on more than one axis for 3D effect, animation step by step with events for each step, synchronization between animations, ability to change the view size and contents during the animation, etc.).

It works with all versions of Android >= 2 and with all views, even custom ones.

v0.92: Initial release.
v0.92b: I changed the package name and repackaged the source to ease its compilation.
v0.93: I fixed a bug in noaObjectAnimator.InitializeFloat.
 

Attachments

  • NineOldAndroids v0.93.zip
    328 KB · Views: 1,842
  • BasicTranslationExample.zip
    6.8 KB · Views: 847
Last edited:

Star-Dust

Expert
Licensed User
Longtime User
Some rare versions of Android 7 do not rotate with native commands.
For example on some Huawei
This link seems to confirm that RotationY does not work on Huawei devices with Android 7:
https://stackoverflow.com/questions/45477454/rotation-y-not-working-on-some-phones

Does the label demo work on your device? It rotates a label, not an imageview.
I confirmed it already before. :p:p
I text my Apps on 10 different devices, to be more professional, including Huawei devices.
And on the Huawei devices with Android 7 the native rotations do not work

See in this my post: https://www.b4x.com/android/forum/threads/view-utils-snippets-on-android-7.93082/#post-589055
 

Star-Dust

Expert
Licensed User
Longtime User
Unfortunately no one can do anything to fix this except Huawei.
You are able to create functions that allow the rotation without using the API :p
 

Star-Dust

Expert
Licensed User
Longtime User
However, he did not satisfy the need, because I believe he was looking for functions that would allow him to move the Pivot point into space.
Not only for X and Y but also for the Z axis.

I like the idea of creating a function that makes 3D projections.
Many years ago I made a similar one using Sin and Cos in Turbo Pascal on a 486, but I do not know if there is enough computing power with B4A to have fluidity in the movement
 

Informatix

Expert
Licensed User
Longtime User
However, he did not satisfy the need, because I believe he was looking for functions that would allow him to move the Pivot point into space.
Not only for X and Y but also for the Z axis.

I like the idea of creating a function that makes 3D projections.
Many years ago I made a similar one using Sin and Cos in Turbo Pascal on a 486, but I do not know if there is enough computing power with B4A to have fluidity in the movement
libgdx supports the Z axis. You can see that in two examples.
 

LucaMs

Expert
Licensed User
Longtime User
Well, I can conclude that:

1) I would not like to denigrate the work of others and in fact I was not doing this at all, I have only found of a problem on my device with Android 7;

2) some people like to attack others and believe they are superior to others.

upload_2018-5-16_17-6-32.png


I WANT to repeat that:
if I'm not mistaken, the library seems to not work on Android 7


Fortunately we are not all the same.


I have nothing else to say.
 

LucaMs

Expert
Licensed User
Longtime User
Some people are paranoid also and think that other people attack them while they don't.
"you make confusion" and say that I should have written "I don't know how" are certainly not compliments, do not you think?
and the Likes indicate that other people agree on your sentences.

upload_2018-5-16_17-18-4.png



Maybe I'm paranoid but I prefer my faults to those of other people.
 
Last edited:

Informatix

Expert
Licensed User
Longtime User
"you make confusion" and say that I would write "I don't know how" are certainly not compliments, do not you think?
and the Likes indicate that other people agree on your sentences.

View attachment 67965
I wanted to tease you a little and you took it hard. Okay, my apologies. Whatever, that didn't stop me from trying to verify what you told me.

Fortunately we are not all the same.
Saying some people, including you in an implicit way, do not have this behavior flaw is another mean to say "fortunately there are superior people to them". The snake bites its tail.
 

Star-Dust

Expert
Licensed User
Longtime User
These functions are in libGDX. ;)
There seems to be a solution, change the value
CameraDistance that in the Huawei device is default set to 0
 
Last edited:

LucaMs

Expert
Licensed User
Longtime User
Whatever, that didn't stop me from trying to verify what you told me
After I pointed out to you that I did not mean to denigrate your library; maybe you had this feeling.
And I must say that I had appreciated this and also understood.
In fact, I was very undecided whether to block your posts too; I was wrong to do this.

Saying some people, including you in an implicit way, do not have this behavior flaw is another mean to say "fortunately there are superior people to them". The snake bites its tail.
I wrote something different (but obviously I wrote it using my bad English).
 

Informatix

Expert
Licensed User
Longtime User

LucaMs

Expert
Licensed User
Longtime User
Not exactly, I think:
The distance is expressed in "depth pixels." The default distance depends on the screen density. For instance, on a medium density display, the default distance is 1280. On a high density display, the default distance is 1920.
Then we need to check the distance set on the device:
B4X:
Dim jo = v As JavaObject
Dim DefaultDistance As Float = jo.RunMethod("getCameraDistance", Null)
Log("Device camera distance: " & DefaultDistance)
 
Top