I am starting a new application and I am willing to use the Dashboard pattern.
For example: The Google IO app uses it:
My issue is that the amount of buttons will be more than six.
I'm not sure if I should use vertical or horizontal scrolling.
Vertical scrolling could be done with a ScrollView or a GridView but I am not sure which would be the easier way to implement the horizontal version.
I was thinking of using an HorizontalScrollView but it doesn't have pagination. It should feel similar to the tweetdeck app.
How would you implement it?
My issue is that the amount of buttons will be more than six. I'm not sure if I should use vertical or horizontal scrolling.
IMHO, do neither. Reduce the number of buttons. Watch the 2010 Google I|O presentation on this design pattern -- the point behind the dashboard is to only surface a few items.
I would go with a vertical scroll. It is way more natural to scroll down to view more content of the same view.
A horizontal scroll kind of feels like you switch to another part of the application.
I have an app that uses a gridview with vertical scrolling but I dynamically adjust the number of rows in the gridview based on the width of the actual screen so that it in landscape or in a bigger display it uses more columns and avoid scrolling alltogether in most cases.
However in my case it is more of a search results display of categories and not a dashboard. I believe the whole point of a dashboard is to have only a small number of button (e.g. max six or so).
What you could do is dynamically interrogate the screen real estate and if there is not enough room just show e.g. 6 buttons of which one is a more/utils or whatever button. Sort of like the options menu does it.. but on a bigger screen display them all.
It would be interesting to scroll based on the orientation of the device, so you would scroll horizontally or vertically if the device is oriented that way. This would let you maximize the screen real estate.
Related
If I want a bunch of objects that appear let's say middle, middle right and occupy have the ability to occupy any part of the screen, would I use gridlayout or relative layout and dp to customize the location?
I think I explained it badly. If I used an analogy, it would be like whack a mole with the hole screen. I was thinking of making a large amount of rows and columns in gridlayout or just using dp. Any insight or suggestions?
The thing about gridview is that its entire purpose is scrolling. If you have lots of data and want to scroll through it in a grid, that's the right answer. If you have a fixed amount of data you want to display in a grid, you want something else- a TableLayout likely.
I'm looking for a way to display views (like buttons, checkboxes, images etc) in a container, which might be bigger than the actual screen size.
A ScrollView within a HorizontalScrollView is no option, since you're only able to scroll one direction at once, not diagonal.
I have yet to find a simple solution to this problem. A zoom function would be nice to have, but that's not as important as the ability to scroll diagonal.
Are there any components out there able to do things like these? Doesn't even have to be for free.
I am trying to build a row of images. I want the number of images to increase based on screen width. For example, in portrait mode there may be 3 images present, but in landscape there would be five.
I have tried using a GridView, but I am having trouble stopping it from being populated after the first row has been filled (it goes to the next row). Is there an alternative view I should be using or is a GridView the right approach?
If you only want 1 row, then use a LinearLayout. If it needs to scroll, embed it in a HorizontalScrollView.
If you aren't scrolling you can then inflate and add each image, depending on available space.
You could make it more complex by creating custom classes, etc.
You can also try the Two-Way GridView (I've used it - it works great)
How to make grid-view horizontally scrollable in android
I have found a suggestion based off of this. Once a max width has been exceeded on the LinearLayout, simply stop adding to it!
working on an app and The way I want to set it up is different than what I have ever done before. I want the main activity when launched into the app to exceed past the boundaries of the physical phone screen, and for the user to be able to swipe out to parts of the app that they can't originally see.
I am not sure what the terminology is or what methods or classes etc to use. Any info that could point me in the right direction would be great! Thanks!
Just some clarification:
I think what I'm trying to say is the second thing you talked about. Imagine if you place a iPhone for example in the middle of a piece of computer paper. What I want to achieve is to have the whole view the size of the paper, but only be able to see the size of the iPhone's screen at a time. So you can go up a little bit and see what was above the screen, or left or right
If you want more screens and be able to switch between them, use ViewPager.
If you want one large view bigger than screen, you can either combine ScrollView for vertical scrolling and HorizontalScrollView for horizontal scrolling, or make some custom View, which will be able to scroll (you have to implement it on your own) in both direction.
If you want to have just some views outside of the screen and bring them to visible area on some event, you can use RelativeLayout and set to its views proper margin.
If you want something else, add more information, how it should look and act like.
I made a UI with many UI elements such as button and it takes a lot of space vertically.
The UI fits on my phone (it's 16:9 like many), but on phones with a different screen ratio, the buttons on the bottom are cut off of the screen.
I'm using a linear layout. How do I fix this?
Instead of trying to create a UI that is like an image and displays at a fixed aspect ratio, start thinking about designing for resizing. To accomplish this, you need to make decisions about what in your layout must be fixed in size, and what can acceptably resize or scroll.
Importantly (and this is my own stylistic opinion), you should avoid layouts that clutter the screen or fill it with detail. Your layout sounds like an input form of some sort; one solution in your case might be to let the controls in the upper part of the menu scroll, while anchoring the buttons at the bottom of the screen, or to just place the whole layout in a scrolling view. But ask yourself: will this be user friendly? I suspect this solution will look dense and (on really small, resistive displays like that of the LG Vortex) become hard to interact with.
Try to separate your UI into easy to comprehend little "nuggets", omit unnecessary information, and if you must, split the UI into different activities or fragments.