I’m new to android programming. I would like to make an app widget that will display a set of contact images and allow me to call or send a text message of the person whose picture I press.
If you notice the bottom widget in the image, there are two oversized pictures (top left and bottom right) that seem as if they could not fit into a linearlayout.
https://i.stack.imgur.com/H13i7.jpg
How is this done, what I’m asking is which app widget layout would I use to align images as they are in the bottom widget on this screen?
Edit: I’m new, but I have plenty of time to learn this, so I figure I’ll press forward. I get the feeling I would be able to take images and combine them into a single master image with a whole lot of flexibility.
http://androidattop.blogspot.com/2012/06/merge-multiple-images-into-one-image-in.html
Then I’d just have to figure out where on the image a user clicked. Or I could split only big images and use nested linearlayouts, which would save the custom click listener which looks like its more likely the way to go, but I worry about gaps in the larger images.
All advice/help is appreciated.
You would have to ask the authors of that app to determine how they did it.
That could most easily be accomplished with a
GridLayoutI think, but that is only available on API Level 16+ for app widgets.Beyond that, use nested
LinearLayouts. For example, a horizontalLinearLayoutholding onto three verticalLinearLayoutswould provide the basic skeleton. Each of those three verticalLinearLayoutswould hold a subset of your imagery. For example, the middleLinearLayoutwould be a column of the three images.That being said, if you are “new to android programming”, I would recommend starting with a simpler project.