Enable Dashboard in OS X El Capitan

So when you start your os you will see no dashboard there don’t panic it is disabled by default.
Just go to System Preference -> Mission Control you will see off beside Dashboard. From the drop down menu you can choose either As Space or As overlay. As Space is the old way to show the dashboard so an extra desktop screen will be added in the left most side. As overlay means it will appear as overlay so you can use either keyboard shortcut or hot corners which you can choose by clicking the button Hot Corners. When you will hover your mouse pointer in the hot corners the dashboard will appear.

Enjoy 🙂

View Animation vs Property Animation in Android

Sometimes we need to animate some view in our application. Here is a sample code for translate a view over x axis from its location.

Button bt;
bt = (Button) findViewById(R.id.bt);

TranslateAnimation animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 300, Animation.RELATIVE_TO_SELF, Animation.RELATIVE_TO_SELF);

But the problem of this code is if you want to click this button after animate you can not, why lets read the documentation from android developer site

disadvantage of the view animation system is that it only modified where the View was drawn, and not the actual View itself. For instance, if you animated a button to move across the screen, the button draws correctly, but the actual location where you can click the button does not change, so you have to implement your own logic to handle this.


To solve this issue we will use ObjectAnimator class to animate our view.

ObjectAnimator animXNext = ObjectAnimator.ofFloat(bt, "translationX", Animation.RELATIVE_TO_SELF, 300);

Now you can click on the button. Enjoy 🙂

The Era of Artificial Intelligence

I recently saw a post from Mark, he announced that Facebook is opening an international research center for artificial intelligence in Paris.

Screen Shot 2015-06-03 at 7.39.09 PM

see more

After that soundHound a popular song identification app company announced about a personal assistant called hound i am excited to see how this goes.

Last year amazon announced echo an intelligent device for your house or home. It can play music, get weather updates and other cool stuffs.

Apple also doing great with their intelligent personal assistant called Siri

What about Google ? we all know about their self driving car project. The software powering Google’s cars is called Google Chauffeur.

Last but not least i really loved the movie Ex machina. I think its not far when we can see this is happening in reality.  So is the “Turing Test” in the verge of failing … ?

How to change Android Studio Keymap (MAC OS X)

It is very difficult for the eclipse users to switch to Android Studio, specially when it comes to keyboard shortcuts. So to solve this issue just follow the following steps.

1. Go to Preference from (cmd + ,)
2. From the left hand find Keymap under IDE settings
3. After selecting the Keymap, you will see in the right hand side a drop down menu under Keymap
4. Select Eclipse (Mac OS X)

And you are done

here are few keyboard shortcuts

1. format code: cmd + shift + f
2. up or down line of codes: alt + up key / down key
3. open resource: cmd + shift + t
4. comment line: cmd + /
5. delete line: cmd + d
6. go to line number: cmd + l
7. last edit line: ctrl + q
8. implement/override methods: cmd + o

If any of the shortcuts is not working you can always edit or add them from the keymap section.

enjoy 🙂