How can I make gridLayout expand to cover the whole screen? - Java for Android App Development

Just like how the title stated, I need helping making my grid take up the whole screen.
Im currently trying to build a calculator app, and the grid stays small and centered.
I want it to fill the whole screen and expand the buttons.
Is that possible?
Here is what it currently looks like...

Use android:layout_width="fill_parent"
layout_height="fill_parent"
In the grid layout declaration in xml layout file
Sent from my GT-S5302 using Tapatalk 2

sak-venom1997 said:
Use android:layout_width="fill_parent"
layout_height="fill_parent"
In the grid layout declaration in xml layout file
Sent from my GT-S5302 using Tapatalk 2
Click to expand...
Click to collapse
When I do that the whole grid just moves to the top left. The buttons dont expand

sasha101 said:
When I do that the whole grid just moves to the top left. The buttons dont expand
Click to expand...
Click to collapse
For this I would not use a grid view but LinearLayouts and the android:layout_gravity attribute or a RelativeLayout.
That way you do not need the GridView.

I was just answering the questions but ya I wouldn't prefer grid layout for this Relative Layout will make it a lot easier
Sent from my GT-S5302 using Tapatalk 2

Related

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.

Big image on homescreen

Hi!
I am trying to make my first custom homescreen and ran into some difficulties:
I would like to have a big image on my screen, working as 2 shortcuts:
I would like that if i click the left part of the image one app is launched, but when i click the right part another app is launched.
But the image should be displayed without a gap. I thought that Desktop Visualizer could do the job, but there is allways a gap.
Is there an a app, which allows me to do so???
(I use Launcher Pro and set the rows & colums to 5, because that way there is more space But this shouldnt matter... )
Greetz
Korbi
korbi said:
Hi!
I am trying to make my first custom homescreen and ran into some difficulties:
I would like to have a big image on my screen, working as 2 shortcuts:
I would like that if i click the left part of the image one app is launched, but when i click the right part another app is launched.
But the image should be displayed without a gap. I thought that Desktop Visualizer could do the job, but there is allways a gap.
Is there an a app, which allows me to do so???
(I use Launcher Pro and set the rows & colums to 5, because that way there is more space But this shouldnt matter... )
Greetz
Korbi
Click to expand...
Click to collapse
Add the "big icon" using DV - Don't assign any app to it, leave it blank.
Add a transparent icon using DV - Assign the first app.
Add another transparent icon using DV - Assign the second app.
.. Yeah. Then use LauncherPro to resize the blank shortcuts to fit the big icon nicely.
Thanks for the tip, it might come in handy.
zHk3R said:
Add the "big icon" using DV - Don't assign any app to it, leave it blank.
Add a transparent icon using DV - Assign the first app.
Add another transparent icon using DV - Assign the second app.
.. Yeah. Then use LauncherPro to resize the blank shortcuts to fit the big icon nicely.
Click to expand...
Click to collapse
Thanks for the answer! But I cant figure out how to do this:
I can add the big image. And I also added to transparent images with DV. But I cant move the transparent images over the big image. This doesnt seem to be possible?!???
Cheers
Korbi

[NSFW TEXT] Will someone please make this wallpaper for my evo

the first screen is the wallpaper i currently have and I would like to make it a little different. I would like the text from the first pic and the background of the second pic (without the letters or the line at the bottom. I need to have the text all on one line and right below the status bar. also, I use launcher pro so i want the text to stay on the main screen and also change it if the comma is not needed or is out of place
I would really appreciate it
Thanks
You can't do this yourself? Basic PS skills!
Anyone helped ya out yet?
Sent from my iPhone with the bigger Gee Bees.
You could download the wallpaper to your phone, select it as a wallpaper in the Gallery app, and crop it as you see fit.
???
Profit.
Maybe these will work for you. One is 12pt font and the other is 10pt.
mattinky11 said:
Maybe these will work for you. One is 12pt font and the other is 10pt.
Click to expand...
Click to collapse
thats awesome and i really appreciate it. I'll tweak it a little when I get home. I can only see the bottom of the text below the status bar. Or can you tell me how to move the text down a little while keeping the background correct. I was thinking of just adding a little space above the text so when i set it as wallpaper it should line up correctly
nice wallpaper
Too funny...
Bored at work so I moved it down a little. Like that wallpaper...
Perfect
Sent from this thing called a "smartphone"
Much funnier with the comma.

Desktop Visualizer help

I'm using this app which rocks!!! I want to start customizing it even more but run into two issues:
1 - anyone know what the default icon size is? 12x12? 24x24? Etc?
2 - how do you get around the widget gap? I have two icons side by side and they are not flush.
Thanks!!!
Sent from my A500 using Tapatalk
1. Don't know the size for icons, but the area is 126x97, with 1 pixels between boxes.
2. Can't get around the space lengthways because it's designed for square icons.
Use one of the launcher programs that allows you to change # of rows/columns to make them square.
Look in the home screen posting thread, someone made all different sized icons for DV that have no spacing. They are all different sizes, 2x1, 2x2, and 3x3

Widgets and Orientations

Is there any way to have Widgets be a different size in a horizontal layout than when i rotate, the same widget change sizes in a landscape layout? I use Widgets HD and while I love the way it looks in landscape, when I rotate it becomes a big stretched mess of fugly. Maybe even have a whole different layout for the two different orientations???
Sent from my Nexus 7 using xda app-developers app

Categories

Resources