Wrox Programmer Forums
|
BOOK: Beginning Android Application Development
This is the forum to discuss the Wrox book Beginning Android Application Development by Wei-Meng Lee; ISBN: 978-1-1180-1711-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Android Application Development section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 15th, 2011, 04:03 PM
Registered User
 
Join Date: Dec 2011
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Basic GridView Question

Hi, I'm a newbie. My question is this: is there a way to build a GridView dynamically? In the example in the book, we are told to place images in the "drawable" directory, and the grid is built from that. How do we build a grid "on the fly"? Do we copy images to the "drawable" directory, or do we write a custom view for that? My aim is to create a grid of thumbnails of the photos on the phone. Thanks.
 
Old December 16th, 2011, 07:39 PM
Registered User
 
Join Date: Nov 2011
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Default

It may well be that later chapters will indicate a way.
 
Old December 18th, 2011, 05:38 PM
Registered User
 
Join Date: Dec 2011
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It turns out that Android has a number of predefined content providers, one of which is for images and one for thumbnails (either internally or externally on the SD card). Also, the Activity class has a predefined method which will retrieve a database cursor for the data in a given content provider. This cursor can then be used to create an adapter which will link the image data to the grid layout. Pretty funky.





Similar Threads
Thread Thread Starter Forum Replies Last Post
a basic question Howard Pai BOOK: Beginning C# 3.0 : An Introduction to Object Oriented Programming ISBN: 978-0-470-26129-3 1 August 11th, 2011 09:44 AM
Please HELP Very Basic Question jkoe578 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 November 18th, 2006 10:06 AM
xslt basic question kgoldvas XSLT 2 January 25th, 2006 02:48 PM
basic xslt Question abhishek verma XSLT 4 January 24th, 2006 05:35 AM
basic question but..... Adam H-W Javascript How-To 2 February 10th, 2004 01:24 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.