Defining separate layouts for horizontal and vertical drop target bars
instead of chaning the layouts in DeviceProfile Bug: 27721989 Change-Id: I9a22c21e643f4fd0058c9be5e9d705aaf7649204
This commit is contained in:
1 parent
17763cb1d2
commit
f37a21412a
15 files changed
+153
-121
No files matched your search
@@ -19,6 +19,7 @@ package com.android.launcher3;
|
||||
import android.animation.TimeInterpolator;
|
||||
import android.content.Context;
|
||||
import android.graphics.PointF;
|
||||
import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.view.animation.AnimationUtils;
|
||||
@@ -69,7 +70,7 @@ public class DeleteDropTarget extends ButtonDropTarget {
|
||||
* Set the drop target's text to either "Remove" or "Cancel" depending on the drag source.
|
||||
*/
|
||||
public void setTextBasedOnDragSource(DragSource dragSource) {
|
||||
if (!mDeviceProfile.isVerticalBarLayout()) {
|
||||
if (!TextUtils.isEmpty(getText())) {
|
||||
setText(dragSource.supportsDeleteDropTarget() ? R.string.remove_drop_target_label
|
||||
: android.R.string.cancel);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user