B4A Library NineOldAndroids

Discussion in 'Additional libraries, classes and official updates' started by Informatix, Sep 3, 2014.

  1. Informatix

    Informatix Expert Licensed User

    Note that you have "Density" in B4A to get the density.
     
    LucaMs likes this.
  2. LucaMs

    LucaMs Expert Licensed User

    Ok but so it is... homogeneous? I don't know which term I should use :D

    GetDeviceLayoutValues.Height * GetDeviceLayoutValues.Scale
     
  3. Informatix

    Informatix Expert Licensed User

    They return the same value (the value comes from context.getResources.getDisplayMetrics). Density is just shorter.
     
  4. LucaMs

    LucaMs Expert Licensed User

    Since PROPERTY_TRANSLATION_Z does not exist, should I use PROPERTY_SCALE_X - PROPERTY_SCALE_Y to simulate a translation on Z?
     
  5. LucaMs

    LucaMs Expert Licensed User

    Understood the answer ;)

     
  6. Informatix

    Informatix Expert Licensed User

    PROPERTY_SCALE is not for translation. And it's not possible to translate along the Z axis before Android API 21 so it's not included in this library. The CameraDistance property can be used for this purpose, but I did not test the effective result. Under most recent Android versions (API >=21), you can try "setTranslationZ" with JavaObject.
     
    LucaMs likes this.
  7. LucaMs

    LucaMs Expert Licensed User

    I tried using it for a "simulation" of translation Z, without big success :D
     
  8. LucaMs

    LucaMs Expert Licensed User

Loading...