donnfelker/android-bootstrap — pull request #23 by xianminx (2012-11-12 16:42:46+00:00)
Title: update the mis-use of TypeAdapter's method argument. Use view index instead of view id for imageView and textView methods  

...ead of view id for imageView and textView methods

After login into the app, the app crashes. The logcat shows as following log. The error is caused by misuse of [wishlist](https://github.com/kevinsawicki/wishlist/blob/master/lib/src/main/java/com/github/kevinsawicki/wishlist/TypeAdapter.java) library where the argument for method __textview__ and __imageview__ should be child view's __index__ instead of its view *resource id*.

```bash
11-13 00:10:57.687: E/AndroidRuntime(2655): java.lang.ArrayIndexOutOfBoundsException: length=2; index=2131099704
11-13 00:10:57.687: E/AndroidRuntime(2655):	at com.github.kevinsawicki.wishlist.TypeAdapter.textView(TypeAdapter.java:91)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at com.github.kevinsawicki.wishlist.TypeAdapter.setText(TypeAdapter.java:158)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at com.donnfelker.android.bootstrap.ui.CheckInsListAdapter.update(CheckInsListAdapter.java:42)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at com.donnfelker.android.bootstrap.ui.CheckInsListAdapter.update(CheckInsListAdapter.java:14)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at com.github.kevinsawicki.wishlist.SingleTypeAdapter.update(SingleTypeAdapter.java:151)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at com.github.kevinsawicki.wishlist.SingleTypeAdapter.getView(SingleTypeAdapter.java:167)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.widget.HeaderViewListAdapter.getView(HeaderViewListAdapter.java:220)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.widget.AbsListView.obtainView(AbsListView.java:2267)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.widget.ListView.makeAndAddView(ListView.java:1769)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.widget.ListView.fillDown(ListView.java:672)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.widget.ListView.fillFromTop(ListView.java:733)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.widget.ListView.layoutChildren(ListView.java:1622)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.widget.AbsListView.onLayout(AbsListView.java:2102)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.view.View.layout(View.java:13754)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.view.ViewGroup.layout(ViewGroup.java:4362)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.widget.RelativeLayout.onLayout(RelativeLayout.java:948)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.view.View.layout(View.java:13754)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.view.ViewGroup.layout(ViewGroup.java:4362)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.view.View.layout(View.java:13754)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.view.ViewGroup.layout(ViewGroup.java:4362)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.support.v4.view.ViewPager.onLayout(ViewPager.java:1141)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.view.View.layout(View.java:13754)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.view.ViewGroup.layout(ViewGroup.java:4362)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1649)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1507)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.widget.LinearLayout.onLayout(LinearLayout.java:1420)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.view.View.layout(View.java:13754)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.view.ViewGroup.layout(ViewGroup.java:4362)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.view.View.layout(View.java:13754)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.view.ViewGroup.layout(ViewGroup.java:4362)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1649)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1507)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.widget.LinearLayout.onLayout(LinearLayout.java:1420)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.view.View.layout(View.java:13754)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.view.ViewGroup.layout(ViewGroup.java:4362)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.view.View.layout(View.java:13754)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.view.ViewGroup.layout(ViewGroup.java:4362)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:1866)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1687)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:998)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4212)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.view.Choreographer.doCallbacks(Choreographer.java:555)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.view.Choreographer.doFrame(Choreographer.java:525)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.os.Handler.handleCallback(Handler.java:615)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.os.Handler.dispatchMessage(Handler.java:92)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.os.Looper.loop(Looper.java:137)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at android.app.ActivityThread.main(ActivityThread.java:4745)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at java.lang.reflect.Method.invokeNative(Native Method)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at java.lang.reflect.Method.invoke(Method.java:511)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
11-13 00:10:57.687: E/AndroidRuntime(2655):	at dalvik.system.NativeStart.main(Native Method)
```