-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[android] list support drag-drop feature #416
Conversation
Generated by 🚫 dangerJS |
|
||
private static final String EVENT_START_DRAG = "dragstart"; | ||
private static final String EVENT_END_DRAG = "dragend"; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove these unnecessary lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay
|
||
class DefaultDragHelper implements WXDragHelper { | ||
|
||
private boolean isLongPressEnabled; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suffix 'm'
@Override | ||
public int getMovementFlags(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) { | ||
if(recyclerView.getLayoutManager() instanceof GridLayoutManager || recyclerView.getLayoutManager() instanceof StaggeredGridLayoutManager){ | ||
final int dragFlags = ItemTouchHelper.UP | ItemTouchHelper.DOWN | ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just pass the expression to the method, the final variable dragFlags
is useless.
private final WXDragHelper mWXDragHelper; | ||
private boolean enableDifferentViewTypeDrag = false; | ||
|
||
private int dragFrom = -1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Field suffix `m'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prefix?
return triggerType; | ||
} | ||
|
||
private boolean getExcluded(@Nullable ImmutableDomObject domObject) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to isExcluded
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
License header is incorrect.
* Date: 16/4/5<br/> | ||
* Time: 上午11:34<br/> | ||
*/ | ||
interface WXDragHelper { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not suffix WX
with new file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allright
Please put the PR description to JIRA. And rebase your branch to fix the travis issue. |
feature:
extend attrs:
list:
cell:
any component:
JIRA: https://issues.apache.org/jira/browse/WEEX-37