将launcher3的应用列表背景修改为透明,与Launcher2略有不同,需要进行如下步骤:

1. 找到res/layout/apps_customize_pane.xml文件,将

<com.android.launcher3.appscustomizetabhost
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
android:background="#FF000000">

修改为:

<com.android.launcher3.appscustomizetabhost
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
android:background="#00000000">

将动画部分

<frameLayout<br> android:id="@+id/animation_buffer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FF000000"
android:visibility="gone" />

修改为:

<frameLayout<br> android:id="@+id/animation_buffer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#00000000"
android:visibility="gone" />

2、找到AppsCustomizeTabHost.java类中的onTabChangedEnd()方法,如下:

private void onTabChangedEnd(AppsCustomizePagedView.ContentType type) {
int bgAlpha = (int) (255 * (getResources().getInteger(
R.integer.config_appsCustomizeSpringLoadedBgAlpha) / 100f));
setBackgroundColor(Color.argb(bgAlpha, 0, 0, 0));
mAppsCustomizePane.setContentType(type);
}

其中bgAlpha为透明度的参数,将其改为你需要的透明度即可,255为不透明,以上1、2步骤完之后,保存,编译,即可达到需要的效果。

更多相关文章

  1. Android Studio启动安卓虚拟机失败,附Android Studio安装虚拟机步
  2. android 透明度
  3. android之使用mvn构建创造项目步骤
  4. Android的NDK开发步骤
  5. 对view设置透明度
  6. 分享GTS-800二次开发流程步骤
  7. 详解一篇搭建快速开发平台的实例步骤
  8. C++实现贪吃蛇游戏的详细步骤及实战演示
  9. C#/基于Unity 行为树的实现步骤【纯代码】

随机推荐

  1. Android中屏幕密度和图片大小的关系分析
  2. Android系统权限和root权限
  3. 【android】解决设置ImageView的scaletyp
  4. Android(安卓)Java basic knowledge ---A
  5. Android(安卓)的 Recovery 模式分析
  6. Android笔记--handler机制
  7. Android(安卓)studio NDK开发
  8. doubango tinyDEMO 编译
  9. Android中的Bmp图形格式(ALPHA_8,ARGB_44
  10. Android(安卓)HAL分析报告