Questions tagged [android-gridview]

GridView is a subclass of AdapterView that displays items in a two-dimensional, scrollable grid.

GridView is a subclass of AdapterView that displays items in a two-dimensional, scrollable grid. The grid items are automatically inserted to the layout using a ListAdapter. The cell-data binding is made through an Adapter.

Reference

1627 questions
0
votes
0 answers

Weird output from GridView

With the following code I get some unexpected output: Log.i(TAG, "Activity numColumns: "+mGrid.getNumColumns()); Log.i(TAG, "Activity verticalSpace: "+mGrid.getVerticalSpacing()); Log.i(TAG, "Activity horizontalSpace:…
PageMaker
  • 395
  • 1
  • 3
  • 10
0
votes
0 answers

GridView with ListActivity

I'm trying to make a GridView work in place of a Listview. The code uses a ListActivity, here it is below: public class BorrowerList extends ListActivity implements LoaderManager.LoaderCallbacks { private static final int…
Vince
  • 45
  • 12
0
votes
1 answer

GridView with ListActivity instead of ListView

I have an app that pulls data from a database and puts it into a listview via a ListActivity as well as a Cursor Loader. The code is below: public class PersonRecord extends ListActivity implements LoaderManager.LoaderCallbacks
Vince
  • 45
  • 12
0
votes
1 answer

Parse JSON as object using GSON

I've my JSON like this: { "shops": [ { "id": "831", "name": "18 and East", "categories": [ "1", "12", "13" ], "locations": [ { …
Kabe
  • 223
  • 2
  • 4
  • 16
0
votes
3 answers

Updating View inside GridView

I have implemented an ArrayAdapter for customizing a GridView. The layout of each item is defined in xml code that produce something like this: In my Activity I have implemented the following code: GridView gridview = (GridView)…
0
votes
1 answer

How to set LinearLayout content with respect to GridView or GridView content with respect to LinearLayout?

I want to align LinearLayout contents with respect to gridview. The gap between the day(i.e Sun,Mon..etc) in the following calendar layout should be equal to gridview space(1,2..30). Background image for the day should be avoided. Layout code:
Madhav Bhattarai
  • 847
  • 2
  • 10
  • 29
0
votes
0 answers

Why is GridViews adapter null but not Listviews? (In ViewPager fragments)

I have a couple of fragments in a viewpager and each time their onViewCreated() is called I set the adapter unless it has already been set. I check this by getListAdapter() == null ? setAdapter() : //Otherwise do nothing This works great. However…
0
votes
1 answer

Add GridView Item to other GridView on Tap

I have two GridViews, in two separate fragments in my application. I would like to be able to 'add' items via tap from one GridView (already populated) into my empty grid view. How would I go about doing this? ex. Shopping Cart, adding items from…
Evan Bashir
  • 5,501
  • 2
  • 25
  • 29
0
votes
1 answer

Setting ImageView to selected GridView image not working

I have an ImageView next to a GridView and what I'm trying to do is set the ImageView to the picture selected in the GridView. When I run my project, All the thumbnails display in the GridView (photoGrid_) normally, but when I press a thumbnail, the…
user868935
0
votes
2 answers

Prevent GridView from scrolling on onConfigurationChanged

When configuration of the activity changes I apply this code - public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); …
0
votes
1 answer

eclipse android gui designer - limit number of items in list

When I drag a gridview into the graphical layout screen in Android Eclipse, and give it wrap content, then it fills the height of the screen with 24 placeholders. How can I limit its length? Note this is fine when I actually run the application…
user2022581
  • 923
  • 2
  • 9
  • 16
0
votes
1 answer

retain sqlite data records during screen orientation change

in my app im using gridview when in portrait mode it shows one column. in landscape mode new layout defined to show 2 column. this is how the app works.. when app is launched, progress dialog is called to load website name from sqlite database and…
Maulik Sheth
  • 584
  • 3
  • 10
0
votes
4 answers

How to use multiple ListView/GridView in same UI?

I want to use multiple ListView/GridView within same User Interface; I don't want them to be expanded to their full length and placed under ScrollView.
0
votes
2 answers

Gridview image to give sqlite data

I have been trying to find something that can help me to retrieve SQLite database row when I click on the gridview image ! Like when I click the first image on the new activity it shows me some data related to that image which is saved in the…
Mohsin Mushtaq
  • 133
  • 1
  • 5
  • 17