Created
June 28, 2013 02:20
-
-
Save extralam/5881992 to your computer and use it in GitHub Desktop.
SquareView - create View Container with square Size
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.kirin.ui; | |
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.view.View; | |
import android.view.ViewGroup; | |
/** | |
* SquareView - create View Container with square Size | |
* @author 阿目 | |
* ViewGroup can be Relativelayout,Linearlayout as you like | |
*/ | |
public class SquareView extends ViewGroup { | |
public SquareView(Context context, AttributeSet attrs) { | |
super(context, attrs); | |
} | |
@Override | |
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { | |
super.onMeasure(widthMeasureSpec, widthMeasureSpec); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment