[android-developers] Handling gestures in an AdapterView

2014-07-18 Thread dashman
I'm trying to implement a horizontal view class that holds list-items that are created using a layout. The problem is when I scroll the listview and then lift my finger up - singleTap gets registered by the children inside the list-items (e.g. a button) I don't want that - it was a scroll

[android-developers] Can InputManagerService “input is not valid Modified UTF-8: illegal start byte 0xb4” cause Phone crash? system server restart

2014-07-18 Thread ERIC0593
Dear all Can InputManagerService “input is not valid Modified UTF-8: illegal start byte 0xb4” cause Phone crash? system server restart . I got many tombstone like this. thanks 07-09 18:23:42.578 3884 4176 D dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 31ms 07-09 18:23:43.388 3884

[android-developers] switch case using string from Enum

2014-07-18 Thread sweety fx
*I have the below enum:* public enum Type { TYPE_ONE(event/one); TYPE_TWO(event/two); private Type(String mType){ this.mType = mType; } private final String mType; public String getType(){return mType;} } *I am trying to compare in Switch/Case:* switch

[android-developers] Re: switch case using string from Enum

2014-07-18 Thread Streets Of Boston
Yep, you can't do that. If 'event' is of type 'Type', then you could do switch(event) { case TYPE_ONE: case TYPE_TWO: ...} ..., because Enum values are considered to be constant. Instead, change your switch statement to if (...) else if (...) { ... } else if (...) { ... } else if (...)

[android-developers] Re: switch case using string from Enum

2014-07-18 Thread sweety fx
Is there a way to pass enum value from the string? So that I can make event.getType() to return enum of the string instead of returning string? On Friday, July 18, 2014 1:22:45 PM UTC-4, Streets Of Boston wrote: Yep, you can't do that. If 'event' is of type 'Type', then you could do

[android-developers] Re: switch case using string from Enum

2014-07-18 Thread Streets Of Boston
Not without adding some code yourself. I have done this many times when values from some JSON string from a server map to Enum values but these JSON strings don't map onto the names of the Enum values directly. I usually added a public static method to my Enum class, a factory that produces

Re: [android-developers] Handling gestures in an AdapterView

2014-07-18 Thread TreKing
On Fri, Jul 18, 2014 at 7:37 AM, dashman erjdri...@gmail.com wrote: I'm trying to implement a horizontal view class that holds list-items that are created using a layout. Showing a bit of the relevant code might help. Like the horizontal view implementation and the click listeners.