【发布时间】:2015-08-04 03:16:20
【问题描述】:
我想在网格中显示圆形图像以及拖放图像以重新定位图标的功能。我还想动态添加圆形图像。所以我在android中使用了网格视图和拖放框架(以及onItemLongClick事件监听器)。一切正常。我只是不想在 onItemLongClick 期间突出显示项目。它突出显示在圆形图像后面创建矩形阴影的项目(这不是作为拖放框架的一部分的阴影生成器)。是否可以删除该突出显示?
下面是 Grid 项目布局 xml。
<?xml version="1.0" encoding="utf-8"?>
<com.steth.CircleImageView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="45dp"
android:layout_height="45dp"
android:id="@+id/userImg"
/>
下面是 GridView xml。
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gridview"
android:layout_width="match_parent"
android:layout_height="0dp"
android:columnWidth="90dp"
android:numColumns="auto_fit"
android:verticalSpacing="10dp"
android:horizontalSpacing="10dp"
android:stretchMode="columnWidth"
android:gravity="center"
android:layout_margin="8dp"
android:layout_weight="1" />
【问题讨论】:
标签: android drag-and-drop android-gridview