将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设置透明效果
  2. Android(安卓)App拥有system权限
  3. INSTALL_FAILED_INSUFFICIENT_STORAGE 这个错误怎么解决?
  4. android studio生成apk直接改名字
  5. android 获取 imei号码
  6. android 获取 imei号码
  7. android 获取IMEI号
  8. android:Cordova Android, hello Cordova ,PhoneGap android
  9. cocos2dx3.0 build_native.sh 需要这些环境变量

随机推荐

  1. Android 通过WebView和js的交互
  2. 已有项目导入他人创建的flutter项目(andr
  3. git使用之七——Android(安卓)Studio下gi
  4. Android和Linux的关系
  5. Android(安卓)Studio(四)介Androi Studio
  6. Android 串口通信开发笔记01
  7. Android上传图片到七牛云看这篇就够了
  8. android adb工具
  9. Android(安卓)滑动效果基础篇(三)—— Gall
  10. Android日记之2011\12\27