Page Curl Animation on Android with OpenGL-ES - android

I want to achieve a nice 3D page curl animation in Android. I read some articles and found that nice effect can be achieved by OpenGL-ES so I started to learn OpenGL-ES (I did some of tutorials of OpenGL-ES and am still continuing) but I found it too complex for me to achieve this functionality. Also I got some examples which are available on StackOverflow and on the net, they work but I am not able to understand it, can someone guide me to achieve this functionality?

Based on the question comments I have an answer to this question.
YES, you can do that with OpenGL, BUT you need a deep understanding of math and graphics. This is a lot to learn, this will cost you at least a couple of weeks and it's definitely a hard path to go if you do it only because of this single animation (all of this applies if you don't take code which you probably won't understand and another human being put his whole effort into).
Nevertheless there might a ready to use implementation but unfortunately I can't present you one because I don't know if there's any out there.
Update
You callenged me, so I was eger to know whether there is something out there (because I saw that before and couldn't believe that there isn't a project out there which already does that for you).
And actually I found this question which seems to address the very same issue. And yes, there's someone who published his results here. And I have to admit: I looks awesome. It's also a pure java implementation.
But still: Having some background knowledge about OpenGL would enhance your whole attitude as developer. I'm not saying it's a must because not every one will succeed in OpenGL programming because it's quite hard to learn and implies a lot of math. But I think it's worth it because you will gain some deep understanding of current and all future graphical interfaces.

Related

Modeling a mobile app: How to go from the idea and design to classes and objects

I'm trying to develop my own application, I'm not too bad with code (Java, Objectif C...) nor design (Photoshop, illustrator... ).
But I always have the same problem, I never know how to go from my app Sketch and Storyboard to defining my objects and classes in code. It just makes a huge mess in my head.
I tried looking around but all the sites I can find describe the processus as Having an idea, creating a design, a storyboard, coding your app, publishing and marketing. But none explain how to go from the said storybord to the code or architectures of your code, thus not solving my problem.
As time passes it gets more annoying, I feel stuck :/.
Can you help me with any leads ?
Pretty please with the sugar on top :)
Much insight and understanding can be gained from Apple Worldwide Developers Conference (WWDC) videos.
Designing Great Apps highlights some videos and guides that may be helpful.
Designing Intuitive User Experiences. Learn about the key concepts and principles that will enable you to make your app more intuitive and approachable.
While one specific video may not cover all the practices you're looking to understand, the principles and recommendations that they present will set you on the right path, and bring you closer to your goal.
If you're not sure what videos to watch, try ASCIIwwdc to search session content.

Best OpenGL ES version for beginners

After doing android programming for over a year, I think it's time to notch up things a little bit and what is a better way than OpenGl.
I would like to know which version of OpenGL ES should I learn, as I am a complete beginner.
I just started to learn Open GLES on Android (with no experience of Open GL before). I wasn't that interested in learning Open GLES, just getting my graphics to work (to set up a coordinate system and to draw images on it).
I read that it would be easier to learn GLES10 than to learn GLES20, so I went with GLES10. However, drawing an image in Open GL turned out to be a much more complex operation than I expected, and I thought that if I were going to learn all this, I might just as well learn GLES20, so I changed to that instead.
There aren't that many simple tutorials showing you how to draw images in Open GLES. Android's tutorial is quite bad. The code they show on the page is not the same as the code in the "Download the sample" link, the author of the tutorial seem to have made some mistakes, and it doesn't show you how to draw an image. Instead I would recommend this tutorial, although it's not as good as what I was looking for.
I know that my text doesn't answer your question, but I'm just sharing my thoughts in case you find them useful.
Your question should be closed since the answer to it would be completely subjective. Where it comes to the ES version there is no "better", only "better for your needs". I suggest you pick either ES1 or ES2.
There is a huge difference between the ES1 and the ES2 where the ES1 is still using a fixed pipeline and the ES2 is not. What that means is you will have to learn shaders in order to use ES2 and a lot of very handy tools such as a matrix stack are removed in ES2 due to the shaders. There are other libraries replacing those functionality but you still do need to understand them a bit more then in fixed pipeline.
So the ES1 is probably much easier for a beginner since you can have a nice drawing in a very short time but you will want to migrate to higher versions as quick as possible at which point most of the ES1 stuff will be useless to you. The ES2 can be a real pain to begin with and once you understand how things work you have quite a lot of power working with it, still that might take quite some time.
Also most of the current topics considering the openGL and the Android are targeting the ES2 version which means you will have most updated sources around the web.
Still in the end the choice is yours. I know I have not given you the answer but still I hope this helps you understand a bit what you are working with.

Starting point for app creating, where to start

I am looking to start writing apps for mobile devices. I know a little about this subjec, and I am proficient in both java and python. However, before jumping into creating apps I wanted to get the community's input on a question I have not yet found the answer to:
How/Where should I begin?
I understand this question is fairly general/basic for a community that focuses on solving/debugging complex programs, but if there is a recommended tutorial (or specific platform) that will help a beginner(such as myself), it would greatly reduce the frustration and amount of monotonous questions asked on this forum and others.
Regards
Coursera is offering 3 courses all using android development which started last week. That would be an excellent starting point for anyone:
https://www.coursera.org/specialization/mobilecloudcomputing/2
How/Where should I begin?
I don't know about you, but I often learn by example more than reading. You mentioned that you're proficient in java so thats a great start. After you understand the Android SDK it's really only the UI good practices you need to learn. So here's my suggestion.
Start off with something super simple. Let's say, create your own version of a calculator. Something that can add, subtract, multiply, and divide. This should be dirty, ugly, but works correctly.
After doing this, take a look at some other android calculators on the play store. Check out Simple Loan Calculator. I use this example because it offers a lot of android UI components. ViewPager, ActionBar, etc. Download this app, take a look at it, and try to mimic it. This should provide an idea on how to work with the android UI components.
What's next? After you have done these two apps you should be relatively ready to tackle your own project.
HTML apps are easy to port across multiple mobile platforms. I have set up an Android HTML template as a starting point. You can just import this project into Eclipse and take a look at that.
https://github.com/jakewp11/HTML5_Android_Template
Here is my experience for ios,
There are three things that I consider as pillars
Objective C
Memory managment
Design patterns
The first one looks obvious but I'd stress on learning concepts like protocols, categories, extensions. As a beginner I thought that learning the syntax was enough, but time and again I had to jump back to the language concepts to understand what's going.
The memory managment , the most talked and confusing subject and now since we have automatic referenc counting to make things simpler and often new Dev skips learning memory concepts (I did it). So I suggest you to have an idea what actually happens under the hood of arc " the manual memory managment"
The design patters,
When I started off , to pass data and control , what I used to do was achieve every thing through the only design patten I knew (target action) . I lack the knowledge of design patters didn't how easily I could achive better results with less code.
Some resources:
Dev.apple.com
http://www.raywenderlich.com (one of my best tutorials are here, you can find one on design patterns)
http://rypress.com/tutorials/objective-c/
And yes , the sample projects at Dev.apple are the best tutors.

Android layout examples that match "Metrics and Grids" recommendations

After trying to make sense of the Metrics and Grids page of the (fairly new) Android Design website, I gave up on a lot of things. So, basically, I'm trying to find the original layouts that are used in Android 4, so that I can apply the same concepts.
To make this question more objective and not fail under the "too broad" axe of stackoverflow, I ask you for the layout that is used to recreate, exactly and fully, the examples on that page. Did Google provide them in the samples? Maybe a well known didactic repository that strives to conform with standards?
Just as an example, it's not clear what to do to recreate the "48/3 metrics" (16/16/16) in order to make the text fit in it. What if I want to use 1-line of small text? Would it be 16/wrap_content/16, or 16/16/16 to make it consistent with other layouts around the set? What if...
I believe this would not only help the small devs, but also and most importantly, help standardize the look and feel of apps in Android Play. The site is a good start, but far from ideal.
Added details
I never asked a question with this much upvotes, and I didn't even expect that (I have other questions that I regard as "better", but by far not as many votes and favs). Not that I care about votes, of course, but that is to show that there is a great demand for what I'm asking (a bit of an ad populum here, but still...).
Replies to comments
#Ricardo Amaral:
I'm indeed sorry if I wasn't clear enough:
Mandating a standard and requesting unambiguity from it are different issues. One of the reasons I like Android is the degree of freedom we have, so I'm very much aware of the impossibility of mandating most of the common practices.
I believe it relates to the concept of "reinvent the wheel" within the concept of freedom.
Again, those were just examples. Some things are not clear... which are paddings of the outer container, and margins of the inner views? Many times that makes a difference in selectors, dragging etc. etc. etc., and that again translates into a familiar look and feel for the user. One thing feels like splitting hairs, but it quickly adds up to a lot of small differences. And the user notices it... it looks like it lacks that last "finishing touch".
#Michael Slade:
I know they're examples, that they may have been wireframed from templates. As said, I'm already reusing code from the SDK, and I know they're just examples and that we can deviate from them. Again, after all this time, nobody answered.
Optionality benefits from precision. That's what I'm trying to say and ask. Because it's a recommendation doesn't mean its guidelines can be whatever you want them to be. If you do that, it's not the recommendation anymore. That's the whole point of recommendations, by the way: provide an implementarion theory without forcing anyone.
Thanks everyone!
Hate to break it to you but it's likely that the images on the page you like were created with a drawing program, and there are no example to go with them.
Without someone actually going to the effort to create samples for you, your best bet is to go through the samples that come with the android SDK - they will follow the guidelines in most cases.
And remember, they are just guidelines. At the end of the day it's up to you to create a pleasant and smooth user experience, however you see fit.

What advantages cocos2d-android does provide over android 2d

I have seen several posts here about cocos2d-android, so ambition to get more idea on it drag me at coco2ds-android-1 and a good example .
My analysis can not find any significant benefit of using coco2ds instead of usual 2d approach of surfaceView and SurfaceHolder.Callback .
I will be thankful if anybody have expertise over coco2ds-android will guide me about benefits to use it instead of usual gaming approach .
Just by clicking on links starting from the ones in OP, I have came across http://dan.clarke.name/2011/04/how-to-make-a-simple-android-game-with-cocos2d/ - which states the obvious answer you are looking for.
First of all, this is a 2D gaming engine. All of the physics and whatnot effects are just there for you. No need to re-implement from scratch
Secondly, this is actually a port of the iPhone gaming library with the same name - great news if you also plan on porting to iPhone. And thirdly it is open sourced, meaning you can tweak anything accordingly.
I have noticed however that this is a pure java library, so do not expect amazing performance. If performance is critical, google for something NDK based, not SDK based. I could not advise here as gaming is not my thing.

Categories

Resources