Tuesday, 22 April 2014

A Beginner Android Dev's Guide on How to Import Custom Libraries Into the Eclipse IDE

You will need:
  • the Eclipse IDE with the Android SDK.

General Steps
  • Go to the site (e.g. github) that has the open source library.
  •  Download the files (usually there should be a button that says "download .zip file" or "download .rar file". 
  • Copy and paste the src files into your own Android application's package. I usually like to do this by copying and pasting normally, and then pasting inside the package manager that Eclipse provides.
  • You might get errors. If you copied the individual classes into a package you already pre-made/pre-named, then just change the package name inside each .class file.
  • If there are errors for R., import the one that has your application package's name, and not the other Android.R one.
  • If there are additional things (e.g. the custom library included files in a drawable folder/xml files in the values folder), then be careful not to override your current android application's existing files!!! (e.g. if you already have values/string.xml and the custom library has one as well, then try to manually combine them instead of overwriting YOURS. You will get errors if you do not.)
Now, you can use the custom library. I hope this helps some people.

Sunday, 6 April 2014

A Newbie's Short Intro Guide to Gundam (biased perspective by me)

Brief History of Me, and a Story on How Gundam Came to Canada

If you're reading this, chances are that you have heard of the famous Japanese anime franchise called Gundam. My brother and I have always loved this anime to death, and I figured it was to time actually write a blog post about this famous mecha franchise. To start off, before I was born, my family lived in Japan. My brother was exposed greatly to this great series, and I can definitely imagine his eyes filling up with wonder as he saw the Gundam shows on TV, read Gundam mangas, and collected Gundam models (which are called "Gunpla"). I was born only a few years until we had to move to Canada, so naturally, I was not as well acquainted with Gundam compared to my brother, who became a full-fledged Gundam "otaku".

When I came to Canada, there was no sign of anime or the anime culture anywhere (other than Pokemon, and perhaps Dragon Ball Z). Just when you'd think Gundam would never be popular in North America, my brother and I managed to discover that very late at night, on YTV, Gundam Wing actually aired!

I feel so old for remembering this logo of YTV's!

To note, I'm currently 18 years old, and came to Canada when I was around 4 years old. Yep, I was that young when I first saw Gundam Wing!

In honesty, Gundam Wing was the first Gundam anime that I've seen (likewise for many other North American Gundam fans). After Gundam Wing, however, it seemed that the Gundam craze stopped outside of Japan (especially since here in Canada, G Gundam never aired). It was only years later that Gundam Seed and Gundam Seed Destiny aired (and we all know how bad GSD was). And after Gundam Seed and Gundam Seed Destiny finished, no new Gundam shows ever appeared. It's suffice to say that my brother and I were very disappointed because of this.

Most people I know who managed to even watch Gundam Wing that late at night (as we all had curfews, being children and all that) didn't even know that there are other Gundam shows out there! After I told them of this fact, they were honestly fascinated. Their eyes widened and their jaws open, struck in disbelief. "There were OTHER Gundam animes?", they would usually say.

There is a variety of Gundam shows out there.

There are tons! And being the kind of person who loves to share good animes, I naturally tried to persuade them, or rather, "convert" them into liking Gundam. The only unfortunate thing now is how to actually get them "into" Gundam. They have expressed how daunting it is to tackle this gigantic franchise, with a multitude of series that are 50 episodes or more, multiple OVAs, and lots of movies as well.

So, why am I writing this at 1 a.m. when I have my co-op job tomorrow? Well, I want to provide a short guide for newbies of Gundam (a.k.a. my friends) to help them get "into" the Gundam franchise. I know that there are other guides out there, but I just wanted to write one of myself.

If I help even one person out with this guide, then I think I would consider my job done :)


(With a biased perspective from me)

Do you like Recent Anime? Do you not like the look of old animes?
  • Gundam 00 (may not be for young children, set in future of our universe)
  • Gundam Seed, followed by Gundam Seed Destiny (GSD is a direct sequel to GS) (Caution: the main character and his trophy wife is a Mary Sue. Also, GSD has lots of plot holes.)
  • Gundam Age (main character: a kid, spans 3 "arcs")
  • Gundam Unicorn (CAUTION: It's better if you understood all of the Universal Century first. The UC era is basically the "universe" where a lot of older Gundam series took place in)
  • Gundam Build Fighters (CAUTION: not the conventional kind of Gundam anime. This anime is more for children who are into animes like Yu-gi-oh or Pokemon)

Do you want to see the classic animes?
Watch these in order (you may skip 0079 and just read a summary of it, if you don't really like it... which I didn't):
  • Gundam 0079 (the original)
  • Gundam Zeta
  • Gundam ZZ
  • Char's Counterattack

Do you have a short attention span? Do you just want those 25-episode animes or short OVAs? These are good to get the "feel" of Gundam in less than 25-ish episodes!
  •  Gundam War in the Pocket (6 ep, very sort and sweet/will make you cry at the end)
  • Gundam MS 08th team (I think 25 episodes, and one retarded 26th episode which you should not watch)
  •  Gundam Stardust Memories (really good! I recommend. This and MS 08th team are the first ones that come to my mind when I think of the essence of Gundam... condensed into a neat little package :)!)
  • MS Igloo (I don't really recommend this as your starter Gundam series)

Do you like death, lots of people dying, etc.?
  • Victory Gundam

Do you like street fighter?
  • G Gundam 

And finally, the one that I loved but everyone else hated
Turn A Gundam.

I know - it's not really a traditional Gundam series. Also, at first you might be completely turned off just from the opening theme, the fact that it looks like it took place in the Victorian era, and the fact that the main Gundam has a big moustache - but, if you keep watching it, I guarantee that most of you guys will love this anime as much as I did :) It holds a special place in my heart!

Not to mention that Turn A also has one of the best ending theme songs out of any of the other Gundam series:

This was my brief intro guide to Gundam. I might update it later.

Friday, 4 April 2014

3 Reasons why your Android Search Dialog Doesn't Work

Today's post will be pretty short. It's about the search dialog in Android.

It's about this annoying thing I've tried to do for a long time. And it's a pretty easy thing to implement, since Android actually has a tutorial on how to implement it on their site. Click here to see the documentation.

It's how to create a search interface for your application.

I have had many newbie problems in just getting this thing to work, and after finally having solved all of my problems I wanted to compile a simple list of the most common reasons why the search dialog doesn't work
  1. You need to use @string/ instead of hardcoding the android:label and android:hint in your searchable.xml (this xml file is something you should have created in your /xml/ folder under res/)
  2. You messed up somewhere in your Android manifest.
Here is how your android manifest should look like.

 Android SearchableActivity
<activity android:name="com.example.lexicav1.SearchableActivity" >
                <action android:name="android.intent.action.SEARCH" />

                android:resource="@xml/searchable" />


the activity you want to use the search dialog in
                <action android:name="android.intent.action.listlexica" />

                <category android:name="android.intent.category.DEFAULT" />
              <meta-data android:name="android.app.default_searchable"
                   android:value=".SearchableActivity" />


3. Put the correct path location of your SearchableActivity.class in android:value. For example, instead of using:


I used instead:


Which is wrong, because I did not put it in that package.

I hope this post helps.