I'm animating the movement of multiple views like this (basically just using y positioning):
View.animate()
.setInterpolator(new FastOutSlowInInterpolator())
.y(requiredCalculatedPosition)
.setDuration(400);
But the snippet has visible lags in KitKat and below while running buttery smooth on Lollipop+. (Only tested on emulators till now, with graphics managed by my GPU).
Android literally sucks when it comes to animating multiple UI views simultaneously in pre Lollipop versions. I managed to make things smoother by adding little delays in my animations, but I was unable to get rid of total animation flicker when animating more than one view. Also another thing - it also depends on device, usually flickering would appear in cheap devices with weak GPU like Acer or Asus tablets or so due to their GPU limitations. Generally it will work well in most devices like older Samsung Galaxy S2, S3. Also emulators can't emulate GPU well - this is a thing I find always disappointing compared to iOS emulators.
Related
i'm developing an app to manipulate image taken by camera in real time. Though when i run the same code in android studio emulator i get the colors i need. Though when i do it in real device the colors are shifted.
for example Dark blue in emulator is slightly lighter. Red in emulator is lighter in real device. i tried it in several real devices. In all cases colors are lighter than expected.
Why this is happening?? Is there any differences in webcam in a laptop which emulator pickup the image and real device cameras??
How can i make the colors same as the images in webcam pictures in emulator?
Found an answer for my issue. Just needed to adjust the contrast of my laptop's webcam. All working as expected.
I have an issue with Samsung Galaxy tablets. When my application triggers the camera flash, the image gets dark. I never noticed this issue since I was doing testing with other brands. But, recently, I just stared testing with Samsung Galaxy and I found out that issue.
After several days doing research I found that one way to temporally solve it could be clearing the camera cache. Effectively, that works if you do it through the device camera setting, but I need to do it now by code, since I would like to trigger that event before the user uses the camera flash.
How can I accomplish that programmatically ?
I am new to Android Development. I have recently developed an app that supports Screen sizes of 3" to 4"! The problem is that When I run my app on my HTC Wildfire S (3.2") it works find the screen visuals are fine to see and it gives best resolution.
But when I run the same app on my Samsung Galaxy Y S5360 (3") a small portion of the screen vanishes at the spot I mean the screen visuals are not so much visible to see and gives bad visuals of screen.
Why it is so when I have set the screen size as ranging from 3" to 4". I am using Relative Layout and in the Eclipse IDE the Screen is showing so well also.
HERE is the Eclipse IDE image
HERE is my Samsung Galaxy Y S5360 Image: sorry for poor image.
YOU can see the problem of text at the bottom of cell phone image how can i fix this? please help thanks in advance!
First- never trust the eclipse plugin. Its buggy, and its an estimation anyway. You can use it to see if you're roughly right, but never expect it to look like that ont he actual device, much less on all devices.
As for your problem- the screen on your device is too small for your layout. You either need to cut out whitespace or shrink something. If you can find out the exact resolution of this device you could make a special layout for devices of that resolution.
This is a standard problem in android UI design- you're developing for a lot of screen, some of which are very small. If you want it to work on everything, you have to be very careful with the amount of content and empty space on each screen and test against a variety of resolutions and physical sizes.
A good way to get around this is to size everything in dp. 1dp=1/160th of an inch. Then you know how big a screen you'll show on.
My 2 suggestions are as below
1.Can you try using scroll view for your content
2. apply full screen to your app & change the current layout of the app(if in case of linear layout)
I am still trying to figure out a solution for this. Ive created a multiple layout on my res folder namely: layout, layout-sw480dp, layout-sw600dp, layout-sw720dp. Now testing it to real device which is (Samsung galaxy (7 inches) and Alcatel T10(7 inches)) they both go to layout-sw600dp but samsung seems much bigger than alcatel. Most of 7 inches tablet works fine except Samsung. Ive read this link Screen sizes and found out that
The original Samsung Galaxy Tab is an interesting case. Physically it is a 1024x600 7” screen and thus classified as “large”. However the device configures its screen as hdpi, which means after applying the appropriate ⅔ scaling factor the actual space on the screen is 682dp x 400dp. This actually moves it out of the “large” bucket and into a “normal” screen size. The Tab actually reports that it is “large”; this was a mistake in the framework’s computation of the size for that device that we made. Today no devices should ship like this.
My Samsung galaxy is 3.2 so I am sure that it fits on my requirements.
Does someone know how to handle this kind of problem?Like can I create a new folder for Samsung Galaxy only?
Sorry for my english, it is not my native language.
I struggled with the above issue for sometime and found that thr was no alternative for this in xml.
You must handle this during run-time, if you only want it for this specific model then u can get the model make during runtime here and then handle the scenario.
I dont see anyway u can have a special folder for samsung, if you find out,please do let me know :)
I know this is a really odd problem. But has happened both on my Nexus S and Galaxy Tab.
When i drag on the view FPS increases to MAX FPS however if I don't it'll start fluctuating from 45-60. I've already tried tested simulations and it isn't the batching. I am using Open GL and there are no memory leaks. Any ideas?
This happens on all projects.
Are you using Jelly Bean? They added a new feature, as part of Project Butter, that might explain this.
Jelly Bean has more reactive and uniform touch responses, and makes
your device even more responsive by boosting your device's CPU
instantly when you touch the screen, and turns it down when you don't
need it to improve battery life.
http://www.android.com/about/jelly-bean/