android Launcher3应用列表修改透明背景
2015-05-08 15:59
513 查看
将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. 找到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步骤完之后,保存,编译,即可达到需要的效果。
相关文章推荐
- Android开发实现Launcher3应用列表修改透明背景的方法
- Android launcher2 应用列表背景透明/透明壁纸
- android 4.1.2 launcher2实现像4.4launcher3应用列表背景透明的效果
- android4.4 launcher2实现应用列表背景透明
- android 4.1.2 launcher2实现应用列表背景透明
- Android Launcher分析和修改7——AllApp全部应用列表(AppsCustomizeTabHost)
- Android Launcher分析和修改7——AllApp全部应用列表(AppsCustomizeTabHost)
- android 4.1.2 launcher2实现应用列表背景透明
- 转niutao:android 4.1.2 launcher2实现应用列表背景透明
- Android Launcher分析和修改7——AllApp全部应用列表(AppsCustomizeTabHost)
- Launcher实现应用列表透明背景
- Pretty UI Design For Android -- 滑动背景、透明列表
- launcher修改--获取应用列表launcher源码解析
- Android Launcher3 去掉应用列表后,在系统桌面拖动应用图标卸载应用
- Pretty UI Design For Android -- 滑动背景、透明列表
- android 状态栏背景修改为透明
- 修改Launcher应用程序列表的背景
- Android Launcher3去掉全部应用列表
- [学习记录]android 状态栏背景修改为透明
- Android launcher2 刷新/更新应用列表界面