Page 1199 - 3-3
P. 1199
postDelayedRequestLayout();
}
}
private Runnable mRunnable = new Runnable() {
@Override
public void run() {
requestLayout();
forceLayout();
}
};
private long mLastRequestPostTime = 0;
private void postDelayedRequestLayout() {
if(isInEditMode()) {
return;
}
long now = System.currentTimeMillis();
if(mLastRequestPostTime < now - 50 || now < mLastRequestPostTime) {
mLastRequestPostTime = now;
postDelayed(mRunnable, 10);
}
}
/**
* Simple constructor to use when creating a view from code.
* Scale_Width, Scale_Height uses a default value of 100.
* <p>
* code 에서 ScalableLayout 을 생성할 때 사용하는 constructor.
* Scale_Width, Scale_Height 를 기본값인 100 으로 세팅함.
*
* @param pContext
*/
public ScalableLayout(Context pContext) {
this(pContext, Default_Scale_Base_Width, Default_Scale_Base_Height);
}
/**
* Constructor that is called when inflating a view from XML.
* <p>
* XML 에서 ScalableLayout 을 생성할 때 사용하는 constructor.
*
* @param pContext
* @param pAttrs
*/
- 1199 -