Commit 8fb0a434 by Kim Jinsung

Merge branch 'feature/1.0.1_leej' into 'feature/1.0.1'

Feature/1.0.1 leej

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