Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-24428

Android: Titanium.UI.View.center setter does not work

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Release 6.0.0, Release 6.0.1
    • Fix Version/s: Release 6.1.0
    • Component/s: Android
    • Labels:
    • Environment:
    • Story Points:
      2
    • Sprint:
      2017 Sprint 07 SDK

      Description

      i having the issue on getting the value from imageviewl.center.x or y from ti.sdk 6 and above on android project.
      But when i try run my project on the ti.sdk 5 and it worked. please help.

      sample code for XML
      <Window class="Fcontainer" >
      <View id="croppedPhoto">
      <ImageView id="previewImage" onTouchstart="touchStart" onTouchmove="touchMove" onTouchend="touchEnd" onPinch="pinch"/>
      </View>
      </Window>

      sample code in controller
      $.Fcontainer.addEventListener('open', setup);

      function setup()

      { $.croppedPhoto.width = '400'; $.croppedPhoto.height = '400'; $.croppedPhoto.zIndex = 0; $.previewImage.image = '/images/default_img/default_exhibitor.png'; $.previewImage.image.quality = '1.0'; centerPhoto(); }

      s
      function centerPhoto() {
      console.log("centering the photo");

      $.previewImage.center =

      { x : $.croppedPhoto.width / 2, y : $.croppedPhoto.height / 2 }

      ;
      }

      function touchStart(e)

      { console.log("center.x --------------------------"+$.previewImage.center.x ); console.log("center.y --------------------------"+$.previewImage.center.y ); }

        Attachments

          Activity

            People

            • Assignee:
              emerriman Eric Merriman
              Reporter:
              Yellowcube Yellowcube
              Reviewer:
              Maggie Chen
              Tester:
              Josh Longton
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-10507
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code