Merge "Add drag indicator to hotseat" into ub-launcher3-master

This commit is contained in:
Tony Wickham
2018-03-26 18:11:49 +00:00
committed by Android (Google) Code Review
3 changed files with 15 additions and 1 deletions

View File

@@ -17,6 +17,16 @@
android:theme="@style/HomeScreenElementTheme"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res-auto">
<ImageView
android:id="@+id/drag_indicator"
android:layout_width="@dimen/hotseat_drag_indicator_height"
android:layout_height="@dimen/hotseat_drag_indicator_height"
android:src="@drawable/ic_drag_indicator"
android:tint="?attr/workspaceTextColor"
android:scaleType="centerInside"
android:layout_gravity="top|center_horizontal"/>
<com.android.launcher3.CellLayout
android:id="@+id/layout"
android:layout_width="wrap_content"

View File

@@ -37,6 +37,7 @@
<dimen name="dynamic_grid_hotseat_bottom_padding">2dp</dimen>
<dimen name="dynamic_grid_hotseat_size">80dp</dimen>
<dimen name="dynamic_grid_hotseat_side_padding">0dp</dimen>
<dimen name="hotseat_drag_indicator_height">24dp</dimen>
<!-- Hotseat/all-apps scrim -->
<dimen name="all_apps_scrim_radius">8dp</dimen>

View File

@@ -22,6 +22,7 @@ import android.view.View.AccessibilityDelegate;
import com.android.launcher3.Hotseat;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherStateManager.StateHandler;
import com.android.launcher3.R;
import com.android.launcher3.util.TouchController;
public class UiFactory {
@@ -49,6 +50,8 @@ public class UiFactory {
public static void onTrimMemory(Launcher launcher, int level) { }
public static View[] getHotseatExtraContent(Hotseat hotseat) {
return new View[0];
return new View[] {
hotseat.findViewById(R.id.drag_indicator),
};
}
}