I've had so many emails about how to get SectionIndexer to pick up a
change in the dataset that I'm publishing my tweak here. It works the
same whether you're using a GridView or ListView.

private void jiggleGrid() {

               int newWidth = flag( FLAG_THUMB_PLUS ) ?
FrameLayout.LayoutParams.FILL_PARENT :
                       grid.getWidth() - 1;

               FrameLayout.LayoutParams l = new
FrameLayout.LayoutParams(
                               newWidth,
                               FrameLayout.LayoutParams.FILL_PARENT
               );

               grid.setLayoutParams( l );

               toggleFlag( FLAG_THUMB_PLUS );
}

flag() and toggleFlag() are my own functions.

Lee

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to