stretch the cells in a gridview? - Android Software Development

hello, I have a gridview that uses fill_parent, it will always have 7*6 cells.
now i try to get the cells to stretch so all the cells is the max size as possible without getting any scrolling!
the width is right but I dont know how to get the right height on each cell....
I tried using getHeight() on the grid and then take height/6 but getHeight() returns 0 as height and I think thats because it uses fill_parent so how can i do this?

Related

Windows Mobile 6.5 Theme Margin/Padding Explained

Many people may be confuse as to what these values mean. I think I've finally figured it out, "Hopefully" lol. It is very similar to how Margin/Border/Padding work in HTML except Margin is both Margin & Border as the border is part of the image.
Please see attached image.
The Red outline is the Edge of the image. Most images have a transparent edge around the outside of the gfx you see. The Yellow outline is the Margin. This is the distance from the edge of the images to the part of the image you don't want stretched when the image gets resized. So, if you have a 2 pixel transparency around the outside plus a 2 pixel Border, than you want a 4-5 pixel Margin. Padding is the same basically except it from where Margin stops of image to the where the Content begins, Content being text or what ever. If no Padding value is given, than the Content will begin at the inside of the Margin. An example would be to add a Left/Right Padding value to the new SoftKey Buttons of the newer builds so the text wouldn't go so close to the edge of the image. Also, same images may have a height or Width Value. This will restrict how big an image can become before it'll add the scroll ability. For example, you don't want the Menu to become too big to fit on-screen. So, you add a Height value, if all Content of the Menu is greater than the height, the menu will add the scroll arrows. It content is less than the height, no scroll arrows are used. With this being said, it could be possible to state a Max Width as well, haven't tested that though.
bookmarked.
Thanks

Home screen cell size?

Hi,
When you are using HTC Sense UI and is "moving" (long-press then drag) an item in the home screen, you will see some kind like "cell" (green rectangle).
Do you know the size of this cell in pixel? for screen size 800x480.
Thanks.
If you can see the cells you should be able to use basic math to get the cell size. vRes/#vCells and hRes/#hCells
There is notification bar and the bottom part of the Sense UI which I dont know the size.
Mast3rpyr0 said:
If you can see the cells you should be able to use basic math to get the cell size. vRes/#vCells and hRes/#hCells
Click to expand...
Click to collapse
Check this : developer.android.com/guide/practices/ui_guidelines/widget_design.html

Android Expert Required

I want to develop an app that puts a white line grid on a black background.
The grid has 3 columns and 3 rows
There is a 10% border around the grid.
The first column takes up 50% width
The second column takes up 20% width
And the third column takes 10%width
None of the columns expand or contract, they always stay the same size.
Each row is the same height.
If you click any cell, a keyboard appears on the screen allowing you to input data into the cell.
Is it possible to do this white line grid in Android?
If yes, how does one do it?
Best regards
RedTopBox.com
anyone know
Hi All
i have not received any replies.
Can anyone help please
I think it is possible. Do you have a fixed number of rows? is it small? if yes, you could directly use LinearLayout with orientation set to horizontal for each row. There you have android:layout_weight which you can use to play with the different widths you have. For the table borders, just add a View, with a background color of your preference, again use layout_weight if necessary.
If you have too many rows, or you would prefer another approach, you could use TableLayout, and for each row a TableRow, and in the same way use layout_weight for the width. For drawing the borders you could do it in this way: http://www.droidnova.com/display-borders-in-tablelayout,112.html
TableLayout has different parameters like shrinkColumns, or stretchColumns, which you will probably would need, but I am no expert on this, so you would need to play with them.
For displaying a keyboard when the user press on each element of the table, you could have a editText on each, so this would be automatically.
BTW I recommend you asking this type of questions in stackoverflow.com, and tag it with android, there should be more capable people than me to help you with this particular case.

Any LectureNotes users getting blurry text?

When I draw, no matter what the pen size, the rendering seems to be a bit fuzzy/blurry. Like while I'm writing (pen is on the screen), the trail that my pen leaves behind looks fine (very smooth and vector-ish) but as soon as I let go, what I've written renders into this slightly blurry thing and it's kind of driving me nuts. I'm at 100% zoom with pressure sensitivity enabled, blue/black pen on a white background.
Any ideas?
@abmicyau: I guess you have choose a rather small width and height of your notebook pages. When you click on the `?´ aside the parameters when creating a new notebook, LectureNotes will give recommendations. For instance, a width of 1280 and a height of 1811 (yielding an A4 aspect ratio) is a good choice.
acadoid said:
@abmicyau: I guess you have choose a rather small width and height of your notebook pages. When you click on the `?´ aside the parameters when creating a new notebook, LectureNotes will give recommendations. For instance, a width of 1280 and a height of 1811 (yielding an A4 aspect ratio) is a good choice.
Click to expand...
Click to collapse
That is the default setting - it's what I have for mine. The only way i can really fix it is if I set the width to be a bit higher, then increase the default magnification.

"Screenshot" of the whole scrollview (horizontal in vertical)

Hi,
I am developing the app which displays big tableview. I used horizontal scrollview inside the vertical scrollview and now, I would like to take a screenshot of the whole tableview. However, nothing I found is working. It either takes full width but not full height or only the size of the screen.
Thanks

Categories

Resources