Bug-116 Make MainActivity can select different category.

BTW, use `(xxxx) ? a : b;` give better performance.