Slide 19
Slide 19 text
ͦͷᶄ merge λάɿJava ଆαϯϓϧίʔυ
ViewGroup ݮํ๏
19
package jp.co.sample.package;
import android.content.Context;
import android.support.percent.PercentRelativeLayout;
import android.util.AttributeSet;
import android.view.View;
/**
* merge λάΛ༻ͨ͠ΧελϜϏϡʔ
*/
public class SampleCustomView extends PercentRelativeLayout {
public SampleCustomView(Context context) {
this(context, null);
}
public SampleCustomView(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public SampleCustomView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
View.inflate(context, R.layout.custom_view, this);
}
}
SampleCustamView.java