Search Results

Search found 2736 results on 110 pages for 'skeleton animation'.

Page 31/110 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • Null Exception RelativeLayout

    - by theblixguy
    I am trying to remove objects from my relative layout and replace the background with another image but I get a java.lang.NullPointerException on this line: RelativeLayout ths = (RelativeLayout)findViewById(R.layout.activity_main); Below is my code: package com.ssrij.qrmag; import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.View; import android.view.animation.Animation; import android.view.animation.TranslateAnimation; import android.view.animation.Animation.AnimationListener; import android.widget.Button; import android.widget.RelativeLayout; import android.widget.TextView; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // Initialize animations Animation a = new TranslateAnimation(1000,0,0,0); Animation a1 = new TranslateAnimation(1000,0,0,0); Animation a2 = new TranslateAnimation(1000,0,0,0); Animation a3 = new TranslateAnimation(1000,0,0,0); // Set animation durations (ms) a.setDuration(1200); a1.setDuration(1400); a2.setDuration(1600); a3.setDuration(1800); // Get a reference to the objects we want to apply the animation to final TextView v = (TextView)findViewById(R.id.textView1); final TextView v1 = (TextView)findViewById(R.id.textView2); final TextView v2 = (TextView)findViewById(R.id.TextView3); final Button v3 = (Button)findViewById(R.id.tap_scan); // Clear existing animations, just in case... v.clearAnimation(); v1.clearAnimation(); v2.clearAnimation(); v3.clearAnimation(); // Start animating v.startAnimation(a); v1.startAnimation(a1); v2.startAnimation(a2); v3.startAnimation(a3); a1.setAnimationListener(new AnimationListener() { @Override public void onAnimationStart(Animation animation) { // TODO Auto-generated method stub } @Override public void onAnimationRepeat(Animation animation) { // TODO Auto-generated method stub } @Override public void onAnimationEnd(Animation animation) { v.setVisibility(View.INVISIBLE); v1.setVisibility(View.INVISIBLE); v2.setVisibility(View.INVISIBLE); v3.setVisibility(View.INVISIBLE); RelativeLayout ths = (RelativeLayout)findViewById(R.layout.activity_main); ths.setBackgroundResource(R.drawable.blurbg); } }); } public void ScanQr(View v) { // Open the QR Scan page Intent a = new Intent(MainActivity.this, ScanActivity.class); startActivity(a); } } Is there anything that I am doing wrong?

    Read the article

  • Stuttering animation in iPhone OpenGL ES although fps is high

    - by guymic
    I am building a 2d OpenGL es application For iPad it displays a background texture and numerous textures on top of it which are always in motion. Every frame their location is recalculated based on time delta and speed and the entire thing is being rendered at 60 fps successfully, but still as the movement speed of the sprites raises, thing look stuttering. Any ideas? Are there inherit problems with what I'm doing? Are there known design patterns for smooth animation?

    Read the article

  • Implement animation in UIButton

    - by sasayins
    I'm new to cocoa and iphone programming and I want to implement an animation in UIButton. For example, I create a custom UIButton with a square image. Then when I press that UIButton, the square image will flip. Note that the square image is the image of the UIButton. [UIButton setImage:[UIImage imageNamed:@"square.png"]];

    Read the article

  • jquery drag and drop animation

    - by Cameron
    I have some UI functionality for drag and drop, but when an element is dropped, the animation makes it flit about all over the place for a split second before it appears in the newly dropped location. Can anyone advise how to tackle this, so that the draggable element moves more cleanly into place on success? ... success : function() { $(ui.draggable) .parent().droppable("option", "disabled", false) .end() .appendTo(droppable) .droppable("option", "disabled", true); }, ...

    Read the article

  • trigger animation with timer, as3

    - by VideoDnd
    How do I trigger the animation in sync with my timer?My timer and flip animation work, but they are out of sync with each other. I'm lost with the IF ELSE statements. Each time the value of my textfield changes, my number needs to flip. See example. Example //IF ELSE FUNCTION function theFlip(event:TimerEvent):void { count++; if (count < 9) { oldcount = count - 1; } else { count++; fcount=int(count) count++; oldcount = count - 1; } } //Cont... Complete Codehere's the file //Timer var timer:Timer = new Timer(100); //Integer values var count:int = 0; var fcount:int = 0; var oldcount:int = 0; //Formatting String function formatCount(i:int):String { var fraction:int = i % 100; var whole:int = i / 100; return ("00" + whole).substr(-2, 2) + "." + (fraction < 10 ? "0" + fraction : fraction); } //Start the timer timer.start(); timer.addEventListener(TimerEvent.TIMER, theFlip); //IF ELSE FUNCTION function theFlip(event:TimerEvent):void { count++; if (count < 9) { oldcount = count - 1; } else { count++; fcount=int(count) count++; oldcount = count - 1; } var toText:String = formatCount(fcount); sec4.digit.text = toText.substr(4, 1); flip4.flip.digit.text = toText.substr(4, 1); flip4.gotoAndPlay(2); sec3.digit.text = toText.substr(3, 1); flip3.flip.digit.text = toText.substr(3, 1); flip3.gotoAndPlay(2); sec1.digit.text = toText.substr(1, 1); flip1.flip.digit.text = toText.substr(1, 1); flip1.gotoAndPlay(2); }

    Read the article

  • Storyboard apply to all labels

    - by ThitoO
    Hi everyone ! I whant to apply a little storyboard to a collection of labels in my window. My storyboard is like that : <Storyboard x:Key="Storyboard1" AutoReverse="True" RepeatBehavior="Forever"> <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="label" Storyboard.TargetProperty="(Label.Foreground).(SolidColorBrush.Color)"> <SplineColorKeyFrame KeyTime="00:00:00.1000000" Value="#FFFFFF"/> </ColorAnimationUsingKeyFrames> </Storyboard> I have a window composed of that : <Grid Background="#FF000000"> <Viewbox HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="Uniform"> <UniformGrid x:Name="grid" Background="#FF000000" /> </Viewbox> </Grid> When I want to start my storyboard I do that : Storyboard.SetTarget( _stb, myLabel ); _stb.Begin(); where _std is my storyboard loaded by the window's resources. The animation works fine, but on all labels (not only the one I want). I tried to switch SetTarget by SetTargetName but labels are created into my window by the constructor and names can not be founded when I try "SetTargetName". Do you have any ideas ? Thanks :) ------------ Edit : We asked me to be more descriptive -------------------------------------------------------------------- Label are not created directly in the xaml, they are created by the constructor of the window : public SpellerWindow(IKeyboard keyboard, int colomnNumber, SolidColorBrush background, SolidColorBrush foreground ) { InitializeComponent(); grid.Columns = colomnNumber; int i = 0; foreach( IKey key in keyboard.Zones.Default.Keys ) { Label lb = new Label(); lb.Foreground = foreground; lb.Name = "label"+(i++).ToString(); lb.Content = key.ActualKeys[keyboard.CurrentMode].UpLabel; lb.HorizontalAlignment = HorizontalAlignment.Center; lb.VerticalAlignment = VerticalAlignment.Center; Viewbox box = new Viewbox(); box.Stretch = Stretch.Fill; box.Child = lb; box.Tag = key; grid.Children.Add( box ); } } Animations are started by an event handler : void Highlighter_StartAnimation( object sender, HiEventArgs e ) { Storyboard stb; if( !_anims.TryGetValue( e.Step.Animation.Name, out stb ) ) { stb = (Storyboard)_window.FindResource( e.Step.Animation.Name ); _anims.Add( e.Step.Animation.Name, stb ); } DoAnimations( _zones[e.Step.Zone], stb ); } Finally, animations are started by DoAnimations : void DoAnimations( List<Label> labels, Storyboard stb ) { foreach( Label lb in labels ) { Storyboard.SetTarget( stb, lb ); stb.Begin(); } } I want to highlight a collection of labels, but all labels are flashing. I don't know why, but I try to create a label into the Xaml directly, and set a Storyboard.TargetName (bound to the name of the label) in the Xaml of the storyboard. And it's working ... Now you know everything. Thanks for you help :)

    Read the article

  • Iphone page curl effect

    - by dragon
    I am using this code for Page curl effect ....Its work fine in simulator and device... But its not (setType:@"pageCurl") apple documented api , this caused it to be rejected by the iPhone Developer Program during the App Store review process: animation = [CATransition animation]; [animation setDelegate:self]; [animation setDuration:1.0f]; animation.startProgress = 0.5; animation.endProgress = 1; [animation setTimingFunction:UIViewAnimationCurveEaseInOut]; [animation setType:@"pageCurl"]; [animation setSubtype:@"fromRight"]; [animation setRemovedOnCompletion:NO]; [animation setFillMode: @"extended"]; [animation setRemovedOnCompletion: NO]; [[imageView layer] addAnimation:animation forKey:@"pageFlipAnimation"]; So i changed and using like this [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:1]; [UIView setAnimationDelegate:self]; [UIView setAnimationBeginsFromCurrentState:YES]; [UIView setAnimationCurve:UIViewAnimationCurveLinear]; [UIView setAnimationWillStartSelector:@selector(transitionWillStart:finished:context:)]; [UIView setAnimationDidStopSelector:@selector(transitionDidStop:finished:context:)]; // other animation properties [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:imageView cache:YES]; // set view properties [UIView commitAnimations]; In this above code i want to stop the page curl effect at midway.. But i cant stop it in midway like map applications in ipod... Is this any fix for this? or Is there any apple documented methods used for page curl effect in ipod touch? I am searching lot. but didnt get any answer ? can anyone help me? Thanks in advance..plz

    Read the article

  • Windows 7 boot animation slows down startup by default?

    - by kngofwrld
    I just upgraded my HDD to an SSD drive. I am running a completely fresh install and enjoy the short boot time. I tweaked the startup to be as fast as I could by removing unneeded apps and such. Nor am I running a solid desktop background (which causes a 30-sec startup delay). I have a 2.1ghz 64 bit laptop with 4 gigs of ram, so it's not a liquid-cooled speed monster, but I checked some super high end PC boot vids on YouTube and noticed that they startup in almost the same time as my machine. I also noticed that the glowing Windows 7 animation plays all the way no matter how fast the PC is. I turned off the animation, and the startup time is unchanged. I turned on verbose startup info and noticed that it runs until the very end, where it looks like it just sits there for no reason waiting for something to happen for a few seconds. So now I think that the Windows 7 startup animation has a timer built into it that forces the computer to wait for no other reason than to play the full animation. Super-fast XP boot vids on YouTube seem to start much faster (and not just because they "have less to load"). Am I imagining things? My question is: How can I turn off not just the animation, but the timer for the animation. Here is a vid that tipped me off, I have no relation to the poster. (warning: soundtrack might be loud) http://www.youtube.com/watch?v=T5LkX3xejJ4

    Read the article

  • jQuery - Need help stopping animation on click command.

    - by iamtheratio
    With a few of your help I was able to get the jquery I wanted to work flawlessly, except for one thing.. the animation doesn't stop when i click on the buttons. Scenario: I have an Image, and 3 buttons underneath labeled "1","2", and "3". The jquery will automate the click function every 4500ms and switch from 1 to 2, then 2 to 3 and continuously loop. However the problem is, if I manually click on a 1,2,3 button the animation does not stop. Any ideas how I could accomplish this? jQuery: var tabs; var len; var index = 1; var robot; function automate() { tabs.eq((index%len)).trigger('click'); index++; } robot = setInterval(automate, 5500); jQuery(document).ready(function(){ jQuery(".imgs").hide(); jQuery(".img_selection a").click(function(){ stringref = this.href.split('#')[1]; $(".img_selection a[id$=_on]").removeAttr('id'); this.id = this.className + "_on"; jQuery('.imgs').hide(); if (jQuery.browser.msie && jQuery.browser.version.substr(0,3) == "6.0") { jQuery('.imgs#' + stringref).show(); } else jQuery('.imgs#' + stringref).fadeIn(); return false; }); $('.img_selection a').removeAttr('id').eq(0).trigger('click'); tabs = jQuery(".img_selection a"); len = tabs.size(); }); I tried adding the below code, with a lot of help from this website, but to no avail.. CODE: jQuery(document).ready(function(){ jQuery(".imgs").hide().click(function(){ clearInterval(robot); }); HTML: <!-- TOP IMAGE ROTATION --> <div id="upper_image"> <div id="img1" class="imgs"> <p><img src="images/top_image.jpg" width="900" height="250" alt="The Ratio - Print Projects!" border="0" /></p> </div> <div id="img2" class="imgs"> <p><img src="images/top_image2.jpg" width="900" height="250" alt="The Ratio - In The Works!" border="0" /></p> </div> <div id="img3" class="imgs"> <p><img src="images/top_image3.jpg" width="900" height="250" alt="The Ratio!" border="0" /></p> </div> </div> <!-- / TOP IMAGE ROTATION --> <!-- TOP IMAGE SELECTION --> <ul class="img_selection"> <li><a id="img1_on" class="img1" href="#img1">1</a></li> <li><a class="img2" href="#img2">2</a></li> <li><a class="img3" href="#img3">3</a></li> </ul> <!-- / TOP IMAGE SELECTION -->

    Read the article

  • UIView Animation: PartialCurl ...bug during rotate?

    - by itai alter
    Hello all, a short question. I've created an app for the iPad, much like a utility app for the iPhone (one mainView, one flipSideView). The animation between them is UIModalTransitionStylePartialCurl. shouldAutorotateToInterfaceOrientation is returning YES. If I rotate the device BEFORE entering the FlipSide, everything is okay and the PartialCurl is displayed okay. But if I enter the FlipSide and then rotate the device, while the UIElements do rotate and position themselves just fine, the actual "page curl" stays with its initial orientation. it just won't budge :) Is it a known issue? am I doing something wrong? Thanks!

    Read the article

  • Rotating a full 360 degrees in WPF 3D

    - by sklitzz
    Hi, I have a ModelVisual3D of a cube and I want to animate it to rotate around its axis for 360 degrees. I make a RoationTransform3D which I tell to rotate 360 but it doesn't rotate at all, also if you say 270 degrees it rotates only 90 degrees but in the opposite direction. I guess he computer calculates the "shortest path" of the rotation. The best solution I have come up with is to make one animation turn 180 and after it finishes call another 180 to complete the full rotation. Is there a way to do it in one animation? RotateTransform3D rotateTransform = new RotateTransform3D(); myCube.Model.Transform = rotateTransform; AxisAngleRotation3D rotateAxis = new AxisAngleRotation3D(new Vector3D(0, 1, 0), 180/*or 360*/); Rotation3DAnimation rotateAnimation = new Rotation3DAnimation(rotateAxis, TimeSpan.FromSeconds(2)); rotateTransform.BeginAnimation(RotateTransform3D.RotationProperty, rotateAnimation);

    Read the article

  • WPF Animation on scrollviewer children clipped by scrollviewer

    - by Becky Franklin
    Hey folks, I'm hoping I have a fairly simple problem that can be fixed easily as it seems like I'm just missing something basic from the WPF world. I have a scrollviewer wrapping a stackpanel which contains several images, these images have animations to increasing in size when the mouse passes over them. All works fine without the scrollviewer, now I've added the scrollviewer, the animation works but only inside the scrollviewer; the increasing size isn't being allowed to overlap the scrollviewer. Is there a way to fix this? Thanks, Becky

    Read the article

  • Refreshing UIScrollView / Animation, timing (Objective-C)

    - by Switch
    I have a UIScrollView that is displaying a list of data. Right now, when the user adds one more item to the list, I can extend the content size of the UIScrollView and scroll down smoothly using setContentOffset and YES to animated. When the user removes an item from the list, I want to resize the content size of the UIScrollView, and scroll back up one step also in an animated fashion. How can I get the ordering right? Right now, if I resize the content size before scrolling back up, the scroll isn't animated. I tried scrolling back up before resizing the content size, but that still didn't give a smooth transition. Is there a way to finish the scrolling animation BEFORE resizing the content size? Thanks

    Read the article

< Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >