[solved] How to get buttons into a gridview

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

[solved] How to get buttons into a gridview

Postby Pandoro » Fri Nov 06, 2009 11:44 pm

Hello,

Right now I want to get 4 Buttons, all the same size nicely packed next to eachother in 2 rows and 2 collums at the bottom of my screen. I guess I need to do with with a gridview but simply editing the Hello Gridview example isn't really working out for me.

I've looked for some example code but couldn't find it anywhere. Can someone tell me how to do this? I guess it's just a matter of getting the right BaseAdapter code but I have no clue what too use :(

Would be really awesome if someone could help. Thnx in advanced,
Alex
Last edited by Pandoro on Sun Nov 08, 2009 6:02 pm, edited 1 time in total.
Pandoro
Junior Developer
Junior Developer
 
Posts: 12
Joined: Wed Nov 04, 2009 9:41 pm
Location: Netherlands

Top

Postby I_Artist » Sat Nov 07, 2009 8:08 pm

Hi Alex,

I think what you want to do is look-up Layouts. That's how you will position your GridView.

Here's one from the Android Developers site.

and here's another one that you might like,

Cheers!
The I_Artist

follow me on Twitter: @I_Artist
follow Android Development on Twitter: #androiddev

Show the world that you are an #androiddev, wear the badge http://www.twibbon.com/join/androiddev
User avatar
I_Artist
Developer
Developer
 
Posts: 33
Joined: Fri Oct 16, 2009 3:49 am
Location: St-Eustache, Quebec

Postby Pandoro » Sun Nov 08, 2009 11:13 am

Thanks alot :)

Those too links look really helpfull :) Actually I had figured it out by myself already... shouldn't have fixed myself on gridview that much. I went with the linearlayout and it worked fine.

Still I appreciate your post, I bet I can use the info for later projects :)
Pandoro
Junior Developer
Junior Developer
 
Posts: 12
Joined: Wed Nov 04, 2009 9:41 pm
Location: Netherlands

Postby I_Artist » Sun Nov 08, 2009 5:35 pm

You're welcome :)

Maybe you can mark this thread as [solved] ?

Cheers!
The I_Artist

follow me on Twitter: @I_Artist
follow Android Development on Twitter: #androiddev

Show the world that you are an #androiddev, wear the badge http://www.twibbon.com/join/androiddev
User avatar
I_Artist
Developer
Developer
 
Posts: 33
Joined: Fri Oct 16, 2009 3:49 am
Location: St-Eustache, Quebec

Postby Pandoro » Sun Nov 08, 2009 6:03 pm

Oooh yea sure :) didn't know that was my task but I did mark it as [solved]

Thanks again :)
Pandoro
Junior Developer
Junior Developer
 
Posts: 12
Joined: Wed Nov 04, 2009 9:41 pm
Location: Netherlands

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 6 guests