java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.thememanager/com.android.thememanager.ThemeResourceTabActivity}: java.lang.ArrayIndexOutOfBoundsException: length=0; index=-1
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2696)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2757)
        at android.app.ActivityThread.-wrap12(ActivityThread.java)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1504)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:163)
        at android.app.ActivityThread.main(ActivityThread.java:6237)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:877)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: java.lang.ArrayIndexOutOfBoundsException: length=0; index=-1
        at java.util.ArrayList.get(ArrayList.java:413)
        at com.android.thememanager.ThemeResourceTabActivity.buildHomeNavigation(ThemeResourceTabActivity.java:199)
        at com.android.thememanager.ThemeResourceTabActivity.initObjects(ThemeResourceTabActivity.java:149)
        at com.android.thememanager.ThemeResourceTabActivity.onCreate(ThemeResourceTabActivity.java:107)
        at android.app.Activity.performCreate(Activity.java:6847)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2649)
        ... 9 more