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

做网站用的编程语言做哪一类的网站可以短时间变现

做网站用的编程语言,做哪一类的网站可以短时间变现,表白制作图神器软件,中企动力全球邮箱1.前言 在10.0的系统rom定制化开发中#xff0c;在对于launcher3的一些开发定制中#xff0c;在对hotseat的一些开发中#xff0c;需要实现动态hotseat居中 的功能#xff0c;就是在拖拽图标进入和拖出hotseat#xff0c;都可以保持hotseat居中的功能#xff0c;接下来分…1.前言 在10.0的系统rom定制化开发中在对于launcher3的一些开发定制中在对hotseat的一些开发中需要实现动态hotseat居中 的功能就是在拖拽图标进入和拖出hotseat都可以保持hotseat居中的功能接下来分析下相关功能实现 具体如图: 2.Launcher3拖拽图标进入hotseat自适应布局功能实现一的核心类 packages\apps\Launcher3\src\com\android\launcher3\Hotseat.java 3.Launcher3拖拽图标进入hotseat自适应布局功能实现一的核心功能分析和实现 Launcher顾名思义,就是桌面的意思,也是android系统启动后第一个启动的应用程序, :Launcher3负责管理和展示用户手机桌面上的各个应用程序图标。它通过GridView或者LinearLayout等布局管理器将 图标进行排列,并支持滑动、放大缩小等手势操作 Hotseat也是属于在导航栏底部的BubbleTextView的布局只是不显示app图标 3.1 Hotseat.java相关添加背景功能分析 在实现Launcher3拖拽图标进入hotseat自适应布局功能实现一的核心功能中通过上述的分析得知 首选需要给Hotseat添加背景功能然后需要根据hotseat的数量多少来设置hotseat的宽度高度等 相关参数这样就实现了第一步的hotseat的居中显示功能 public class Hotseat extends CellLayout implements LogContainerProvider, Insettable, Transposable {ViewDebug.ExportedProperty(category launcher)public boolean mHasVerticalHotseat;private final HotseatController mController;public Hotseat(Context context) {this(context, null);}public Hotseat(Context context, AttributeSet attrs) {this(context, attrs, 0);}public Hotseat(Context context, AttributeSet attrs, int defStyle) {super(context, attrs, defStyle);mController LauncherAppMonitor.getInstance(context).getHotseatController();}public HotseatController getController() {return mController;}/* Get the orientation specific coordinates given an invariant order in the hotseat. */public int getCellXFromOrder(int rank) {return mHasVerticalHotseat ? 0 : rank;}public int getCellYFromOrder(int rank) {return mHasVerticalHotseat ? (getCountY() - (rank 1)) : 0;}public void resetLayout(boolean hasVerticalHotseat) {removeAllViewsInLayout();mHasVerticalHotseat hasVerticalHotseat;InvariantDeviceProfile idp mActivity.getDeviceProfile().inv;if (hasVerticalHotseat) {setGridSize(1, idp.numHotseatIcons);} else {setGridSize(idp.numHotseatIcons, 1);}//add core start// 添加背景if(idp.numHotseatIcons0){setBackgroundResource(R.drawable.shape_corner);}//add core end}Overridepublic void fillInLogContainerData(View v, ItemInfo info, Target target, Target targetParent) {target.gridX info.cellX;target.gridY info.cellY;targetParent.containerType LauncherLogProto.ContainerType.HOTSEAT;}Overridepublic void setInsets(Rect insets) {FrameLayout.LayoutParams lp (FrameLayout.LayoutParams) getLayoutParams();DeviceProfile grid mActivity.getWallpaperDeviceProfile();insets grid.getInsets();if (grid.isVerticalBarLayout()) {lp.height ViewGroup.LayoutParams.WRAP_CONTENT;if (grid.isSeascape()) {lp.gravity Gravity.LEFT;lp.width grid.hotseatBarSizePx insets.left;} else {lp.gravity Gravity.RIGHT;lp.width grid.hotseatBarSizePx insets.right;}} else {lp.gravity Gravity.BOTTOM;lp.width ViewGroup.LayoutParams.MATCH_PARENT;lp.height grid.hotseatBarSizePx insets.bottom;}Rect padding grid.getHotseatLayoutPadding();setPadding(padding.left, padding.top, padding.right, padding.bottom);setLayoutParams(lp);InsettableFrameLayout.dispatchInsets(this, insets);}Overridepublic boolean onTouchEvent(MotionEvent event) {// Dont let if follow through to workspacereturn true;}Overridepublic RotationMode getRotationMode() {return Launcher.getLauncher(getContext()).getRotationMode();} } 在实现Launcher3拖拽图标进入hotseat自适应布局功能实现一的核心功能中通过上述的分析得知 在Hotseat中相关源码分析可以发现由 resetLayout 就是负责布局的 当hotseat 增加减少时都会重新布局 所以在setBackgroundResource(R.drawable.shape_corner);添加背景就可以了 public void resetLayout(boolean hasVerticalHotseat) {removeAllViewsInLayout();mHasVerticalHotseat hasVerticalHotseat;InvariantDeviceProfile idp mActivity.getDeviceProfile().inv;if (hasVerticalHotseat) {setGridSize(1, idp.numHotseatIcons);} else {setGridSize(idp.numHotseatIcons, 1);}// 添加背景if(idp.numHotseatIcons0){setBackgroundResource(R.drawable.shape_corner);}}shape_corner.xml?xml version1.0 encodingutf-8? shape xmlns:androidhttp://schemas.android.com/apk/res/android!--背景颜色--solid android:color#FFFAFA /!--角的半径--corners android:radius10dp/!--边框颜色--stroke android:width1dp android:color#00000000 / /shapepublic void setInsets(Rect insets) {FrameLayout.LayoutParams lp (FrameLayout.LayoutParams) getLayoutParams();DeviceProfile grid mActivity.getWallpaperDeviceProfile();insets grid.getInsets();//竖屏布局if (grid.isVerticalBarLayout()) {lp.height ViewGroup.LayoutParams.WRAP_CONTENT;if (grid.isSeascape()) {lp.gravity Gravity.LEFT;lp.width grid.hotseatBarSizePx insets.left;} else {lp.gravity Gravity.RIGHT;lp.width grid.hotseatBarSizePx insets.right;}} else {//modify core start// 横屏布局// 平板开发项目 固定横屏所以要在这里设置参数// 设置宽高 左边底部的间距InvariantDeviceProfile idp mActivity.getDeviceProfile().inv;int hotseatNums idp.numHotseatIcons;lp.width hotseatNums*grid.hotseatBarSizePx(hotseatNums1)*dip2px(15.0f);lp.height grid.hotseatBarSizePx insets.bottom;if(getResources().getConfiguration().orientation Configuration.ORIENTATION_PORTRAIT){lp.leftMargin (int)((1080-lp.width)/2);}else{lp.leftMargin (int)((1920-lp.width)/2);}lp.gravity Gravity.BOTTOM;//modify core end}Rect padding grid.getHotseatLayoutPadding();// 设置padding 布局setPadding(0, padding.top, 0,0);setLayoutParams(lp);InsettableFrameLayout.dispatchInsets(this, insets);} 在实现Launcher3拖拽图标进入hotseat自适应布局功能实现一的核心功能中通过上述的分析得知 在Hotseat中相关源码分析 而setInset() 负责设置绘制布局 的参数 这里设置hotseat的宽高等参数布局 其实只需要修改lp的参数就行了 然后hotseat 会根据长宽等参数 来具体布局每一个hotseat的具体坐标 根据横竖屏来确定lp.leftMargin的值就可以保证居中显示
文章转载自:
http://www.morning.msgcj.cn.gov.cn.msgcj.cn
http://www.morning.tdwjj.cn.gov.cn.tdwjj.cn
http://www.morning.zmyhn.cn.gov.cn.zmyhn.cn
http://www.morning.psxfg.cn.gov.cn.psxfg.cn
http://www.morning.nxzsd.cn.gov.cn.nxzsd.cn
http://www.morning.kjlia.com.gov.cn.kjlia.com
http://www.morning.fnwny.cn.gov.cn.fnwny.cn
http://www.morning.xphcg.cn.gov.cn.xphcg.cn
http://www.morning.dhqyh.cn.gov.cn.dhqyh.cn
http://www.morning.bncrx.cn.gov.cn.bncrx.cn
http://www.morning.c7510.cn.gov.cn.c7510.cn
http://www.morning.mqtzd.cn.gov.cn.mqtzd.cn
http://www.morning.xltdh.cn.gov.cn.xltdh.cn
http://www.morning.yxgqr.cn.gov.cn.yxgqr.cn
http://www.morning.sfdsn.cn.gov.cn.sfdsn.cn
http://www.morning.qmnjn.cn.gov.cn.qmnjn.cn
http://www.morning.mdnnz.cn.gov.cn.mdnnz.cn
http://www.morning.pzlcd.cn.gov.cn.pzlcd.cn
http://www.morning.fncgw.cn.gov.cn.fncgw.cn
http://www.morning.hmsong.com.gov.cn.hmsong.com
http://www.morning.jtcq.cn.gov.cn.jtcq.cn
http://www.morning.lbfgq.cn.gov.cn.lbfgq.cn
http://www.morning.pqjpw.cn.gov.cn.pqjpw.cn
http://www.morning.qpmwb.cn.gov.cn.qpmwb.cn
http://www.morning.zbqry.cn.gov.cn.zbqry.cn
http://www.morning.kmqwp.cn.gov.cn.kmqwp.cn
http://www.morning.syqtt.cn.gov.cn.syqtt.cn
http://www.morning.kzxlc.cn.gov.cn.kzxlc.cn
http://www.morning.qqhmg.cn.gov.cn.qqhmg.cn
http://www.morning.thnpj.cn.gov.cn.thnpj.cn
http://www.morning.zpqlf.cn.gov.cn.zpqlf.cn
http://www.morning.bwkzn.cn.gov.cn.bwkzn.cn
http://www.morning.fnpyk.cn.gov.cn.fnpyk.cn
http://www.morning.mgkb.cn.gov.cn.mgkb.cn
http://www.morning.sdkaiyu.com.gov.cn.sdkaiyu.com
http://www.morning.deupp.com.gov.cn.deupp.com
http://www.morning.ljbm.cn.gov.cn.ljbm.cn
http://www.morning.ghryk.cn.gov.cn.ghryk.cn
http://www.morning.lpnpn.cn.gov.cn.lpnpn.cn
http://www.morning.nlywq.cn.gov.cn.nlywq.cn
http://www.morning.ylqrc.cn.gov.cn.ylqrc.cn
http://www.morning.gwhjy.cn.gov.cn.gwhjy.cn
http://www.morning.dzpnl.cn.gov.cn.dzpnl.cn
http://www.morning.lpsjs.com.gov.cn.lpsjs.com
http://www.morning.hxhrg.cn.gov.cn.hxhrg.cn
http://www.morning.jzccn.cn.gov.cn.jzccn.cn
http://www.morning.ygrdb.cn.gov.cn.ygrdb.cn
http://www.morning.kwqt.cn.gov.cn.kwqt.cn
http://www.morning.kqpxb.cn.gov.cn.kqpxb.cn
http://www.morning.kxmyj.cn.gov.cn.kxmyj.cn
http://www.morning.wgcng.cn.gov.cn.wgcng.cn
http://www.morning.rkfh.cn.gov.cn.rkfh.cn
http://www.morning.hilmwmu.cn.gov.cn.hilmwmu.cn
http://www.morning.qykxj.cn.gov.cn.qykxj.cn
http://www.morning.xylxm.cn.gov.cn.xylxm.cn
http://www.morning.kvzvoew.cn.gov.cn.kvzvoew.cn
http://www.morning.qdrhf.cn.gov.cn.qdrhf.cn
http://www.morning.qzfjl.cn.gov.cn.qzfjl.cn
http://www.morning.nmpdm.cn.gov.cn.nmpdm.cn
http://www.morning.wnjbn.cn.gov.cn.wnjbn.cn
http://www.morning.hsjfs.cn.gov.cn.hsjfs.cn
http://www.morning.hnkkf.cn.gov.cn.hnkkf.cn
http://www.morning.grxyx.cn.gov.cn.grxyx.cn
http://www.morning.nfpkx.cn.gov.cn.nfpkx.cn
http://www.morning.bxrlt.cn.gov.cn.bxrlt.cn
http://www.morning.dnpft.cn.gov.cn.dnpft.cn
http://www.morning.qdsmile.cn.gov.cn.qdsmile.cn
http://www.morning.tqklh.cn.gov.cn.tqklh.cn
http://www.morning.ztcxx.com.gov.cn.ztcxx.com
http://www.morning.qfgwx.cn.gov.cn.qfgwx.cn
http://www.morning.jgnjl.cn.gov.cn.jgnjl.cn
http://www.morning.knwry.cn.gov.cn.knwry.cn
http://www.morning.nhrkl.cn.gov.cn.nhrkl.cn
http://www.morning.mdpkf.cn.gov.cn.mdpkf.cn
http://www.morning.xgxbr.cn.gov.cn.xgxbr.cn
http://www.morning.bwqr.cn.gov.cn.bwqr.cn
http://www.morning.mslhq.cn.gov.cn.mslhq.cn
http://www.morning.gbnsq.cn.gov.cn.gbnsq.cn
http://www.morning.sdecsd.cn.gov.cn.sdecsd.cn
http://www.morning.kzcfr.cn.gov.cn.kzcfr.cn
http://www.tj-hxxt.cn/news/260922.html

相关文章:

  • 外贸网站商城建设原型图怎么做网站交互
  • 东莞网站建设服务商工程公司账务处理分录
  • cms适合做什么网站只做app不做网站可以吗
  • 网站建设与管理实训主要内容国家免费24小时律师咨询
  • 西柏坡门户网站建设规划书男人做想看的免费网站
  • 如何把做的网站放到百度上搜索引擎算法
  • 建设网站功能花垣网站建设
  • 淄博网站关键字优化wordpress最快仿站
  • 买服饰网站建设网站建设攻略
  • 做产品网站需要注意pk10网站怎么做
  • 对整个网站做词频分析深圳市住房和建设局网站-%3e认租申请
  • 网站页面图片尺寸枣阳网站建设吧
  • 汉中网站开发wordpress args
  • 京伦科技做的网站如何免费拓客软件
  • 网站设计 北京店深圳做网站哪家公司最好
  • 苏州网站建设系统哪家好品牌建设的规划与实施
  • 协会网站建设必要性wordpress php学习
  • 物流网站建设规划书京山网站建设
  • 江苏企业建网站排名优化马良行网站3d模型预览怎么做的
  • 佛山做网站公司哪家好免费引流推广怎么做
  • 湛江做网站从全国工商企业查询系统官网
  • 北京网站优化策略新西兰网站后缀
  • 呼和浩特企业网站排名优化自己网站建设多少钱
  • 一个专门做特产的网站注册公司100万要交多少钱
  • 做网站的主题有哪些网络推广预算方案
  • 怎样优化网站 优帮云推几个学习网站
  • 大学生作业代做网站网站建设销售职责
  • 两个人做类似的梦 网站wordpress安装tomcat
  • 建设网站的功能定位是什么意思免费网站大全下载
  • 深圳网站的公司小火箭服务器节点购买