Commit 93380449 by Lee Jaebin

#32576 作業指示ボタンの改善(ピン表示)作業のアニメーション修正

parent 7ea9e804
...@@ -5207,10 +5207,15 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -5207,10 +5207,15 @@ public class ContentViewActivity extends ABVContentViewActivity {
List<View> deleteViewList = new ArrayList<View>(); List<View> deleteViewList = new ArrayList<View>();
for (int j = 0; j < zoomRelativeLayout.getChildCount(); j++) { for (int j = 0; j < zoomRelativeLayout.getChildCount(); j++) {
View view = zoomRelativeLayout.getChildAt(j); View view = zoomRelativeLayout.getChildAt(j);
if (view instanceof ActionProjectTaskCode || view instanceof ActionProjectTaskPin) { if (view instanceof ActionProjectTaskCode) {
((ActionProjectTaskCode)view).stopAnimation();
// 削除対象のビューをリストViewに追加する // 削除対象のビューをリストViewに追加する
deleteViewList.add(view); deleteViewList.add(view);
} } else if (view instanceof ActionProjectTaskPin) {
((ActionProjectTaskPin)view).stopAnimation();
// 削除対象のビューをリストViewに追加する
deleteViewList.add(view);
}
} }
for (View view : deleteViewList) { for (View view : deleteViewList) {
zoomRelativeLayout.removeView(view); zoomRelativeLayout.removeView(view);
......
...@@ -3,7 +3,6 @@ package jp.agentec.abook.abv.ui.viewer.view; ...@@ -3,7 +3,6 @@ package jp.agentec.abook.abv.ui.viewer.view;
import android.content.ClipData; import android.content.ClipData;
import android.content.Context; import android.content.Context;
import android.graphics.Color; import android.graphics.Color;
import android.graphics.Point;
import android.graphics.PointF; import android.graphics.PointF;
import android.net.Uri; import android.net.Uri;
import android.util.DisplayMetrics; import android.util.DisplayMetrics;
...@@ -29,11 +28,9 @@ import jp.agentec.abook.abv.bl.data.dao.AbstractDao; ...@@ -29,11 +28,9 @@ import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.TaskDao; import jp.agentec.abook.abv.bl.data.dao.TaskDao;
import jp.agentec.abook.abv.bl.dto.ProjectTaskDto; import jp.agentec.abook.abv.bl.dto.ProjectTaskDto;
import jp.agentec.abook.abv.bl.dto.TaskDto; import jp.agentec.abook.abv.bl.dto.TaskDto;
import jp.agentec.abook.abv.cl.util.PreferenceUtil;
import jp.agentec.abook.abv.launcher.android.R; import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.activity.ABVActivity; import jp.agentec.abook.abv.ui.common.activity.ABVActivity;
import jp.agentec.abook.abv.ui.common.activity.ABVContentViewActivity; import jp.agentec.abook.abv.ui.common.activity.ABVContentViewActivity;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.viewer.activity.ContentViewActivity; import jp.agentec.abook.abv.ui.viewer.activity.ContentViewActivity;
import jp.agentec.adf.util.StringUtil; import jp.agentec.adf.util.StringUtil;
...@@ -74,14 +71,14 @@ public class ProjectTaskLayout extends RelativeLayout { ...@@ -74,14 +71,14 @@ public class ProjectTaskLayout extends RelativeLayout {
public ZoomRelativeLayout currentLayout; public ZoomRelativeLayout currentLayout;
public ProjectTaskDto currentTaskDto; public ProjectTaskDto currentTaskDto;
private ContentViewActivity context; private ContentViewActivity mContext;
private JsInf jsInf = new JsInf(); private JsInf jsInf = new JsInf();
private static TaskDao mTaskDao = AbstractDao.getDao(TaskDao.class); private static TaskDao mTaskDao = AbstractDao.getDao(TaskDao.class);
public ProjectTaskLayout(final Context context, final long contentId, final String linkUrl, boolean isNormalSize) { public ProjectTaskLayout(final Context context, final long contentId, final String linkUrl, boolean isNormalSize) {
super(context); super(context);
this.context = (ContentViewActivity)context; mContext = (ContentViewActivity)context;
if (isNormalSize) { if (isNormalSize) {
setPadding(0, 130, 0, 0); setPadding(0, 130, 0, 0);
...@@ -168,6 +165,7 @@ public class ProjectTaskLayout extends RelativeLayout { ...@@ -168,6 +165,7 @@ public class ProjectTaskLayout extends RelativeLayout {
} }
public void addProjectTaskIcon(final Context context, final ZoomRelativeLayout rootLayout, final ProjectTaskDto dto, boolean isShowPin) { public void addProjectTaskIcon(final Context context, final ZoomRelativeLayout rootLayout, final ProjectTaskDto dto, boolean isShowPin) {
mContext = (ContentViewActivity)context;
RelativeLayout.LayoutParams params; RelativeLayout.LayoutParams params;
final float density = context.getResources().getDisplayMetrics().density; final float density = context.getResources().getDisplayMetrics().density;
View taskView; View taskView;
...@@ -210,6 +208,11 @@ public class ProjectTaskLayout extends RelativeLayout { ...@@ -210,6 +208,11 @@ public class ProjectTaskLayout extends RelativeLayout {
// 座標x,yのセット // 座標x,yのセット
taskPin.setTranslationX(pointView.x - (width / 2)); taskPin.setTranslationX(pointView.x - (width / 2));
taskPin.setTranslationY(pointView.y - height); taskPin.setTranslationY(pointView.y - height);
if (currentTaskDto != null && currentTaskDto.taskKey.equals(taskPin.taskKey) && mContext.getOpenedProjestTask()) {
taskPin.startBlinkAnimation();
} else {
taskPin.stopAnimation();
}
taskPin.setVisibility(View.VISIBLE); taskPin.setVisibility(View.VISIBLE);
taskView = taskPin; taskView = taskPin;
} else { } else {
...@@ -236,6 +239,11 @@ public class ProjectTaskLayout extends RelativeLayout { ...@@ -236,6 +239,11 @@ public class ProjectTaskLayout extends RelativeLayout {
// 座標x,yのセット // 座標x,yのセット
taskCode.setTranslationX(pointView.x - ((realWidth > 0 ? realWidth : postWidth) / 2)); taskCode.setTranslationX(pointView.x - ((realWidth > 0 ? realWidth : postWidth) / 2));
taskCode.setTranslationY(pointView.y - (postHeight / 2)); taskCode.setTranslationY(pointView.y - (postHeight / 2));
if (currentTaskDto != null && currentTaskDto.taskKey.equals(taskCode.taskKey) && mContext.getOpenedProjestTask()) {
taskCode.startBlinkAnimation();
} else {
taskCode.stopAnimation();
}
taskCode.setVisibility(View.VISIBLE); taskCode.setVisibility(View.VISIBLE);
} }
}); });
...@@ -277,7 +285,7 @@ public class ProjectTaskLayout extends RelativeLayout { ...@@ -277,7 +285,7 @@ public class ProjectTaskLayout extends RelativeLayout {
} }
private boolean isTaskFinished(String taskKey) { private boolean isTaskFinished(String taskKey) {
if(context.getProjectReportUpdateType() == Constant.ProjectUpdateType.HISTORY_ADD) { if(mContext.getProjectReportUpdateType() == Constant.ProjectUpdateType.HISTORY_ADD) {
return false; return false;
} else { } else {
return mTaskDao.getTaskByTaskKey(taskKey).taskStatus == FINISHED_STATUS; return mTaskDao.getTaskByTaskKey(taskKey).taskStatus == FINISHED_STATUS;
...@@ -335,7 +343,7 @@ public class ProjectTaskLayout extends RelativeLayout { ...@@ -335,7 +343,7 @@ public class ProjectTaskLayout extends RelativeLayout {
public void showProjectTaskLayout() { public void showProjectTaskLayout() {
if (getVisibility() != View.VISIBLE) { if (getVisibility() != View.VISIBLE) {
setVisibility(View.VISIBLE); setVisibility(View.VISIBLE);
context.setProjectTaskViewStatus(true); mContext.setProjectTaskViewStatus(true);
} }
} }
...@@ -433,9 +441,9 @@ public class ProjectTaskLayout extends RelativeLayout { ...@@ -433,9 +441,9 @@ public class ProjectTaskLayout extends RelativeLayout {
if (currentTaskDto != null && !StringUtil.isNullOrEmpty(currentTaskDto.taskKey)) { if (currentTaskDto != null && !StringUtil.isNullOrEmpty(currentTaskDto.taskKey)) {
if (currentTaskDto.taskKey.equals(TEMP_TASK_KEY)) { if (currentTaskDto.taskKey.equals(TEMP_TASK_KEY)) {
addProjectTaskIcon(context, currentLayout, currentTaskDto, ((ContentViewActivity)context).mShowPinFlg); addProjectTaskIcon(mContext, currentLayout, currentTaskDto, ((ContentViewActivity) mContext).mShowPinFlg);
} else { } else {
if (context.getOpenedProjestTask()) { if (mContext.getOpenedProjestTask()) {
setTaskCodeBlinkAnimation(currentTaskDto.taskKey, true); setTaskCodeBlinkAnimation(currentTaskDto.taskKey, true);
} }
} }
...@@ -551,7 +559,7 @@ public class ProjectTaskLayout extends RelativeLayout { ...@@ -551,7 +559,7 @@ public class ProjectTaskLayout extends RelativeLayout {
private class JsInf { private class JsInf {
@JavascriptInterface @JavascriptInterface
public void getAttachedDataUrl(String data) { public void getAttachedDataUrl(String data) {
((ABVContentViewActivity)ProjectTaskLayout.this.context).commonAttachedDataUrl(data); ((ABVContentViewActivity)ProjectTaskLayout.this.mContext).commonAttachedDataUrl(data);
} }
} }
} }
...@@ -188,6 +188,7 @@ public class ZoomRelativeLayout extends RelativeLayout { ...@@ -188,6 +188,7 @@ public class ZoomRelativeLayout extends RelativeLayout {
canvas.concat(imgMatrix); canvas.concat(imgMatrix);
} }
super.dispatchDraw(canvas); super.dispatchDraw(canvas);
invalidate();
canvas.restore(); canvas.restore();
} }
......
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