Bug Fix: Fixed broken FilterBar in ListView

@halatmit @jisqyv @afmckinney Fixed broken FilterBar in Listview - related to issue 182:
https://github.com/mit-cml/appinventor-sources/issues/182
PS:  Se Taifun's comment here:

http://puravidaapps.com/listview.php

Or am I just confused.


== Hal Abelson
hal@mit.edu
Prof. of Comp. Sci. and Eng.
MIT Dept. of Elec. Eng. and Comp. Sci.
MIT Media Lab, Second Class Faculty


On Mon, Dec 29, 2014 at 6:02 PM, kkashi01 <notifications@github.com> wrote:

> In
> appinventor/components/src/com/google/appinventor/components/runtime/ListView.java
> <https://github.com/mit-cml/appinventor-sources/pull/199#discussion-diff-22332949>
> :
>
> > @@ -317,7 +317,9 @@ public void Selection(String value) {
> >     */
> >    @Override
> >    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
> > -    SelectionIndex(position + 1); // AI lists are 1-based
> > +      this.selection = ((SpannableString) parent.getAdapter().getItem(position)).toString();
> > +      this.selectionIndex = position + 1; // AI lists are 1-based
>
> Try the same .aia with app inventor and see the result
> … <#14a9849488cc611b_>
> On Dec 29, 2014 5:58 PM, "hal" <notifications@github.com> wrote: In
> appinventor/components/src/com/google/appinventor/components/runtime/ListView.java
> <
> https://github.com/mit-cml/appinventor-sources/pull/199#discussion-diff-22332834>
> : > @@ -317,7 +317,9 @@ public void Selection(String value) { > */ >
> @Override <https://github.com/Override> > public void
> onItemClick(AdapterView<?> parent, View view, int position, long id) { > -
> SelectionIndex(position + 1); // AI lists are 1-based > + this.selection =
> ((SpannableString) parent.getAdapter().getItem(position)).toString(); > +
> this.selectionIndex = position + 1; // AI lists are 1-based I don't think
> this is correct. When I try Taifun's example, I get b2 as the selection
> (which is correct) but I get 2 as the selection index (rather than 4). Can
> you take a look? @kkashi01 <https://github.com/kkashi01> <
> https://github.com/kkashi01> — Reply to this email directly or view it on
> GitHub <
> https://github.com/mit-cml/appinventor-sources/pull/199/files#r22332834>.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/mit-cml/appinventor-sources/pull/199/files#r22332949>.
>