I've been trying Rajawali to develop some apps, but, while it seems pretty good, I've ran into some trouble.
The main issue is that when i call a RajawaliActivity, and in every other activity called after it, the background of normal Android Views do not show, including the background of the layout being used.
As normal, I am using a RajawaliRenderer to show the 3d models, setting the surfaceView of the mRenderer, as shown in the sample apps and the tutorials.
Has anyone encountered the same problem or knows how to fix it?
In the manifest file set
android:hardwareAccelerated="false"
for each non 3D activity.
that solved the problem for me.
courtesy https://github.com/jwoolston
Related
I've just started to rebuild my app for Android 5.0, using the appcompat support library. I've just finished implementing a transition featuring shared elements. It seems to work well, untill I add a webview.
I've made a video to demonstrate the glitch.
https://www.youtube.com/watch?v=MuuGZc0Vwow
As you can see, all's fine when I open the activity. When I close it, the glitch occurs. As you can see all elements fade out like they should, except for the webview. Which just hangs there until the animation is over, kinda ruining the entire smoothness of the animation.
How do I fix this? If it could be related to the way I've set things up I'd be happy to share some code.
Thanks in advance.
The reason why this glitch occurs is because WebView extends AbsoluteLayout. By default ViewGroups that are not "transition group"s and that have no background drawable will not be animated by the activity's window content transition. In order to fix the glitch with the WebView, you will need to call webView.setTransitionGroup(true) (or set the attribute in XML using android:transitionGroup="true"). This should cause the WebView to fade away as part of the activity transition instead of simply sitting there until being abruptly removed at the end of the transition.
As for the "Unable to create layer for WebView" error you are receiving, I imagine that is because the transition framework automatically creates a hardware layer for the WebView during the transition and for some reason the framework is crashing when it is trying to create the layer. This sounds like a totally separate issue related to Android's internal graphic pipeline though... I'm not sure I can give you a good answer about why the crash occurs without more information.
This issue is also discussed in the bottom of this blog post.
I have facing exactly this kind of random crash problem in webview in Marshmallow version. I have add attribute android:transitionGroup="true". but crash is happening, after that i have added android:hardwareAccelerated="false" in manifest where that activity is declared. After that random crash has solved in Marshmallow version and lower version too.
I'm using this library that allows flipping between views like the "FlipBoard" app.
It works quite well.
The problem is that I need to put a few views on top of it, so I've put it inside a FrameLayout, and the rest of the views after it.
It looks ok, but it has a problem:
When flipping, the views that are on top of it change their transparency (and even become hidden) till the flip is over.
How can I handle this problem?
EDIT: I've found this library which doesn't have this problem, but it has a weird color transition while flipping that I wish to avoid.
EDIT: I've found out that this is a known issue (#49) . Would love to know if anyone else has an idea of how to overcome this.
I don't know how to fix this library, but it seems this library works fine :
https://github.com/emilsjolander/android-FlipView
Not sure though how customizable it is compared to the one i've tested.
I've recently switched from eclipse to IntelliJ IDEA for Android development. I'm not missing any features, beside the rather helpful designer preview in eclipse. I populate certain views in my activities at runtime, there are no texts defined in the corresponding XML files. In eclipse, it looks like this:
It fills the empty views with placeholder text which is nice to get a rough impression of the layout without having to start the app. But in IDEA, the designer looks like this:
The views are empty, and it's difficult to even see them without selecting them in the Component Tree. I haven't found anything in the options, is this missing from IDEA or did I miss an option?
It's not possible right now, but it would be nice to have, I've created a new feature request, please vote.
If I do setAlpha(0.5f) on a few (image) views, my app gets horribly slow, at least on my Android 4.+ tablets.
If I remove the setAlpha calls, the app (scrolling and paging) works smoothly.
Is there an alternative/faster method for making my views semitransparent?
If you provide some code I can try to see what is wrong, there is no reason and explanation of slowing the app, there must be other thing in the code/project/layouts to make your app work slower
Try creating a custom view that calls Canvas.saveLayerAlpha() before drawing its children. Android 3.0+ versions there is a View.setAlpha() api..
Also you can create transparent or opaque background.Here is the link
http://zaman91.wordpress.com/2010/03/22/android-how-to-create-transparent-or-opeque-background/
Hope it helps.
I'm starting out with Android development, and I'm kind of stuck. Basically, I have a layout with dynamically added ImageViews, and I want to have the ImageViews change their image every once in a while. However, I'd like to add some sort of transition or changing animation, like a flip or a flash.
I don't really know where to even start to look for an answer to this question. Any help is greatly appreciated.
The android framework has this totally covered:
http://developer.android.com/guide/topics/graphics/view-animation.html
Basically, you are looking to define "tween" animations between your drawables (imageviews). After you define your animations you can even define a set of drawables to show one after the other using frame-animation.
Check out the following for all the gory details:
http://developer.android.com/guide/topics/resources/animation-resource.html