How to display gridview with gridlines and borders?

General topics about the Android-Platform itself.
Coding issues please to the subforum right below.

How to display gridview with gridlines and borders?

Postby HennaMullaji » Thu Feb 11, 2010 5:45 pm

Hello
I have written code to display gridview but I am unable to display it with borders and gridlines. I searched a lot on google for this but I am unable to do it.
Any help regarding this topic along with code snippet will be useful.

Thanks in advance,
H
HennaMullaji
Freshman
Freshman
 
Posts: 5
Joined: Thu Feb 11, 2010 4:57 am

Top

Postby HennaMullaji » Fri Feb 12, 2010 6:41 pm

Dear Plusminus, Atleast tell me if its possible in android to make a gridview with gridlines...so that I will stop searching for it.
Waiting for your reply,
H
HennaMullaji
Freshman
Freshman
 
Posts: 5
Joined: Thu Feb 11, 2010 4:57 am

Did u find d solution?

Postby pria » Tue Mar 09, 2010 11:11 am

Did u get the answer for this solution...if yes...plz share!
pria
Junior Developer
Junior Developer
 
Posts: 14
Joined: Tue Mar 02, 2010 1:37 pm
Location: Pune

Postby HennaMullaji » Tue Mar 09, 2010 12:14 pm

No i haven't got it, basically i dropped the idea of using a gridview coz i have text in the cells of gridview which looks ugly without gridlines.
I searched for it a lot and also saw many videos and books...no where i was able to find a gridview with lines. :(
HennaMullaji
Freshman
Freshman
 
Posts: 5
Joined: Thu Feb 11, 2010 4:57 am

Postby pskink » Tue Mar 09, 2010 1:55 pm

something like in attached image device.png?

its easy:

make your grid item has background:

android:background="@drawable/back"

and your grid:

android:horizontalSpacing="-1px"
android:verticalSpacing="-1px"
Attachments
back.9.png
back.9.png (198 Bytes) Viewed 14225 times
device.png
device.png (11.27 KiB) Viewed 14143 times
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Postby HennaMullaji » Wed Mar 10, 2010 6:41 am

pskink wrote:something like in attached image device.png?

its easy:

make your grid item has background:

android:background="@drawable/back"

and your grid:

android:horizontalSpacing="-1px"
android:verticalSpacing="-1px"



I am not able to view back.png, what kind of image have you attached?
If possible please upload it once again.
Thanks in advance,
H
HennaMullaji
Freshman
Freshman
 
Posts: 5
Joined: Thu Feb 11, 2010 4:57 am

Top

Postby pskink » Wed Mar 10, 2010 8:28 am

HennaMullaji wrote:

I am not able to view back.png, what kind of image have you attached?
If possible please upload it once again.
Thanks in advance,
H


it's small 5x5 pix png file:

download.php?id=1896
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Re: How to display gridview with gridlines and borders?

Postby vijay_kumar_kerala » Sun Jun 19, 2011 11:22 am

May be this link helps you if you want to create a custom grid... http://bit.ly/kY3TSH
vijay_kumar_kerala
Once Poster
Once Poster
 
Posts: 1
Joined: Sun Jun 19, 2011 11:17 am

Top

Return to General

Who is online

Users browsing this forum: No registered users and 4 guests