Fixing issue where landscape delete button is not centered. (Bug 6493651)

Change-Id: I782351da2daf511a79e5c9f1d3cef90bec2ca6d1
This commit is contained in:
Winson Chung
2012-05-15 16:34:19 -07:00
parent f26493f5a1
commit 947245ba8a
7 changed files with 97 additions and 30 deletions

View File

@@ -20,6 +20,7 @@ import android.content.Context;
import android.content.res.Resources;
import android.graphics.PointF;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.widget.TextView;
@@ -68,6 +69,16 @@ public class ButtonDropTarget extends TextView implements DropTarget, DragContro
mSearchDropTargetBar = searchDropTargetBar;
}
protected Drawable getCurrentDrawable() {
Drawable[] drawables = getCompoundDrawables();
for (int i = 0; i < drawables.length; ++i) {
if (drawables[i] != null) {
return drawables[i];
}
}
return null;
}
public void onDrop(DragObject d) {
}