Commit fc9484dd by Jeong Gilmo

Merge branch 'feature/1.0.1' into feature/1.0.1_32782

parents 21004d02 8fb0a434
...@@ -75,7 +75,7 @@ public class TaskReportDao extends AbstractDao { ...@@ -75,7 +75,7 @@ public class TaskReportDao extends AbstractDao {
// 0301 end // 0301 end
+ "data_send_flg) " + "data_send_flg) "
+ "values " + "values "
+ "(?,?,?,?,?,?,?)", + "(?,?,?,?,?,?)",
dto.getInsertValues()); dto.getInsertValues());
} }
......
...@@ -13,4 +13,6 @@ ...@@ -13,4 +13,6 @@
<dimen name="text_size_noraml">18sp</dimen> <dimen name="text_size_noraml">18sp</dimen>
<dimen name="text_size_small">16sp</dimen> <dimen name="text_size_small">16sp</dimen>
<dimen name="text_size_large">22sp</dimen> <dimen name="text_size_large">22sp</dimen>
<dimen name="operation_scale_zoom_margin_dp">25dp</dimen>
</resources> </resources>
...@@ -13,4 +13,6 @@ ...@@ -13,4 +13,6 @@
<dimen name="text_size_large">18sp</dimen> <dimen name="text_size_large">18sp</dimen>
<dimen name="weather_text_size">12sp</dimen> <dimen name="weather_text_size">12sp</dimen>
<dimen name="weather_text_large_size">13sp</dimen> <dimen name="weather_text_large_size">13sp</dimen>
<dimen name="operation_scale_zoom_margin_dp">10dp</dimen>
</resources> </resources>
...@@ -7,24 +7,40 @@ ...@@ -7,24 +7,40 @@
android:background="@color/transparent"> android:background="@color/transparent">
<ImageButton <ImageButton
android:id="@+id/btn_move_click_toggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginBottom="@dimen/operation_scale_zoom_margin_dp"
android:layout_marginEnd="2dp"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:background="@drawable/ic_show_move"
android:visibility="visible" />
<ImageButton
android:id="@+id/btn_pin_toggle" android:id="@+id/btn_pin_toggle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="2px"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:background="@drawable/ic_hidden_show_directions_button" android:layout_marginBottom="@dimen/operation_scale_zoom_margin_dp"
android:visibility="visible"/> android:layout_marginEnd="2dp"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:background="@drawable/ic_show_directions_button"
android:visibility="visible" />
<ImageButton <ImageButton
android:id="@+id/btn_hide_task_direct" android:id="@+id/btn_hide_task_direct"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="2px"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:background="@drawable/ic_hidden_show_directions_button" android:layout_margin="2dp"
android:visibility="visible"/> android:background="@drawable/ic_hidden_show_pin_button"
android:visibility="visible" />
<ImageButton <ImageButton
android:id="@+id/btn_scale_zoom_plus" android:id="@+id/btn_scale_zoom_plus"
...@@ -33,7 +49,7 @@ ...@@ -33,7 +49,7 @@
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:background="@drawable/ic_scale_zoom_plus" android:background="@drawable/ic_scale_zoom_plus"
android:layout_marginTop="20dp" android:layout_marginTop="@dimen/operation_scale_zoom_margin_dp"
android:visibility="visible" /> android:visibility="visible" />
<ImageButton <ImageButton
......
...@@ -264,8 +264,11 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -264,8 +264,11 @@ public class ContentViewActivity extends ABVContentViewActivity {
private LinearLayout mScaleZoomLayout; private LinearLayout mScaleZoomLayout;
private boolean isOpenedOperationTask = false; private boolean isOpenedOperationTask = false;
private TaskHotspotJSON mTaskHotspotJSON; private TaskHotspotJSON mTaskHotspotJSON;
// ピンと作業コードの切替ボタン // 移動・タップモードの切り替えボタン
protected ImageButton btnMoveOrClickToggleIcon;
// ピンと作業コードの切り換えボタン
protected ImageButton btnPinToggleIcon; protected ImageButton btnPinToggleIcon;
// 作業非表示のボタン
protected ImageButton btnHideTaskDirectBtn; protected ImageButton btnHideTaskDirectBtn;
protected ImageButton btnScaleZoomPlus; protected ImageButton btnScaleZoomPlus;
protected ImageButton btnScaleZoom03; protected ImageButton btnScaleZoom03;
...@@ -323,8 +326,10 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -323,8 +326,10 @@ public class ContentViewActivity extends ABVContentViewActivity {
private ProgressBar m_progress; private ProgressBar m_progress;
public ValueCallback<Uri[]> mUploadMessage; public ValueCallback<Uri[]> mUploadMessage;
// ピン・作業コード表示フラグ
public boolean mShowPinFlg = true; public boolean mShowPinFlg = true;
// 移動・タップモードのフラグ
public boolean mMoveTaskFlg = false;
/** /**
* スクロールステータス * スクロールステータス
...@@ -5035,12 +5040,51 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -5035,12 +5040,51 @@ public class ContentViewActivity extends ABVContentViewActivity {
mScaleZoomLayout.setVisibility(View.VISIBLE); mScaleZoomLayout.setVisibility(View.VISIBLE);
mMainLayout.addView(mScaleZoomLayout, params); mMainLayout.addView(mScaleZoomLayout, params);
// 移動・タップの切り替えボタン
btnMoveOrClickToggleIcon = (ImageButton) mScaleZoomLayout.findViewById(id.btn_move_click_toggle);
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_show_select);
} else {
// 移動モードのイメージ
btnMoveOrClickToggleIcon.setImageResource(R.drawable.ic_show_move);
}
}
});
} else {
// 作業者の場合
btnMoveOrClickToggleIcon.setVisibility(View.INVISIBLE);
}
// ピンと作業コードの切替ボタン // ピンと作業コードの切替ボタン
btnPinToggleIcon = (ImageButton) mScaleZoomLayout.findViewById(id.btn_pin_toggle); btnPinToggleIcon = (ImageButton) mScaleZoomLayout.findViewById(id.btn_pin_toggle);
btnPinToggleIcon.setOnClickListener(new View.OnClickListener() { btnPinToggleIcon.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
mShowPinFlg = !mShowPinFlg; mShowPinFlg = !mShowPinFlg;
if (mShowPinFlg) {
// ピン表示モードの場合、以下のイメージでセット
// 作業コードモードのイメージ
btnPinToggleIcon.setImageResource(R.drawable.ic_show_directions_button);
// 非表示ボタンをピン非表示のイメージ
btnHideTaskDirectBtn.setImageResource(R.drawable.ic_hidden_show_pin_button);
} else {
// 作業コード表示モードの場合、以下のイメージでセット
// ピンモードのイメージ
btnPinToggleIcon.setImageResource(R.drawable.ic_show_pin_button);
// 非表示ボタンを作業コード非表示のイメージ
btnHideTaskDirectBtn.setImageResource(R.drawable.ic_hidden_show_directions_button);
}
changeTaskMainIcon(mShowPinFlg); changeTaskMainIcon(mShowPinFlg);
} }
}); });
...@@ -5122,7 +5166,8 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -5122,7 +5166,8 @@ public class ContentViewActivity extends ABVContentViewActivity {
public void showOperationTaskLayout(ZoomRelativeLayout layout, OperationTaskDto operationTaskDto, float clickX) { public void showOperationTaskLayout(ZoomRelativeLayout layout, OperationTaskDto operationTaskDto, float clickX) {
//setCurrentOperationTask(layout, currentTaskDto); //setCurrentOperationTask(layout, currentTaskDto);
operationTaskLayout.showTaskForm(layout, mXWalkOpenType, operationTaskDto, isNormalSize(), clickX); operationTaskLayout.showTaskForm(layout, mXWalkOpenType, operationTaskDto, isNormalSize(), clickX);
// 拡大・縮小・切替ボタンの非表示
mScaleZoomLayout.setVisibility(View.INVISIBLE);
isOpenedOperationTask = true; isOpenedOperationTask = true;
} }
...@@ -5130,8 +5175,11 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -5130,8 +5175,11 @@ public class ContentViewActivity extends ABVContentViewActivity {
String taskKey = checkParam.get(ABookKeys.TASK_KEY); String taskKey = checkParam.get(ABookKeys.TASK_KEY);
String taskCode = ""; String taskCode = "";
// フォームが閉いているフラグをfalseに設定 // フォームが閉じられたと見做すので、以下の処理を行う
isOpenedOperationTask = false; isOpenedOperationTask = false;
// 拡大・縮小・切替ボタンの表示
mScaleZoomLayout.setVisibility(View.VISIBLE);
if (operationTaskLayout.currentLayout != null && !StringUtil.isNullOrEmpty(taskKey)) { if (operationTaskLayout.currentLayout != null && !StringUtil.isNullOrEmpty(taskKey)) {
switch(cmd){ switch(cmd){
case ABookKeys.CMD_INSERT_TASK_DIRECTIONS: case ABookKeys.CMD_INSERT_TASK_DIRECTIONS:
...@@ -5163,7 +5211,13 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -5163,7 +5211,13 @@ public class ContentViewActivity extends ABVContentViewActivity {
} }
} }
/**
* 作業一覧レイアウトを非表示処理
*/
public void hideOperationTaskLayout() { public void hideOperationTaskLayout() {
// 拡大・縮小・切替ボタンの表示
mScaleZoomLayout.setVisibility(View.VISIBLE);
operationTaskLayout.setVisibility(View.INVISIBLE); operationTaskLayout.setVisibility(View.INVISIBLE);
operationTaskLayout.currentTaskDto = null; operationTaskLayout.currentTaskDto = null;
setOperationTaskViewStatus(false); setOperationTaskViewStatus(false);
...@@ -5228,6 +5282,9 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -5228,6 +5282,9 @@ public class ContentViewActivity extends ABVContentViewActivity {
@Override @Override
public void showTaskList() { public void showTaskList() {
// 拡大・縮小・切替ボタンの非表示
mScaleZoomLayout.setVisibility(View.INVISIBLE);
operationTaskLayout.showTaskList(mCurrentPageNumber, isNormalSize()); operationTaskLayout.showTaskList(mCurrentPageNumber, isNormalSize());
} }
......
...@@ -32,9 +32,9 @@ public class ActionOperationTaskPin extends ImageView { ...@@ -32,9 +32,9 @@ public class ActionOperationTaskPin extends ImageView {
mContext = context; mContext = context;
mOperationTaskDto = dto; mOperationTaskDto = dto;
if (mOperationTaskDto.isFinished) { if (mOperationTaskDto.isFinished) {
setImageResource(R.drawable.s_pin2); setImageResource(R.drawable.ic_pin_finish);
} else { } else {
setImageResource(R.drawable.s_pin1); setImageResource(R.drawable.ic_pin_unfinish);
} }
setBackgroundColor(Color.TRANSPARENT); setBackgroundColor(Color.TRANSPARENT);
} }
......
...@@ -250,30 +250,27 @@ public class OperationTaskLayout extends RelativeLayout { ...@@ -250,30 +250,27 @@ public class OperationTaskLayout extends RelativeLayout {
} }
} }
if (rootLayout.isEnableOperationTaskNewOrMove()) { // 作業のタップイベント
taskView.setOnTouchListener(new View.OnTouchListener() { taskView.setOnTouchListener(new View.OnTouchListener() {
@Override @Override
public boolean onTouch(View view, MotionEvent event) { public boolean onTouch(View view, MotionEvent event) {
if (mContext.mMoveTaskFlg && rootLayout.isEnableOperationTaskNewOrMove()) {
// 指示者且つ、移動モードの場合
if (event.getAction() == MotionEvent.ACTION_DOWN) { if (event.getAction() == MotionEvent.ACTION_DOWN) {
ClipData data = ClipData.newPlainText("", ""); ClipData data = ClipData.newPlainText("", "");
View.DragShadowBuilder shadowBuilder = new View.DragShadowBuilder(view); View.DragShadowBuilder shadowBuilder = new View.DragShadowBuilder(view);
view.startDrag(data, shadowBuilder, view, 0); view.startDrag(data, shadowBuilder, view, 0);
mContext.setCurrentOperationTask(dto); mContext.setCurrentOperationTask(dto);
} }
//rootLayout.invalidate(); } else {
return true; if (event.getAction() == MotionEvent.ACTION_UP) {
}
});
}
taskView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Logger.d(TAG, "[taskView.setOnClickListener]:taskCode=" + dto.taskCode);
if (!mContext.getOpenedProjestTask()) { if (!mContext.getOpenedProjestTask()) {
mContext.showOperationTaskLayout(rootLayout, dto, view.getX()); mContext.showOperationTaskLayout(rootLayout, dto, view.getX());
} }
} }
}
return true;
}
}); });
} }
...@@ -508,9 +505,9 @@ public class OperationTaskLayout extends RelativeLayout { ...@@ -508,9 +505,9 @@ public class OperationTaskLayout extends RelativeLayout {
if (icon.taskKey.equals(TEMP_TASK_KEY) || icon.taskKey.equals(taskKey)) { if (icon.taskKey.equals(TEMP_TASK_KEY) || icon.taskKey.equals(taskKey)) {
icon.stopAnimation(); icon.stopAnimation();
if (isTaskFinished(taskKey)) { if (isTaskFinished(taskKey)) {
icon.setImageResource(R.drawable.s_pin2); icon.setImageResource(R.drawable.ic_pin_finish);
} else { } else {
icon.setImageResource(R.drawable.s_pin1); icon.setImageResource(R.drawable.ic_pin_unfinish);
} }
if (isDelete || icon.taskKey.equals(TEMP_TASK_KEY)) { if (isDelete || icon.taskKey.equals(TEMP_TASK_KEY)) {
currentLayout.removeView(v); currentLayout.removeView(v);
......
...@@ -108,11 +108,7 @@ public class ZoomRelativeLayout extends RelativeLayout { ...@@ -108,11 +108,7 @@ public class ZoomRelativeLayout extends RelativeLayout {
View view = (View) event.getLocalState(); View view = (View) event.getLocalState();
float mX = event.getX(); float mX = event.getX();
float mY = event.getY(); float mY = event.getY();
// 作業コード、ピンの動きが上下左右10pxの差分がなければ、クリックイベントとして見做す。
if (Math.abs(mX - fX) < 10 && Math.abs(mY - fY) < 10) {
view.performClick();
return true;
}
float[] pdfMatrix = getMatrixValue(getPageView().imgMatrix); float[] pdfMatrix = getMatrixValue(getPageView().imgMatrix);
float scaledWidth = getScaledPDFWidth(pdfMatrix[Matrix.MSCALE_X]); float scaledWidth = getScaledPDFWidth(pdfMatrix[Matrix.MSCALE_X]);
float scaledHeight = getScaledPDFHeight(pdfMatrix[Matrix.MSCALE_Y]); float scaledHeight = getScaledPDFHeight(pdfMatrix[Matrix.MSCALE_Y]);
...@@ -928,7 +924,7 @@ public class ZoomRelativeLayout extends RelativeLayout { ...@@ -928,7 +924,7 @@ public class ZoomRelativeLayout extends RelativeLayout {
Logger.v(TAG, "[OnDoubleTapListener]:[onDoubleTap]"); Logger.v(TAG, "[OnDoubleTapListener]:[onDoubleTap]");
if (isOperationPdf && mContext instanceof ContentViewActivity) { if (isOperationPdf && mContext instanceof ContentViewActivity) {
if(((ContentViewActivity) mContext).getOpenedProjestTask() || !isEnableOperationTaskNewOrMove()) { if(((ContentViewActivity) mContext).getOpenedProjestTask() || !isEnableOperationTaskNewOrMove() || ((ContentViewActivity) mContext).mMoveTaskFlg) {
return true; return true;
} }
......
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