Animation in android widget - animation

Can we set animation in android widget?
For example, i have several buttons if i press button1 they will play animation1, press button2 play animation2 and so on..
Any idea how to do this?
Thanks a lot..

Because RemoteViews have alot of limited in view effect. So i recommend if you need a lot effect widget view, just try to make Widget yourself by extend from BroadcastReceiver
Refer this link for more:
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/animation/Rotate3dAnimation.html

Related

How to animate BoxView position?

I want to have two buttons side by side, and a BoxView, which will stand under the button which is pressed, therefore it must be able to slide from under one button, to another. I tried looking for that but cannot find anything related to Xamarin Forms position animation. How can I do that?
Any resources or advices on doing what I'm trying to do will be welcomed, thanks.
Use LayoutTo(position, duration, easing) method like:
yourBoxView.LayoutTo(new Rectangle(x,y,width,height),500,Easing.Linear)

XCode7 ui testing: How to swipe a certain location?

I want to swipe a screen to the left. But I have no label or button whose display-label does not change or is recognizeable during recording. So I cannot find a point to grab and swipe the screen.
Is there a possibility to swipe a certain screen-coordinate?
Thanks in advance!
You can swipe directly on the app, and even the window.
let app = XCUIApplication()
app.swipeLeft()
app.windows.element.swipeLeft()
Just solved it by recording a tap on a random screen location. This gave me three lines of app.childrenMatchingType(.Window).elmentBoundByIndex(0).....element.childrenMatchingType(.Other).tap()
Somehow weird. But I changed tap() with swipeLeft() and it worked out.

Page animation with visual feedback on drag gesture

I was wondering, I'm currently using a slide in and out page transition when the user presses a Next of Previous button on the appbar.
( concept: going through a set of articles inside a selected category )
This all looks great, I'm also able add the drag / flick gesture listeners to trigger this page transition... so no problems there.
But now I wanted to add the final part, when the user starts the drag / flick gesture, show this visually so that the page follows the gesture and 'slides' out of frame.
But how to do this? An example would be great :)
But there is also a small extra thing, I don't want the user to always do a full drag... so if we are over 2/3 of the screen, auto start the page transition IF the gesture stops ( so the user lifts up his finger )
So I would like to create a nice reading experience that shows the gesture visualy and performs the page transition...
You can check the following link: https://stackoverflow.com/a/9915016/1565574
In the ManipulationCompleted you'll be able to detect the GestureType and take an action there.
And I found that link: https://stackoverflow.com/a/4342558/1565574 (using the GestureService)
I first started with the DragFlickBehavior from #LocalJoost and it actually worked great!
But in the end I switched to a headerless pivot! Works also great!

SwipeGesture on ImageView

I am working on an app (its actually a game) that needs to detect Swipe Gestures. When I do swipe on my image view, the image for the image view needs to be changed, but unfortunately it is not working as expected.
When I add the swipe gesture object to self.view, the desired action is performed whenever I swipe my finger to any location in the view, but I want this action to be performed only when I swipe my finger over the imageView.
On the other hand, when I try to add the swipe gesture to the image view, it doesn't respond to the gesture event.
Please reply if you have the solution to this problem!
Thanks in advance!
It sounds like your UIImageView has userInteractionEnabled set to NO. Try setting yourImageView.userInteractionEnabled = YES and adding your swipe gesture recognizer to the UIImageView.
I too faced the same issue..
The option 'User Interaction Enabled' under Attributes Inspector(available in Inspector window of Interface Builder) was unchecked,
Enabling it solved my problem.
done using storyboard...
Thanks

Change the screen when click on the button

I am new to Blackberry..I am developing an application which contain the home screen having a button on it. When clicked on it, it is changing to new screen for that I used UiApplication.getUiApplication().pushScreen(new NewScreen()); in the fieldchangedListener method.
In the newscreen I added a verticalFieldManager and add some images and a button.What I want is when I click on this button it should takes to the homescreen.
I implemented the second screen functionality in NewScreen class which is in the main class.
Please let me know any suggestions.
Thanks
Koushik
i think you want to go back to the previous screen.
try this.
Screen currentScreen = UiApplication.getUiApplication().getActiveScreen();
UiApplication.getUiApplication().popScreen(currentScreen);
Write this a code snippet, then I can help you.
Perhaps You need to overload methods onClose, onSave or etc.
I can use the command close(); in the button event, thus you'll close the second Screen and return to the first one.

Resources