简体   繁体   中英

Android App Widget advanced(?) layout

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.

http://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.

How is this done

You would have to ask the authors of that app to determine how they did it.

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?

That could most easily be accomplished with a GridLayout I think, but that is only available on API Level 16+ for app widgets.

Beyond that, use nested LinearLayouts . For example, a horizontal LinearLayout holding onto three vertical LinearLayouts would provide the basic skeleton. Each of those three vertical LinearLayouts would hold a subset of your imagery. For example, the middle LinearLayout would 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM