¡@

Home 

2014/10/16 ¤W¤È 08:18:59

android Programming Glossary: mchildaspectratio

How to layout a 'grid' of images in the center of the screen

http://stackoverflow.com/questions/4592065/how-to-layout-a-grid-of-images-in-the-center-of-the-screen

0 private int mVerticalSpacing 0 private float mChildAspectRatio 1.0f public AspectGrid Context context super context public.. a.getFloat R.styleable.AspectGrid_childAspectRatio mChildAspectRatio a.recycle catch RuntimeException ex throw ex public int getNumColumns.. verticalSpacing public float getChildAspectRatio return mChildAspectRatio public void setChildAspectRatio float childAspectRatio if childAspectRatio..

How to layout a 'grid' of images in the center of the screen

http://stackoverflow.com/questions/4592065/how-to-layout-a-grid-of-images-in-the-center-of-the-screen

ViewGroup private int mNumColumns 1 private int mHorizontalSpacing 0 private int mVerticalSpacing 0 private float mChildAspectRatio 1.0f public AspectGrid Context context super context public AspectGrid Context context AttributeSet attrs this context attrs.. mVerticalSpacing setChildAspectRatio a.getFloat R.styleable.AspectGrid_childAspectRatio mChildAspectRatio a.recycle catch RuntimeException ex throw ex public int getNumColumns return mNumColumns public void setNumColumns int.. void setVerticalSpacing int verticalSpacing mVerticalSpacing verticalSpacing public float getChildAspectRatio return mChildAspectRatio public void setChildAspectRatio float childAspectRatio if childAspectRatio 0 throw new IllegalArgumentException childAspectRatio..