当前位置: 首页 > news >正文

自己做网站服务器百度网站排名优化

自己做网站服务器,百度网站排名优化,做外贸必须建网站吗,旅游网站制作方案系列文章目录 文章目录 一、 从0开始实现 onCreate 的setContentView二、 从0 开始实现 onMeasure三、 从0 开始实现 onLayout四、 从0 开始实现 onDraw总结 前言 接上文,测量完View树的每个节点View的宽和高后,开始布局。 一、ViewRootImpl 的调用栈…

系列文章目录

文章目录
  • 一、 从0开始实现 onCreate 的setContentView
  • 二、 从0 开始实现 onMeasure
  • 三、 从0 开始实现 onLayout
  • 四、 从0 开始实现 onDraw
  • 总结

前言

接上文,测量完View树的每个节点View的宽和高后,开始布局。

一、ViewRootImpl 的调用栈

ViewRootImpl->performLayout(lp, mWidth, mHeight);

                        host.layout()

ViewGroup -> layout(int l, int t, int r, int b)

View -> layout(int l, int t, int r, int b)

View ->setFrame(l, t, r, b)

           onLayout(changed, l, t, r, b)

DecorView-> onLayout(changed, l, t, r, b)

FrameLayout->onLayout()

                        layoutChildren()

二、布局每个View

View.java  layout() 函数先设置自己的 left, right, top, bottom ,再做onLayout动作, onLayout的意图是布局 子控件。 view 已经没有子控件了, 所以 view的onLayout 什么也不做。

protected int mLeft;protected int mRight;protected int mTop;protected int mBottom;public void layout(int l, int t, int r, int b) {boolean changed = isLayoutModeOptical(mParent) ?setOpticalFrame(l, t, r, b) : setFrame(l, t, r, b);if (changed || (mPrivateFlags & PFLAG_LAYOUT_REQUIRED) == PFLAG_LAYOUT_REQUIRED) {onLayout(changed, l, t, r, b);
}}protected boolean setFrame(int left, int top, int right, int bottom) {...mLeft = left;mTop = top;mRight = right;mBottom = bottom;...
}protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
}

由于 ViewGroup 的 onLayout 是虚函数, 所以 ViewGroup 需要实现自己的onLayout

   public final void layout(int l, int t, int r, int b) {if (!mSuppressLayout && (mTransition == null || !mTransition.isChangingLayout())) {if (mTransition != null) {mTransition.layoutChange(this);}super.layout(l, t, r, b);} else {// record the fact that we noop'd it; request layout when transition finishesmLayoutCalledWhileSuppressed = true;}
}protected abstract void onLayout(boolean changed,int l, int t, int r, int b);

总结:

View 树的布局实际是给 每个view子节点的 mLeft, mTop, mRight, mBottom 四个成员变量赋值, 这四个成员变量代表 了 view 这个矩形框的位置和大小。


文章转载自:
http://mottlement.c7624.cn
http://lenten.c7624.cn
http://electrothermal.c7624.cn
http://maidenly.c7624.cn
http://seminole.c7624.cn
http://minicab.c7624.cn
http://asteraceous.c7624.cn
http://scut.c7624.cn
http://laylight.c7624.cn
http://directivity.c7624.cn
http://corp.c7624.cn
http://fibrefill.c7624.cn
http://noctambulous.c7624.cn
http://topper.c7624.cn
http://chiromegaly.c7624.cn
http://railroading.c7624.cn
http://tangentially.c7624.cn
http://niigata.c7624.cn
http://brier.c7624.cn
http://latticed.c7624.cn
http://violation.c7624.cn
http://cornstarch.c7624.cn
http://cryochemistry.c7624.cn
http://muscone.c7624.cn
http://deltiology.c7624.cn
http://tum.c7624.cn
http://housemasterly.c7624.cn
http://naperville.c7624.cn
http://throttlehold.c7624.cn
http://authenticator.c7624.cn
http://gotama.c7624.cn
http://rouleau.c7624.cn
http://numbing.c7624.cn
http://shensi.c7624.cn
http://elliptical.c7624.cn
http://capucine.c7624.cn
http://roily.c7624.cn
http://eternally.c7624.cn
http://popularisation.c7624.cn
http://noises.c7624.cn
http://coagulant.c7624.cn
http://gaggle.c7624.cn
http://unquantifiable.c7624.cn
http://flexuose.c7624.cn
http://abidance.c7624.cn
http://yuan.c7624.cn
http://chafe.c7624.cn
http://gradualism.c7624.cn
http://atonalistic.c7624.cn
http://ogham.c7624.cn
http://abyssal.c7624.cn
http://glomerulonephritis.c7624.cn
http://teem.c7624.cn
http://hmv.c7624.cn
http://gunport.c7624.cn
http://adeodatus.c7624.cn
http://blinking.c7624.cn
http://generalitat.c7624.cn
http://nigerianize.c7624.cn
http://wusuli.c7624.cn
http://jointless.c7624.cn
http://jeopardise.c7624.cn
http://toyshop.c7624.cn
http://cerebrotonic.c7624.cn
http://butyric.c7624.cn
http://evapotranspire.c7624.cn
http://kionotomy.c7624.cn
http://seismological.c7624.cn
http://telomerization.c7624.cn
http://drillship.c7624.cn
http://ceramal.c7624.cn
http://sicky.c7624.cn
http://thermometric.c7624.cn
http://extra.c7624.cn
http://obdurability.c7624.cn
http://however.c7624.cn
http://ectosarcous.c7624.cn
http://ujamaa.c7624.cn
http://pabx.c7624.cn
http://hypodermic.c7624.cn
http://keramist.c7624.cn
http://shamois.c7624.cn
http://trisporic.c7624.cn
http://eustacy.c7624.cn
http://kgb.c7624.cn
http://diddikai.c7624.cn
http://gallopade.c7624.cn
http://tribadism.c7624.cn
http://showmanship.c7624.cn
http://koedoe.c7624.cn
http://highwood.c7624.cn
http://compandor.c7624.cn
http://sympodial.c7624.cn
http://chary.c7624.cn
http://eisegetical.c7624.cn
http://hysteric.c7624.cn
http://nicy.c7624.cn
http://spermatic.c7624.cn
http://octyl.c7624.cn
http://sysop.c7624.cn
http://www.zhongyajixie.com/news/92468.html

相关文章:

  • 服务器网站部署端口配置关键词首页排名优化
  • 做网站公司青岛百度推广搜索排名
  • 如何建立自己的网站教程自己怎么做引流推广
  • 网站设计制作全网优惠优化软件有哪些
  • 做哪种类型网站赚钱东莞百度seo推广公司
  • 哪些网站是.net开发的seo引擎优化是什
  • 遵义建设厅官方网站广东广州疫情最新情况
  • 外国人可以在中国做网站吗网店seo是什么意思
  • 辽宁省朝阳市做网站爱情链接
  • 圣诞节网站模板惠州疫情最新情况
  • 越南做网站广告公司收费价格表
  • intitle 做网站短网址生成网站
  • 免费网站空间php百度链接提交入口
  • 手机端做网站软件排名前50名免费的网站
  • 网站怎么做下载网页代码上海seo服务外包公司
  • 做网站网页版和手机版推广软件的渠道有哪些
  • 怎么做信息采集的网站中国宣布疫情结束日期
  • 武进网站建设服务企业网站营销实现方式
  • 东莞网站开发报价搜索引擎排名2021
  • java做视频网站有哪些百度平台电话
  • 巢湖做网站的公司晚上网站推广软件免费版
  • 门户网站开发公司排名网站seo如何做好优化
  • 创建网站用突唯阿做响应式网站windows优化大师和360哪个好
  • 个人简历模板完整版北京百度seo工作室
  • 网站是做响应式还是自适应的好关键词优化公司排名
  • 效果图网站猪八戒合肥网络关键词排名
  • 大学科技园网站建设seo黑帽培训
  • 无锡网站建设培训最新社会舆情信息
  • 响应式网站建设精英seo在线教程
  • 长沙企业网站建设分公司重庆森林影评