本文整理了Java中android.widget.HorizontalScrollView.onLayout()
方法的一些代码示例,展示了HorizontalScrollView.onLayout()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HorizontalScrollView.onLayout()
方法的具体详情如下:
包路径:android.widget.HorizontalScrollView
类名称:HorizontalScrollView
方法名:onLayout
暂无
代码示例来源:origin: ogaclejapan/SmartTabLayout
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
super.onLayout(changed, l, t, r, b);
// Ensure first scroll
if (changed && viewPager != null) {
scrollToTab(viewPager.getCurrentItem(), 0);
}
}
代码示例来源:origin: andstatus/andstatus
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
super.onLayout(changed, l, t, r, b);
// Snap to closes column after first layout.
// This is needed so correct column is scrolled to after a rotation.
if (!mHasLaidOut && mSavedState != null) {
mCurrentColumn = mSavedState.currentColumn;
scrollToColumn(mCurrentColumn, false);
mSavedState = null;
}
mHasLaidOut = true;
}
代码示例来源:origin: yhaolpz/SlideAdapter
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
super.onLayout(changed, l, t, r, b);
scrollTo(mLeftMenuWidth, 0);
}
代码示例来源:origin: 80945540/FreeBook
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
super.onLayout(changed, l, t, r, b);
// Ensure first scroll
if (changed && viewPager != null) {
scrollToTab(viewPager.getCurrentItem(), 0);
}
}
代码示例来源:origin: 80945540/LCRapidDevelop
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
super.onLayout(changed, l, t, r, b);
// Ensure first scroll
if (changed && viewPager != null) {
scrollToTab(viewPager.getCurrentItem(), 0);
}
}
代码示例来源:origin: Leaking/WeGit
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
super.onLayout(changed, l, t, r, b);
//RTL works fine like this
View child = mChildFrame.getChildAt(mActive);
if (child != null)
smoothScrollTo(child.getLeft(), 0);
}
代码示例来源:origin: mingjunli/GithubApp
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
super.onLayout(changed, l, t, r, b);
//RTL works fine like this
View child = mChildFrame.getChildAt(mActive);
if (child != null)
smoothScrollTo(child.getLeft(), 0);
}
代码示例来源:origin: JackWHLiu/jackknife
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
super.onLayout(changed, l, t, r, b);
if (changed) {
scrollTo(mMenuWidth, 0);
}
}
代码示例来源:origin: Catrobat/Paintroid
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
super.onLayout(changed, l, t, r, b);
prepare();
}
代码示例来源:origin: henrichg/PhoneProfilesPlus
protected void onLayout(boolean changed, int l, int t, int r, int b) {
super.onLayout(changed, l, t, r, b);
this.fullScroll(FOCUS_RIGHT);
}
}
代码示例来源:origin: Wilm0r/giggity
@Override
public void onLayout(boolean changed, int left, int top, int right, int bottom) {
// Workaround: We're disabling scrollTo() here because super.onLayout() will call it with
// what it believes to be our current coordinates, which are correct on x but not y axis.
boolean icb = isCallingBack;
isCallingBack = true;
super.onLayout(changed, left, top, right, bottom);
isCallingBack = icb;
if (initialX > 0 || initialY > 0) {
Log.d("NestedScroller", "initial: " + initialX + "," + initialY);
scrollTo(initialX, initialY);
initialX = initialY = 0;
}
}
代码示例来源:origin: woxblom/DragListView
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
super.onLayout(changed, l, t, r, b);
// Snap to closes column after first layout.
// This is needed so correct column is scrolled to after a rotation.
if (!mHasLaidOut && mSavedState != null) {
mCurrentColumn = mSavedState.currentColumn;
mSavedState = null;
post(new Runnable() {
@Override
public void run() {
scrollToColumn(mCurrentColumn, false);
}
});
}
mHasLaidOut = true;
}
代码示例来源:origin: fengmaolian/AnalyzeRecyclerViewWithBGARefreshLayout
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
super.onLayout(changed, l, t, r, b);
Log.i("TAG", "6");
if(changed){
this.scrollTo(0,0);
//获取水平滚动条可以滑动的范围,即右侧按钮的宽度
mScrollWidth = mTextView_Delete.getWidth();
Log.i("TAG" , "7");
}
}
@Override
代码示例来源:origin: smuyyh/SprintNBA
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
super.onLayout(changed, l, t, r, b);
if (unScrollPosition != -1) {
final View tabView = fixedIndicatorView.getChildAt(unScrollPosition);
if (tabView != null) {
final int scrollPos = tabView.getLeft() - (getMeasuredWidth() - tabView.getMeasuredWidth()) / 2;
if (scrollPos >= 0) {
smoothScrollTo(scrollPos, 0);
unScrollPosition = -1;
}
}
}
}
代码示例来源:origin: moz1q1/WalleLibrary
scrollToChild(mCurrentPosition, 0);
updateSelection(mCurrentPosition);
super.onLayout(changed, l, t, r, b);
代码示例来源:origin: BiglySoftware/BiglyBT-Android
invalidate();
super.onLayout(changed, l, t, r, b);
内容来源于网络,如有侵权,请联系作者删除!