[android-developers] Re: horizontal scrolling in GridView control
I'm not 100% sure, but I think it would do only most of it. I need each row to contain 17 individual cells, each with multiple widgets (like an imageview and a textview). Then I need each one of those 17 cells, in each of 32 rows, to be clickable, so that I can record some data and change the background of the cell when clicked. So would something like this work?: TableLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=fill_parent android:stretchColumns=1 TableRow View android:layout_height=20px android:background=#FF TextView android:text=id=@+id/week1 ... / ImageView android:id=@+id/icon1 .../ /View ... (repeat for views 2-17) /TableRow ... (repeat for rows 2-32) /TableLayout Couple concerns/questions about this: - Isn't this a lot of static XML for something that seems to be calling out for a more data-driven grid-like view? - If this is the answer, how can I trap a click for each of the Views (not just widget within a view), and know exactly what row and column of this thing has been clicked? -- 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
[android-developers] Re: horizontal scrolling in GridView control
I think this will be much easier in Java. Then you can set the onClickListener as you create the widgets. ScrollView contains TableLayout contains Table Rows contain TextViews and ImageViews (each with the onClickListener set for the right action) On Sep 22, 11:32 am, nextgen nextgenfant...@comcast.net wrote: I'm not 100% sure, but I think it would do only most of it. I need each row to contain 17 individual cells, each with multiple widgets (like an imageview and a textview). Then I need each one of those 17 cells, in each of 32 rows, to be clickable, so that I can record some data and change the background of the cell when clicked. So would something like this work?: TableLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=fill_parent android:stretchColumns=1 TableRow View android:layout_height=20px android:background=#FF TextView android:text=id=@+id/week1 ... / ImageView android:id=@+id/icon1 .../ /View ... (repeat for views 2-17) /TableRow ... (repeat for rows 2-32) /TableLayout Couple concerns/questions about this: - Isn't this a lot of static XML for something that seems to be calling out for a more data-driven grid-like view? - If this is the answer, how can I trap a click for each of the Views (not just widget within a view), and know exactly what row and column of this thing has been clicked? -- 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
[android-developers] Re: horizontal scrolling in GridView control
Count me in as another who has this problem. It's a real disappointment that this cannot be done. But, it seems clear you can't do it. So does anyone have any elegant work-arounds yet? I want to create a grid of 17 columns and 32 rows (an NFL Schedule grid). I was hoping to do it with a GridView where, say, 7-10 rows would be on the screen at once, and 3-5 columns (in portrait). Then I simply wanted the user to be able to scroll around the grid, vertically and horizontally, and look at whatever they want. I've thought about: - Using Gallery, but that does not do what I'm looking for here. The point isn't only horizontal scrolling, it's to have a bunch of cells on screen at once for viewing - Using 17 ListViews side by side, inside a ScrollView. But 17 ListViews? Isn't that also 17 adapters? I don't think so ... - Using a single ListView inside a ScrollView, where each row of the list uses a TableLayout to split into 17 cells. I think this might work, but I haven't tried it. Plus, I *think* I can isolate clicks of each cell this way, but I'm not sure. - Finally, I'm not willing to dive into core code of these widgets and try to write this myself. I'm not advanced enough right now. Any other ideas? -- 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
[android-developers] Re: horizontal scrolling in GridView control
It seems like a TableLayout inside of a ScrollView would do this. Or am I missing something? -- 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
Re: [android-developers] Re: horizontal scrolling in GridView control
but gallery does center lock automatically. Do you know a way make items shown from left to right and not moving to center upon selected? On Fri, Jul 16, 2010 at 6:32 PM, Namrata puranik.namr...@gmail.com wrote: I had the same issue, I am using gallery instead of grid for this. On Jul 16, 3:17 pm, CMF manf...@gmail.com wrote: i have the same question, anybody know the answer? On Jun 23, 3:39 am, dharmveer dharmv...@gmail.com wrote: Hi, Instead of the currently implemented verticalscrollingin theGridViewcontrol, I want to scroll horizontally. So, I want to be able to move left and right by swiping left/right so the contents scroll horizontally. I have tried setting the setNumColumns() but that did not help. Is there any other way that can help me scroll it horizontally. Thanks in advance. -Dharmveer -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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
[android-developers] Re: horizontal scrolling in GridView control
I also has the same issue On Jul 16, 3:32 pm, Namrata puranik.namr...@gmail.com wrote: I had the same issue, I am using gallery instead ofgridfor this. On Jul 16, 3:17 pm, CMF manf...@gmail.com wrote: i have the same question, anybody know the answer? On Jun 23, 3:39 am, dharmveer dharmv...@gmail.com wrote: Hi, Instead of the currently implemented verticalscrollingin theGridViewcontrol, I want toscrollhorizontally. So, I want to be able to move left and right by swiping left/right so the contentsscroll horizontally. I have tried setting the setNumColumns() but that did not help. Is there any other way that can help mescrollit horizontally. Thanks in advance. -Dharmveer -- 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
[android-developers] Re: horizontal scrolling in GridView control
i have the same question, anybody know the answer? On Jun 23, 3:39 am, dharmveer dharmv...@gmail.com wrote: Hi, Instead of the currently implemented vertical scrolling in theGridViewcontrol, I want to scroll horizontally. So, I want to be able to move left and right by swiping left/right so the contents scroll horizontally. I have tried setting the setNumColumns() but that did not help. Is there any other way that can help me scroll it horizontally. Thanks in advance. -Dharmveer -- 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
[android-developers] Re: horizontal scrolling in GridView control
I had the same issue, I am using gallery instead of grid for this. On Jul 16, 3:17 pm, CMF manf...@gmail.com wrote: i have the same question, anybody know the answer? On Jun 23, 3:39 am, dharmveer dharmv...@gmail.com wrote: Hi, Instead of the currently implemented verticalscrollingin theGridViewcontrol, I want to scroll horizontally. So, I want to be able to move left and right by swiping left/right so the contents scroll horizontally. I have tried setting the setNumColumns() but that did not help. Is there any other way that can help me scroll it horizontally. Thanks in advance. -Dharmveer -- 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