在android2.2中,launcher的底部被修改成
<RelativeLayout
android:id="@+id/all_apps_button_cluster"
android:layout_width="fill_parent"
android:layout_height="@dimen/button_bar_height"
android:layout_gravity="bottom|center_horizontal"
android:paddingTop="2dip"
>
<com.android.launcher2.HandleView
style="@style/HotseatButton"
android:id="@+id/all_apps_button"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:src="@drawable/all_apps_button"
launcher:direction="horizontal"
/>
<ImageView
android:id="@+id/hotseat_left"
style="@style/HotseatButton.Left"
android:layout_toLeftOf="@id/all_apps_button"
android:src="@drawable/hotseat_phone"
android:onClick="launchHotSeat"
/>
<ImageView
android:id="@+id/hotseat_right"
style="@style/HotseatButton.Right"
android:layout_toRightOf="@id/all_apps_button"
android:src="@drawable/hotseat_browser"
android:onClick="launchHotSeat"
/>
</RelativeLayout>
下面的两个ImageView控件就是左右的两个,一个电话,一个浏览器图标,在这里,你可以把这两个图标更换为其他功能,当然,具体功能实现得在Launcher.java代码中实现,如果想去掉这些图标,把上面那段代码删除,但是别忘了下面的Launcher.java中的代码。
hotseatLeft = (ImageView) findViewById(R.id.hotseat_left);
hotseatLeft.setContentDescription(mHotseatLabels[0]);
hotseatLeft.setImageDrawable(mHotseatIcons[0]);
hotseatRight = (ImageView) findViewById(R.id.hotseat_right);
hotseatRight.setContentDescription(mHotseatLabels[1]);
hotseatRight.setImageDrawable(mHotseatIcons[1]);
屏蔽掉,当然还有他们的声明代码。
private ImageView hotseatLeft;
private ImageView hotseatRight;
有关他们的代码全部屏蔽以后,重新编译下,完成效果。