Skip to main content

Posts

Showing posts from September, 2012

Easy swipe gesture handling on android

Recently I wanted to implement swipe functionality for activity in my android app but couldn't find a nice and simple example that would explain what do you really need to do. There are multiple sites that are bloated with code, but somehow I couldn't believe that to implement such a simple (and kinda basic if you think about it) functionality you need to write tens of lines of code. So if you're like me, looking for a simple and elegant solution for swipe gesture handling, here it is... First some theory - to implement swipe you will need to: 1. Create a GestureDetector 2. Create an OnGestureListener by extending GestureDetector.SimpleOnGestureListener 3. Implement onFling method in listener created in step 2 4. Handle the onTouchEvent in your activity Now let's jump to the code: import android.app.Activity; import android.os.Bundle; import android.view.GestureDetector; import android.view.MotionEvent; public class MySwipeSupportedActivity extends

Free online learning

Recently I saw a great TED talk about high quality free online courses offered by some of the most famous universities around the world (like MIT, Stanford) , "Daphne Koller: What we're learning from online education", available at   http://www.ted.com/talks/daphne_koller_what_we_re_learning_from_online_education.html The whole talk is really great, with some tips how to improve the effectiveness of online trainings. I did also some googling and found following websites that offer free learning courses (or index them) from various disciplines. Really worth checking and signing up: https://www.coursera.org/  - site mentioned by Daphne Koller. 124 courses offered. https://www.edx.org/  - MIT, Berkley, Harvard - some of the courses start in September and beginning of October http://www.schneider-electric.com.au/sites/australia/en/company/data-center-free-online-training-courses.page  - Data Center University offers a lot of computer-related courses http://ocw.mit.e