Commit 81cb69bf by Lee Jaebin

#32775_作業指示タップ・タップモード切替で指示者と作業者の制御

parent 040cfa61
......@@ -5043,19 +5043,28 @@ public class ContentViewActivity extends ABVContentViewActivity {
//
btnMoveOrClickToggleIcon = (ImageButton) mScaleZoomLayout.findViewById(id.btn_move_click_toggle);
btnMoveOrClickToggleIcon.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mMoveTaskFlg = !mMoveTaskFlg;
if (mMoveTaskFlg) {
// タップモードのイメージ
btnMoveOrClickToggleIcon.setImageResource(R.drawable.ic_hidden_move);
} else {
// 移動モードのイメージ
btnMoveOrClickToggleIcon.setImageResource(R.drawable.ic_show_move);
if (isDirector()) {
// 指示者の場合
btnMoveOrClickToggleIcon.setVisibility(View.VISIBLE);
btnMoveOrClickToggleIcon.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mMoveTaskFlg = !mMoveTaskFlg;
if (mMoveTaskFlg) {
// タップモードのイメージ
btnMoveOrClickToggleIcon.setImageResource(R.drawable.ic_hidden_move);
} else {
// 移動モードのイメージ
btnMoveOrClickToggleIcon.setImageResource(R.drawable.ic_show_move);
}
}
}
});
});
} else {
// 作業者の場合
btnMoveOrClickToggleIcon.setVisibility(View.INVISIBLE);
}
// ピンと作業コードの切替ボタン
btnPinToggleIcon = (ImageButton) mScaleZoomLayout.findViewById(id.btn_pin_toggle);
......
......@@ -250,28 +250,28 @@ public class OperationTaskLayout extends RelativeLayout {
}
}
if (rootLayout.isEnableOperationTaskNewOrMove()) {
taskView.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent event) {
if (mContext.mMoveTaskFlg) {
if (event.getAction() == MotionEvent.ACTION_DOWN) {
ClipData data = ClipData.newPlainText("", "");
View.DragShadowBuilder shadowBuilder = new View.DragShadowBuilder(view);
view.startDrag(data, shadowBuilder, view, 0);
mContext.setCurrentOperationTask(dto);
}
} else {
if (event.getAction() == MotionEvent.ACTION_UP) {
if (!mContext.getOpenedProjestTask()) {
mContext.showOperationTaskLayout(rootLayout, dto, view.getX());
}
// 作業のタップイベント
taskView.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent event) {
if (mContext.mMoveTaskFlg && rootLayout.isEnableOperationTaskNewOrMove()) {
// 指示者且つ、移動モードの場合
if (event.getAction() == MotionEvent.ACTION_DOWN) {
ClipData data = ClipData.newPlainText("", "");
View.DragShadowBuilder shadowBuilder = new View.DragShadowBuilder(view);
view.startDrag(data, shadowBuilder, view, 0);
mContext.setCurrentOperationTask(dto);
}
} else {
if (event.getAction() == MotionEvent.ACTION_UP) {
if (!mContext.getOpenedProjestTask()) {
mContext.showOperationTaskLayout(rootLayout, dto, view.getX());
}
}
return true;
}
});
}
return true;
}
});
}
public void addAllOperationTaskIcon(final ZoomRelativeLayout rootLayout, final List<OperationTaskDto> dto) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment