Mobile direction

Hello friends,

I work with FlashBuilder 4.6 to develop Android app.

In the application, it is necessary to set some values when change of orientation of the device. i.e. setting the values when the orientation of the screen/device changes from landscape to Portrait and vice-verse.

Although initially my application has Landscape orientation . And this requirement is specific showing.

I want every time when the orientation of the screen/device change values must be set to one.

I don't get the desired result.

Please guide me and tell me if I'm wrong in the code or how can I achieve this.


< s:View xmlns:fx ="""http://ns.adobe.com/mxml/2009"" "

"" xmlns:s = "" "library://ns.adobe.com/flex/spark" title = "" "{data} '

"xmlns:MX ="""library://ns.adobe.com/flex/mx "

"viewActivate ="""view1_viewActivateHandler (event) "

"creationComplete ="""view1_creationCompleteHandler (event) ">

< fx:Script >

<! [CDATA]

protected function view1_viewActivateHandler (event: ViewNavigatorEvent):void

{

if (Accelerometer.isSupported)

{

accl = new Accelerometer();

accl.addEventListener (AccelerometerEvent.UPDATE, update);                    // accl.addEventListener (AccelerometerEvent.UPDATE, adjustImage);
}

}

private function update (event: AccelerometerEvent):void

{

this. stage.autoOrients = true;

// in the threshold, I enclose StageOrienationEvent allowing to adjust the
// values.
stage.addEventListener (StageOrientationEvent.ORIENTATION_CHANGE, adjust);

}

Private void adjust (event: StageOrientationEvent):void

{

if (event.afterOrientation is StageOrientation.ROTATED_LEFT)

{

"testVal.text ="""OR after is the LEFT ';

}

else if (event.afterOrientation is StageOrientation.ROTATED_RIGHT)

{

"testVal.text ="""OR after is RIGHT ';

}

else if (StageAspectRatio.LANDSCAPE)

{

"testVal.text ="""StageAspectRatio is landscape ';

}

else if (StageAspectRatio.PORTRAIT)

{

"testVal.text ="""StageAspectRatio is the Portrait ";

}

}

< / fx:Script >

Finally found the solution after spending two days on that.

Depending on the update adds Event OrientationChanging in stage.addEventListner.

protected function update(event:AccelerometerEvent):void

{

this.stage.autoOrients = true;      stage.addEventListener (StageOrientationEvent.ORIENTATION_CHANGING, adjust);

}

protected function adjust(event:StageOrientationEvent):void

{

Switch (Event.afterOrientation)

{

case StageOrientation.DEFAULT:

Do something here. The Portrait Position.

break;

case StageOrienatation.ROTATED_LEFT:

Do something here when you rotate your phone on the left side portrait.

break;

case StageOrienatation.ROTATED_RIGHT:

Do something here when you rotate your phone right portrait.

break;

}

}

Many thanks to all who have seen this issue and try to put their efforts for the solution.

Tags: Flash Builder

Similar Questions

  • Import into LR Mobile directly from an SD card on iPad

    LR Mobile directions refer to the film as a source for the images.  If I have a SD card that is attached via the connector of the lightning to my iPad, what should I do to get the map images in LR Mobile?

    I apologize for the previous post.

    Please follow the tutorial: managing collections & import photos with Lightroom on mobile | Adobe Photoshop Lightroom CC tutorials

    I hope that answers the question.

    Kind regards

    Sheena

  • Messages from a blocked number is visible with the tracking of e-mail or through message transfer applications?

    If a person that I blocked on my iPhone had to send me a text, (the phone can have an app for text of spying on this subject), and it is implemented the text forward to another device, would be the text appear with one? I really need a good answer with an honest explanation.

    It depends on how you have implemented the redirect. If you have set up through your operator (I think that such a thing is possible), then Yes. For example, if I use the app messing my carrier on my iPad, I get all the messages sent to my number of mobile directly from my career, even if I had blocked on my iPhone. If the transmission have been implemented through settings on the iPhone, not because the messages never reach the iPhone.

  • Any iTunes library appears in Apple music

    Forgive me for being prolific; I'm going to do my best to explain the problem I have. I just downloaded the beta version of iOS 10 and now my iTunes library all - playlists, artists, songs, everything - no appears in the library of my phone in the music app as my music that I have synced my Apple account. (Isn't that what iTunes game is - how can I get that free?)

    Point is - I don't want to do. I don't want to disable iCloud music library in the middle because then I lose everything I've already put in music Apple but also and especially because I'm not in a position to have a library with Apple music if iCloud music library has been disabled.

    Basically: I want my iTunes library and the library of my phone to be remain separate while "iCloud music library" on in the settings. I know this is possible because I believe that I had this problem once before and solved. After that, I had been months go without a problem (until I downloaded the beta version). Once again, since I have had this same problem once before and resolved I don't think it's because I use a beta iOS. For some reason any installation of the beta version only seems to have caused the problem to recur.

    Thank you in advance for help you!

    (1) you are not supposed to ask questions about the beta on open forums software. See the document to which you agreed on beta support.

    (2) music Apple includes a version of the game.  Now uses a sound library centralized in iCloud.

    I can't deal with your specific problem because I do not use music from Apple.  You may need to disable iCloud in the iTunes preferences?  If the installation of the OS x software caused this he may have returned to the default settings. Install OSX should not affect your mobile directly.

  • Z2 Xperia problems

    HI. Last week, my phone was sent for repair, unit has 7 questions, I thried to clean the phone with towel wett and phone has water inside the back wher is, is display button so 100% device defective and not impermeable to water., curcle blue screen discoloration, phone gets to hot and back glass was released in uper corner , what is chargimg screen lights up every time when I turn it off and all the apps are break, 8 hours for 80% battery and bever to 100% and letter received stoped working.i port magnetic of the customer support and it say that the device has been inspected by experts and everything is functional BUT IS NOT, then I want not why this phenomenon happens why my phone is not repaired.what I have to do, pls solution

    Hi Berserker1,

    Welcome to the community,

    Sending the unit by a network carrier, usually held the same results only through Sony Mobile directly, because it is likely that the carrier network will send the unit to a repair agent mobile allowed/Sony

  • Z30 blackBerry OS upgrade to 10.2.1.2977 video or picture does not turn

    After OS upgrade observed this photo or video is not after it's to say mobile direction is horizontal or vertical.
    Even shake the mobile and try to turn, but still it does not work.
    Please help solve this problem.

    slide up and make sure that the orientation icon is not blue

  • Conditional fields with data merge

    I have, I think, would be a common question for people using Data Merge in InDesign for cards.

    I have several fields phone, with a letter from small caps to indicate what type (mobile, direct, fax, etc.), that is:

    M < < phone > >

    D < < Tel Direct > >

    If an employee has only one phone line, how can I do so that the entire line is omitted from the final merged doc?

    In the past, I just went in the game final and quickly deleted lines / extra characters, but I know that there is a way!

    Thank you.

    mavenlink cards1.1_Page_1.jpg

    The main character must be included in the paragraph style, even if it's a Word. If deleting empty lines turned on, these main characters are removed too.

    To add the main characters in a paragraph style, you can define a list numbered without numbers but with the main character and space or tab between.

  • HP OfficeJet 200 series Mobile: 3 Surface Pro WIndows 10 - can't re eastablish wi - fi direct connection

    Hello

    We managed to connect our Surface Pro 3 Windows 10 running on a mobile printers HP OfficeJet 200 series using a Wi - Fi Direct connection not wireless. The problem is that whenever we turn the printer off or go to sleep Surface pro cannot re esatablish of connection with the printer again after on. In the device and printers OfficeJet 200 is still there but greyed out and has a status to be offline even if the printer has been for a while.

    The only way to connect it must make the entire process of reconnection to the Wi - Fi direct connection, for example by typing in the code and wait to see the device is connected. It should not this printer to establish a connection with the surface pro automatically after power on, yet the pro Surface shows that the printer is offline and I know that I had direct Wi - Fi together to establish the connection automatically. Is there a solution for this.

    The problem only occurs when the printer stops and he must turn it off to save battery because what get out us them for field work.

    We discovered that the Wi - Fi Direct is not fully supported in Windows 10. The only way you can reconnect to Wi - Fi direct is if you connect to the printer that you connect to an access point Wi - Fi. If you do this your Wi - Fi direct printer connection will be reset. The downside is that your Surface Pro 3 will lose the internet connection.

    For us, that our solution is not to use Wi - Fi direct and use the Wi - Fi function. We connected the mobile series HP OfficeJet 200 to our iPhone hot spot and we also connected the Surface Pro iPhone hotspot. Whenever we connect our tablet to the hotspot, we can use the printer because the printer is always connected to the HotSpot.

  • The Application mobile and direction = "reverse" Transition effect

    Is it possible to get Apex to use management = 'backside' jQuery mobile attribute?  I had no luck so far.  I'm running on 4.2.4.

    Thank you

    You can include the direction attribute in a call like the one below (this also includes the transition attribute);

    apex.jQuery.mobile.changePage ('f? p = & APP_ID.: 1: & SESSION.', {transition: "flip", direction: "inversion"});

    see you soon,

    Ron

  • HP OfficeJet Mobile series 200: Wi - Fi Direct and wireless disabled

    Wi - Fi Direct and wireless turned off whenever we pressed the button on the control panel printers. A message appears and says "this feature has been disabled. Contact the person who set up the printer. I don't know how well disabled it since this is a new printer. I don't have this problem on other printers and so far I have 5 who has this problem. How can turn us this feature back? Ahy solution or suggestion is greatly appreciated.

    Thank you

    Forum suggsted to press the back button several times when she turned 5 - 6 times. In our case for the portable desktop printer 200 series, must press the Cancel button several times to 4-5 times until you see to activate / disable menu. We have activated all the network and simply follow the instructions in the guests to activate all the wireless features, including a Wi - Fi connection live.

    Thank you

  • Mobil HP Wi - Fi Direct (Bronze): updating mouse driver Wifi for Windows 10

    Hi, I have upgraded to windows 10 and now of course my WiFi mobile mouse does not work. I assumed that a driver would soon after Windows 10 release, but none have been as it appears to be published. Should I sell my WiFi mouse or should I wait for the drivers? I know that SoftAP is available in Windows 10, then, what is the hold up?

    There have not been any update of drivers for windows 8 so I think that there is one for windows 10

    I have the same problem and are getting desperate.

  • Seeks to embed a google maps map in a mobile site, want to be able to click to get directions to this location

    I have several addresses of places of business on the site. I'm trying to figure out how I can have a google map and let the visitor of the site click on the map and it opens google maps with a route from their current location. Help, please. It is the last piece of a very large puzzle.

    I have no idea how to go beyond a generic on the site map.

    Thank you!!

    Look at this one How to create a mobile website with Adobe Muse | Adobe Muse CC tutorials

    walks you top and even allows you to download images of design used... it should be noted that the downloaded wiget connects all points to outdated adobe site Web and e-mail address but change you cela at your address email and address anyway.

  • Direction of scrolling for mobile and tablet of switching

    Hello

    I am creating a web page with horizontal scrolling, but with the sense of vertical scrolling of the mouse. It now dawned on me only for use on mobile phones and tablet users will not be able to access the site by using the vertical scroll. Is it possible to go scrolling when on mobile phones and tablets without changing the whole layout.

    Thank you

    To change the orientation of the page itself with scrolling for mobile devices? In this case, no, we cannot simply change the scrolling horizontally with all content being same with vertical scrolling.

    Thank you

    Sanjit

  • iTunes requires a newer Version of Apple Mobile Device Support

    I recently had a problem with iTunes not recognizing my iPhone, so I reinstalled the latest version of iTunes on my PC. Since then I have now received this error:

    iTunes requires a newer version of Apple Mobile Device Support. Please uninstall iTunes and Apple Mobile Device Support, then reinstall iTunes.

    I followed these steps, only to get the same error. I then stopped Apple Mobile Device Support Services, manually delete the files in c:\ProgramData\Apple\Installer Cache, repair the installation of iTunes and restart services, only to get the same result.

    I use iTunes 12 and 10 Windows.

    Would like to be able to sync my phone again.

    For general advice, see troubleshooting problems with iTunes for Windows updates.

    The steps described in the second case are a guide to remove everything related to iTunes and then rebuild what is often a good starting point, unless the symptoms indicate a more specific approach.

    Review the other boxes and other support documents list to the bottom of the page, in case one of them applies.

    The more information box has direct links with the current and recent if you have problems to download, must revert to an older version or want to try the version of iTunes for Windows (64-bit - for older video cards) as a workaround for problems with installation or operation, or compatibility with third-party software.

    Backups of your library and device should be affected by these measures but there are links to backup and recovery advice there.

    See iOS device is not showing in iTunes for Windows , if the device will not connect to iTunes after reinstallation.

    TT2

  • Mobile screen locked

    my screen open cant iphon 6s already forget my password of my sr - FP * RY9 mobile

    < personal information under the direction of the host >

    See here: https://support.apple.com/en-us/HT204306

Maybe you are looking for

  • weird full screen toolbar button

    The toolbar button "full screen" shows a huge image, much like an icon library. It looks bad I would change, please! This has happened Each time Firefox opened == I don't know

  • Windows does not start after the use of CD "" Toshiba Recovery and Applications/drivers ".

    Well my Toshiba Satellite A205-S5814 laptop was very slow and I was getting very frustrated with it, so I decided pop in the CD "Toshiba Applications/Drvers" perhaps to restore my laptop to factory settings and run perfect once again. As I was doing

  • EliteBook 8540w: Upgrade SATA Elitebook 8540

    Hi all. I'm updating my laptop CD-ROM in 250 GB SSD drive and there is problem with R/W speed. Current SSDS must use SATA 6 Gbit/S to work at maximum speed. Is it possible to upgrade my SATA 3 Gb/s to SATA 6 Gbit/s? Thank you.

  • Cannot install (KB2840629) update 3.5 sp1 on XP

    update was the installation of auto- whenever it tries to install the update - when the screen says that it is installed and the system stops. the next day, he goes through the same process and so on for several weeks now. the update fails to install

  • No communication between my computer and the CD/DVD drive

    Whenever I try to read CD or DVD through my laptop CD, the CD or DVD will not be detected by the computer. The disk drive (Hitachi HTS543232L9A300) is in good condition. What could be the problem and how to fix this problem?