Android
0
Вклад в тег
<GridView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/gridView"
android:numColumns="3"
android:verticalSpacing="2dp"
android:horizontalSpacing="2dp"
android:stretchMode="columnWidth" />
<GridViewItem
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/imageView"
android:scaleType="centerCrop"/>
public class GridViewItem extends ImageView{
public GridViewItem(Context context) {
super(context);
}
public GridViewItem(Context context, AttributeSet attrs) {
super(context, attrs);
}
public GridViewItem(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@Override
public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, widthMeasureSpec);
}
}