Android List View Array Index Out Of Bounds Exception - No clues?

前端 未结 4 716
梦如初夏
梦如初夏 2021-01-06 05:34

I have an app which loads a listview when opened, however I am getting an Array Index Out Of Bounds Exception, with no clues as to where the problem lies. It is trying to ac

4条回答
  •  逝去的感伤
    2021-01-06 05:54

    This is caused by setting android:ellipsize="middle" (or start) on a TextView that does not have android:singleLine="true" on.

    For example, the following crashes on this error:

    
    

    But the following does not:

    
    

    Reference: https://code.google.com/p/android/issues/detail?id=33868

    Note: singleLine is a deprecated attribute but still works on Jelly Bean.

提交回复
热议问题