Almost as soon as I got this figured out, I found an example by Romain Guy: http://code.google.com/p/miffed/source/browse/GUI/src/uk/ac/ic/doc/gea05/miffed/wigets/GridLayout.java
Fortunately what I did was pretty similar. -k_day On Dec 22, 12:55 pm, k_day <[email protected]> wrote: > Could someone please walk me through writing a custom Layout to give > me my grid of imageViews, or point me to a good example? In > particular, I can't find many resources on how I should overwrite > onLayout. Thank you. > > -k_day > > On Dec 22, 10:42 am, Greg Donald <[email protected]> wrote: > > > On Mon, Dec 21, 2009 at 8:27 PM, k_day <[email protected]> wrote: > > > Yeah, I would like to do that. What sort of View would I parent off > > > of though? AbsoluteLayout is the only type of layout that I can find > > > that will allow me to assign coordinates to. > > > Margins on children of a RelativeLayout behave very much like coordinates. > > > RelativeLayout layout = new RelativeLayout(); > > ImageView iv = new ImageView( getBaseContext() ); > > > [...] > > > MarginLayoutParams mlp = new MarginLayoutParams( width, height ); > > mlp.setMargins( left, 0, 0, 0 ); > > LayoutParams lp = new LayoutParams( mlp ); > > layout.addView( iv, lp ); > > > -- > > Greg Donaldhttp://destiney.com/ > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

