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

专业做网站电话百度搜索引擎怎么做

专业做网站电话,百度搜索引擎怎么做,网站建设都需要那些材料,二维码生成网址链接1.概述 在12.0 产品定制化开发中 由产品需求Launcher3 页面布局的原因,要求Launcher3 需要去掉Hotseat 不显示Hotseat下面几个图标,而做满屏app的显示,从而达到美观的效果,下面就来分析去掉Hotseat从而实现这个功能 2.Launcher3 …

1.概述


   在12.0 产品定制化开发中 由产品需求Launcher3 页面布局的原因,要求Launcher3 需要去掉Hotseat 不显示Hotseat下面几个图标,而做满屏app的显示,从而达到美观的效果,下面就来分析去掉Hotseat从而实现这个功能

2.Launcher3 去掉Hotseat的核心类

packages/apps/Launcher3/res/layout/launcher.xml
packages/apps/Launcher3/src/com/android/launcher3/DeviceProfile.java

3.Launcher3 去掉Hotseat的核心功能分析和实现

        在Launcher3中主页面就是launcher.xml只布局,hotseat布局也在这里面,所以隐藏hotseat可以从这里先看launcher.xml的布局。
首先看下launcher.xml的布局

3.1 launcher.xml  hotseat布局

<com.android.launcher3.LauncherRootView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res-auto"
android:id="@+id/launcher"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<com.android.launcher3.dragndrop.DragLayerandroid:id="@+id/drag_layer"android:layout_width="match_parent"android:layout_height="match_parent"android:clipChildren="false"android:clipToPadding="false"android:importantForAccessibility="no"><!-- The workspace contains 5 screens of cells --><!-- DO NOT CHANGE THE ID --><com.android.launcher3.Workspaceandroid:id="@+id/workspace"android:layout_width="match_parent"android:layout_height="match_parent"android:layout_gravity="center"android:theme="@style/HomeScreenElementTheme"launcher:pageIndicator="@+id/page_indicator" /><include layout="@layout/memoryinfo_ext" /><!-- DO NOT CHANGE THE ID --><includeandroid:id="@+id/hotseat"layout="@layout/hotseat" /><includeandroid:id="@+id/overview_panel"layout="@layout/overview_panel"android:visibility="gone" /><!-- Keep these behind the workspace so that they are not visible whenwe go into AllApps --><com.sprd.ext.pageindicators.WorkspacePageIndicatorLineandroid:id="@+id/page_indicator"android:layout_width="match_parent"android:layout_height="@dimen/vertical_drag_handle_size"android:layout_gravity="bottom"android:theme="@style/HomeScreenElementTheme" /><includeandroid:id="@+id/page_indicator_customize"layout="@layout/page_indicator_customize" /><includeandroid:id="@+id/drop_target_bar"layout="@layout/drop_target_bar" /><includeandroid:id="@+id/scrim_view"layout="@layout/scrim_view" /><includeandroid:id="@+id/apps_view"layout="@layout/all_apps"android:layout_width="match_parent"android:layout_height="match_parent" /></com.android.launcher3.dragndrop.DragLayer></com.android.launcher3.LauncherRootView>

从布局中可以看到android:id="@+id/hotseat"就是hotseat布局,所以隐藏hotseat就是需要设置属性为gone。

<includeandroid:id="@+id/hotseat"layout="@layout/hotseat"android:visibility="gone" />

3.2 DeviceProfile.java 关于hotseat高度的修改

public DeviceProfile(Context context, InvariantDeviceProfile inv,
Point minSize, Point maxSize,
int width, int height, boolean isLandscape, boolean isMultiWindowMode) {this.inv = inv;this.isLandscape = isLandscape;this.isMultiWindowMode = isMultiWindowMode;// Determine sizes.widthPx = width;heightPx = height;if (isLandscape) {availableWidthPx = maxSize.x;availableHeightPx = minSize.y;} else {availableWidthPx = minSize.x;availableHeightPx = maxSize.y;}Resources res = context.getResources();DisplayMetrics dm = res.getDisplayMetrics();// Constants from resourcesisTablet = res.getBoolean(R.bool.is_tablet);isLargeTablet = res.getBoolean(R.bool.is_large_tablet);isPhone = !isTablet && !isLargeTablet;aspectRatio = ((float) Math.max(widthPx, heightPx)) / Math.min(widthPx, heightPx);boolean isTallDevice = Float.compare(aspectRatio, TALL_DEVICE_ASPECT_RATIO_THRESHOLD) >= 0;// Some more constantstransposeLayoutWithOrientation =res.getBoolean(R.bool.hotseat_transpose_layout_with_orientation);context = getContext(context, isVerticalBarLayout()? Configuration.ORIENTATION_LANDSCAPE: Configuration.ORIENTATION_PORTRAIT);res = context.getResources();edgeMarginPx = res.getDimensionPixelSize(R.dimen.dynamic_grid_edge_margin);desiredWorkspaceLeftRightMarginPx = isVerticalBarLayout() ? 0 : edgeMarginPx;int cellLayoutPaddingLeftRightMultiplier = !isVerticalBarLayout() && isTablet? PORTRAIT_TABLET_LEFT_RIGHT_PADDING_MULTIPLIER : 1;int cellLayoutPadding = res.getDimensionPixelSize(R.dimen.dynamic_grid_cell_layout_padding);if (isLandscape) {cellLayoutPaddingLeftRightPx = 0;cellLayoutBottomPaddingPx = cellLayoutPadding;} else {cellLayoutPaddingLeftRightPx = cellLayoutPaddingLeftRightMultiplier * cellLayoutPadding;cellLayoutBottomPaddingPx = 0;}verticalDragHandleSizePx = res.getDimensionPixelSize(R.dimen.vertical_drag_handle_size);verticalDragHandleOverlapWorkspace =res.getDimensionPixelSize(R.dimen.vertical_drag_handle_overlap_workspace);IconLabelController ilc = LauncherAppMonitor.getInstance(context).getIconLabelController();maxIconLabelLines = ilc != null ?ilc.getIconLabelLine() : IconLabelController.MIN_ICON_LABEL_LINE;iconDrawablePaddingOriginalPx =res.getDimensionPixelSize(R.dimen.dynamic_grid_icon_drawable_padding);dropTargetBarSizePx = res.getDimensionPixelSize(R.dimen.dynamic_grid_drop_target_size);workspaceSpringLoadedBottomSpace =res.getDimensionPixelSize(R.dimen.dynamic_grid_min_spring_loaded_space);workspaceCellPaddingXPx = res.getDimensionPixelSize(R.dimen.dynamic_grid_cell_padding_x);hotseatBarTopPaddingPx =res.getDimensionPixelSize(R.dimen.dynamic_grid_hotseat_top_padding);hotseatBarBottomPaddingPx = (isTallDevice ? 0: res.getDimensionPixelSize(R.dimen.dynamic_grid_hotseat_bottom_non_tall_padding))+ res.getDimensionPixelSize(R.dimen.dynamic_grid_hotseat_bottom_padding);hotseatBarSidePaddingEndPx =res.getDimensionPixelSize(R.dimen.dynamic_grid_hotseat_side_padding);// Add a bit of space between nav bar and hotseat in vertical bar layout.hotseatBarSidePaddingStartPx = isVerticalBarLayout() ? verticalDragHandleSizePx : 0;hotseatBarSizePx = ResourceUtils.pxFromDp(inv.iconSize, dm) + (isVerticalBarLayout()? (hotseatBarSidePaddingStartPx + hotseatBarSidePaddingEndPx): (res.getDimensionPixelSize(R.dimen.dynamic_grid_hotseat_extra_vertical_size)+ hotseatBarTopPaddingPx + hotseatBarBottomPaddingPx));....}

在DeviceProile构造函数中的hotseatBarSizePx 就是设置的导航栏高度,在这里构建hotseat布局的时候,可以通过设置这个高度了布后hotseatBarSizePx就是hotseat的高度
直接设为0即可
修改如下:

hotseatBarSizePx = 0/*ResourceUtils.pxFromDp(inv.iconSize, dm) + (isVerticalBarLayout()? (hotseatBarSidePaddingStartPx + hotseatBarSidePaddingEndPx): (res.getDimensionPixelSize(R.dimen.dynamic_grid_hotseat_extra_vertical_size)+ hotseatBarTopPaddingPx + hotseatBarBottomPaddingPx))*/;

http://www.shuangfujiaoyu.com/news/58517.html

相关文章:

  • 如何做输入密码进入网站网络服务器地址怎么查
  • 深圳深圳龙岗网站建设公司seo关键词优化怎么收费
  • 北海哪家做网站网站seo运营
  • 有域名有服务器如何做网站怎么免费创建网站
  • 连锁酒店网站方案百度网站下载安装
  • 小型旅游网站建设方案营销软文推广平台
  • 低价网站建设哪家更好流量平台排名
  • 哪里有网站制作平台说说seo论坛
  • 渭南市网站建设友链交易网
  • 霸州有做滤芯网站的吗营销宝
  • 0基础怎么做网站模版成都网站关键词推广优化
  • 从搜索引擎访问网站策划推广方案
  • 五指山网站开发价格seo策略
  • 乐清做网站的公司企业官方网站推广
  • wordpress福利网站源码海口百度seo公司
  • 网页生成链接淘宝优化
  • 网站建设地位成都网站优化平台
  • 网站优化对企业有什么好处提升seo排名平台
  • 深圳做人工智能芯片的公司沈阳seo排名收费
  • 做好的网站怎么演示怎么优化自己网站
  • 明天去广州需要隔离吗杭州seo外包
  • 做试试彩网站关注公众号推广2元一个
  • 现在流行用什么语言做网站怎么样推广自己的网址
  • 美食网站源代码免费发布产品的网站
  • 发软文提高网站权重广州抖音推广公司
  • 中国建设银行北京市分行网站上海高端seo公司
  • 注册域名后怎么做网站自己做一个网站需要多少钱
  • 自己网站做第三方支付上海培训机构
  • 做电视网站需要多大的服务器应用关键词优化
  • 广东省城乡住房建设厅网站首页全网品牌推广公司