本文整理了Java中android.view.View.getMeasuredState()
方法的一些代码示例,展示了View.getMeasuredState()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。View.getMeasuredState()
方法的具体详情如下:
包路径:android.view.View
类名称:View
方法名:getMeasuredState
暂无
代码示例来源:origin: square/assertj-android
@TargetApi(HONEYCOMB)
public S hasMeasuredState(int state) {
isNotNull();
int actualState = actual.getMeasuredState();
assertThat(actualState) //
.overridingErrorMessage("Expected measured state <%s> but was <%s>", state, actualState) //
.isEqualTo(state);
return myself;
}
代码示例来源:origin: tyzlmjj/PagerBottomTabStrip
childState = childState | child.getMeasuredState();
代码示例来源:origin: stackoverflow.com
int childState = 0;
for (int i = 0; i < count; i++) {
final View child = getChildAt(i);
if (child.getVisibility() != GONE) {
measureTheChild(child);
childState = combineMeasuredStates(childState, child.getMeasuredState());
}
}
代码示例来源:origin: kingargyle/adt-leanback-support
public static int getMeasuredState(View view) {
return view.getMeasuredState();
}
代码示例来源:origin: com.squareup.assertj/assertj-android
@TargetApi(HONEYCOMB)
public S hasMeasuredState(int state) {
isNotNull();
int actualState = actual.getMeasuredState();
assertThat(actualState) //
.overridingErrorMessage("Expected measured state <%s> but was <%s>", state, actualState) //
.isEqualTo(state);
return myself;
}
代码示例来源:origin: kareluo/Imaging
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int count = getChildCount();
int maxHeight = 0;
int maxWidth = 0;
int childState = 0;
for (int i = 0; i < count; i++) {
final View child = getChildAt(i);
if (child.getVisibility() != GONE) {
child.measure(widthMeasureSpec, heightMeasureSpec);
maxWidth = Math.round(Math.max(maxWidth, child.getMeasuredWidth() * child.getScaleX()));
maxHeight = Math.round(Math.max(maxHeight, child.getMeasuredHeight() * child.getScaleY()));
childState = combineMeasuredStates(childState, child.getMeasuredState());
}
}
maxHeight = Math.max(maxHeight, getSuggestedMinimumHeight());
maxWidth = Math.max(maxWidth, getSuggestedMinimumWidth());
setMeasuredDimension(resolveSizeAndState(maxWidth, widthMeasureSpec, childState),
resolveSizeAndState(maxHeight, heightMeasureSpec, childState << MEASURED_HEIGHT_STATE_SHIFT));
}
代码示例来源:origin: qiubiteme/android_api_demos
childState = combineMeasuredStates(childState, child.getMeasuredState());
代码示例来源:origin: MoMoWait/LeanbackLauncher
this.mMeasuredWidth = Math.max(this.mMeasuredWidth, mainView.getMeasuredWidth());
mainHeight += mainView.getMeasuredHeight();
state = View.combineMeasuredStates(state, mainView.getMeasuredState());
infoHeight += infoView.getMeasuredHeight();
state = View.combineMeasuredStates(state, infoView.getMeasuredState());
measureChild(extraView, cardWidthMeasureSpec, unspecifiedSpec);
extraHeight += extraView.getMeasuredHeight();
state = View.combineMeasuredStates(state, extraView.getMeasuredState());
代码示例来源:origin: MiEcosystem/mijiaSDK
childHeight = child.getMeasuredHeight();
if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.ICE_CREAM_SANDWICH)
childState = child.getMeasuredState();
mRecycledViews.add(child);
代码示例来源:origin: PierfrancescoSoffritti/sliding-drawer
childState = combineMeasuredStates(childState, child.getMeasuredState());
代码示例来源:origin: li2/learning-android-open-source
childState = combineMeasuredStates(childState, child.getMeasuredState());
代码示例来源:origin: anzaizai/EasySwipeMenuLayout
maxHeight = Math.max(maxHeight,
child.getMeasuredHeight() + lp.topMargin + lp.bottomMargin);
childState = combineMeasuredStates(childState, child.getMeasuredState());
if (measureMatchParentChildren) {
if (lp.width == LayoutParams.MATCH_PARENT ||
代码示例来源:origin: Meituan-Dianping/Shield
childState = combineMeasuredStates(childState, subView.getMeasuredState());
setMeasuredDimension(resolveSizeAndState(maxWidth, widthMeasureSpec, childState),
resolveSizeAndState(maxHeight, heightMeasureSpec,
maxHeight = Math.max(maxHeight,
subView.getMeasuredHeight() + topMargin + bottomMargin);
childState = combineMeasuredStates(childState, subView.getMeasuredState());
if (measureMatchParentChildren) {
isMatchParent = lp.width == ViewGroup.LayoutParams.MATCH_PARENT ||
代码示例来源:origin: xiangzhihong/gpuImage
childState = combineMeasuredStates( childState, child.getMeasuredState() );
代码示例来源:origin: Dsiner/SlideLayout
childState = combineMeasuredStates(childState, child.getMeasuredState());
代码示例来源:origin: LuckyJayce/HVScrollView
childState = combineMeasuredStates(childState, child.getMeasuredState());
代码示例来源:origin: h6ah4i/android-materialshadowninepatch
child.getMeasuredHeight() + lp.topMargin + lp.bottomMargin);
childState |= child.getMeasuredState();
代码示例来源:origin: canceel/flexboxlayout
+ lp.bottomMargin, childHeight);
child.measure(childWidthMeasureSpec, childHeightMeasureSpec);
childState = combineMeasuredStates(childState, child.getMeasuredState());
largestWidthInColumn = Math.max(largestWidthInColumn,
child.getMeasuredWidth() + lp.leftMargin + lp.rightMargin);
代码示例来源:origin: mkulesh/microMathematics
childState = childState | child.getMeasuredState();
代码示例来源:origin: saki4510t/libcommon
child.getMeasuredHeight() + lp.topMargin + lp.bottomMargin);
childState = combineMeasuredStates(childState, child.getMeasuredState());
内容来源于网络,如有侵权,请联系作者删除!