Android Launcher3主菜单背景改为黑色
将launcher3的应用列表背景修改为透明,与Launcher2略有不同,需要进行如下步骤:
1.在Launcher3\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.Launcher3\src\com\android\launcher3\AppsCustomizeTabHost.java
private void onTabChangedEnd(AppsCustomizePagedView.ContentType type) {
int bgAlpha = (int) (255 * (getResources().getInteger(
R.integer.config_appsCustomizeSpringLoadedBgAlpha) / 100f));
// setBackgroundColor(Color.argb(bgAlpha, 0, 0, 0)); <span style="font-family: Arial, Helvetica, sans-serif;">setBackgroundColor(Color.argb(255, 0, 0, 0));</span>
mAppsCustomizePane.setContentType(type);
}
<span style="font-size:18px;">其中bgAlpha为透明度的参数,将其改为你需要的透明度即可,255为不透明,以上1、2步骤完之后,保存,编译,即可达到需要的效果。</span>
日拱一卒百无有尽,功不唐捐终入海
浙公网安备 33010602011771号