Commit 93380449 by Lee Jaebin

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

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