Page 1200 - 3-3
P. 1200
public ScalableLayout(Context pContext, AttributeSet pAttrs) {
this(pContext, pAttrs,
p C o n t e x t . o b t a i n S t y l e d A t t r i b u t e s ( p A t t r s ,
mdp3.a10_12_test.R.styleable.ScalableLayout).getFloat(mdp3.a10_12_test.R.styleable.ScalableLayout_s
cale_base_width, Default_Scale_Base_Width),
p C o n t e x t . o b t a i n S t y l e d A t t r i b u t e s ( p A t t r s ,
mdp3.a10_12_test.R.styleable.ScalableLayout).getFloat(mdp3.a10_12_test.R.styleable.ScalableLayout_s
cale_base_height, Default_Scale_Base_Height)
);
}
/**
* Simple constructor to use when creating a view from code.
* <p>
* code 에서 ScalableLayout 을 생성할 때 사용하는 constructor.
*
* @param pContext
* @param pScale_Width Scale width of ScalableLayout.
* @param pScale_Height Scale height of ScalableLayout.
*/
public ScalableLayout(Context pContext, float pScale_Width, float pScale_Height) {
this(pContext, null, pScale_Width, pScale_Height);
}
// public ScalableLayout(Context pContext, float pScale_Width, float pScale_Height, int
pScale_BasePosition) {
// this(pContext, null, pScale_Width, pScale_Height, pScale_BasePosition);
// }
private ScalableLayout(Context pContext, AttributeSet pAttrs, float pScale_Width, float
pScale_Height) {
super(pContext, pAttrs);
setScaleSize(pScale_Width, pScale_Height, true);
// mScale_Root_BasePosition = pScale_BasePosition;
// mTV_Log = new TextView(getContext());
// mTV_Log.setBackgroundColor(0xFF333300);
// addView(mTV_Log, new ScalableLayout.LayoutParams(0, 0, pScale_Width,
pScale_Height));
}
/**
* @param pChild
* @return Scalable.LayoutParams of pChild
*/
public ScalableLayout.LayoutParams getChildLayoutParams(View pChild) {
- 1200 -