Commit 85ca0555 by Kazuyuki Hida

ステータス別作業数のパネル表示を実装した

parent 391f4dc2
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/list_layout" android:id="@+id/list_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/list_selector_holo_light" android:background="@drawable/list_selector_holo_light"
android:descendantFocusability="blocksDescendants" android:descendantFocusability="blocksDescendants"
android:padding="10dp" android:padding="10dp"
android:orientation="horizontal"> android:orientation="horizontal"
tools:ignore="MissingDefaultResource">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -71,13 +73,6 @@ ...@@ -71,13 +73,6 @@
android:orientation="horizontal"> android:orientation="horizontal">
<ImageButton <ImageButton
android:id="@+id/btn_pano_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/ic_edit_list"
android:visibility="invisible" />
<ImageButton
android:id="@+id/btn_sync" android:id="@+id/btn_sync"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/root" android:id="@+id/root"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -8,7 +9,8 @@ ...@@ -8,7 +9,8 @@
android:paddingTop="20dp" android:paddingTop="20dp"
android:paddingRight="10dp" android:paddingRight="10dp"
android:paddingLeft="10dp" android:paddingLeft="10dp"
android:orientation="vertical"> android:orientation="vertical"
tools:ignore="MissingDefaultResource">
<LinearLayout <LinearLayout
android:id="@+id/panel_layout" android:id="@+id/panel_layout"
...@@ -33,28 +35,64 @@ ...@@ -33,28 +35,64 @@
android:id="@+id/report_type" android:id="@+id/report_type"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginRight="10dp" /> android:layout_marginRight="10dp" />
<ImageView <ImageView
android:id="@+id/operation_type" android:id="@+id/operation_type"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" /> android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginRight="10dp" />
<TextView
android:id="@+id/report_count_not_started"
android:layout_width="@dimen/report_status_width_2"
android:layout_height="@dimen/report_status_height"
android:layout_margin="2dp"
android:layout_gravity="center_vertical"
android:textColor="@color/basic_white1"
android:textSize="9pt"
android:gravity="center"
android:background="@color/marking_color_9"
/>
<TextView
android:id="@+id/report_count_working"
android:layout_width="@dimen/report_status_width_2"
android:layout_height="@dimen/report_status_height"
android:layout_margin="2dp"
android:layout_gravity="center_vertical"
android:textColor="@color/basic_white1"
android:textSize="9pt"
android:gravity="center"
android:background="@color/app_color"
/>
<TextView
android:id="@+id/report_count_completed"
android:layout_width="@dimen/report_status_width_2"
android:layout_height="@dimen/report_status_height"
android:layout_margin="2dp"
android:layout_gravity="center_vertical"
android:textColor="@color/basic_white1"
android:textSize="9pt"
android:gravity="center"
android:background="@color/marking_color_8"
/>
</LinearLayout> </LinearLayout>
<Space
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="right"
android:gravity="right" android:gravity="right"
android:orientation="horizontal"> android:orientation="horizontal">
<ImageButton <ImageButton
android:id="@+id/btn_pano_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/ic_edit_panel"
android:visibility="invisible" />
<ImageButton
android:id="@+id/btn_sync" android:id="@+id/btn_sync"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/list_layout" android:id="@+id/list_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:descendantFocusability="blocksDescendants" android:descendantFocusability="blocksDescendants"
android:padding="10dp" android:padding="10dp"
android:orientation="vertical"> android:orientation="vertical"
tools:ignore="MissingDefaultResource">
<LinearLayout <LinearLayout
...@@ -78,14 +80,6 @@ ...@@ -78,14 +80,6 @@
android:layout_gravity="center" android:layout_gravity="center"
android:orientation="horizontal"> android:orientation="horizontal">
<ImageView
android:id="@+id/btn_pano_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginRight="5dp"
android:background="@drawable/ic_edit_list" />
<ImageButton <ImageButton
android:id="@+id/btn_sync" android:id="@+id/btn_sync"
android:layout_width="wrap_content" android:layout_width="wrap_content"
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/root" android:id="@+id/root"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -8,7 +10,8 @@ ...@@ -8,7 +10,8 @@
android:paddingTop="20dp" android:paddingTop="20dp"
android:paddingRight="30dp" android:paddingRight="30dp"
android:paddingLeft="30dp" android:paddingLeft="30dp"
android:orientation="vertical"> android:orientation="vertical"
tools:ignore="MissingDefaultResource">
<LinearLayout <LinearLayout
android:id="@+id/panel_layout" android:id="@+id/panel_layout"
...@@ -38,7 +41,42 @@ ...@@ -38,7 +41,42 @@
<ImageView <ImageView
android:id="@+id/operation_type" android:id="@+id/operation_type"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" /> android:layout_height="wrap_content"
android:layout_marginRight="10dp" />
<TextView
android:id="@+id/report_count_not_started"
android:layout_width="@dimen/report_status_width_2"
android:layout_height="@dimen/report_status_height"
android:layout_margin="2dp"
android:layout_gravity="center_vertical"
android:textColor="@color/basic_white1"
android:textSize="9pt"
android:gravity="center"
android:background="@color/marking_color_9"
/>
<TextView
android:id="@+id/report_count_working"
android:layout_width="@dimen/report_status_width_2"
android:layout_height="@dimen/report_status_height"
android:layout_margin="2dp"
android:layout_gravity="center_vertical"
android:textColor="@color/basic_white1"
android:textSize="9pt"
android:gravity="center"
android:background="@color/app_color"
/>
<TextView
android:id="@+id/report_count_completed"
android:layout_width="@dimen/report_status_width_2"
android:layout_height="@dimen/report_status_height"
android:layout_margin="2dp"
android:layout_gravity="center_vertical"
android:textColor="@color/basic_white1"
android:textSize="9pt"
android:gravity="center"
android:background="@color/marking_color_8"
/>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
...@@ -48,13 +86,6 @@ ...@@ -48,13 +86,6 @@
android:orientation="horizontal"> android:orientation="horizontal">
<ImageButton <ImageButton
android:id="@+id/btn_pano_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/ic_edit_panel"
android:visibility="invisible" />
<ImageButton
android:id="@+id/btn_sync" android:id="@+id/btn_sync"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="report_status_width_1">56dp</dimen>
<dimen name="report_status_width_2">48dp</dimen>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="report_status_width_1">56dp</dimen>
<dimen name="report_status_width_2">48dp</dimen>
</resources>
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<dimen name="opeartion_title_text_size" /> <dimen name="opeartion_title_text_size" />
<dimen name="report_status_height">32dp</dimen>
<dimen name="report_status_width_1">48dp</dimen>
<dimen name="report_status_width_2">36dp</dimen>
</resources> </resources>
package jp.agentec.abook.abv.ui.home.adapter; package jp.agentec.abook.abv.ui.home.adapter;
import android.os.AsyncTask;
import android.view.View;
import android.widget.BaseAdapter; import android.widget.BaseAdapter;
import android.widget.ImageView;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import jp.agentec.abook.abv.bl.data.ABVDataCache;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao; import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.ContentDao; import jp.agentec.abook.abv.bl.data.dao.ContentDao;
import jp.agentec.abook.abv.bl.dto.OperationDto; import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.launcher.android.R;
/** /**
* Created by leej on 2019/03/06. * Created by leej on 2019/03/06.
...@@ -24,8 +19,6 @@ public abstract class AbstractOperationAdapter extends BaseAdapter { ...@@ -24,8 +19,6 @@ public abstract class AbstractOperationAdapter extends BaseAdapter {
protected ContentDao mContentDao = AbstractDao.getDao(ContentDao.class); protected ContentDao mContentDao = AbstractDao.getDao(ContentDao.class);
public interface AbstractOperationListAdapterListener { public interface AbstractOperationListAdapterListener {
// 360編集
void onPanoEdit(OperationDto operationDto);
// 同期処理 // 同期処理
void onSyncOperation(OperationDto OperationDto); void onSyncOperation(OperationDto OperationDto);
// 報告・パノラマ画像登録画面の表示 // 報告・パノラマ画像登録画面の表示
......
...@@ -71,9 +71,6 @@ public class OperationListAdapter extends AbstractOperationAdapter { ...@@ -71,9 +71,6 @@ public class OperationListAdapter extends AbstractOperationAdapter {
// 作業ベースタイプ // 作業ベースタイプ
holder.ivOperationType = convertView.findViewById(R.id.operation_type); holder.ivOperationType = convertView.findViewById(R.id.operation_type);
// 360編集関連
holder.ivPanoEdit = convertView.findViewById(R.id.btn_pano_edit);
// 情報更新関連 // 情報更新関連
holder.ivSync = convertView.findViewById(R.id.btn_sync); holder.ivSync = convertView.findViewById(R.id.btn_sync);
...@@ -126,27 +123,6 @@ public class OperationListAdapter extends AbstractOperationAdapter { ...@@ -126,27 +123,6 @@ public class OperationListAdapter extends AbstractOperationAdapter {
holder.ivSync.setVisibility(View.INVISIBLE); holder.ivSync.setVisibility(View.INVISIBLE);
} }
if(operationDto.operationType == OperationType.PANO) {
if (operationDto.enableReportEdit == Constant.EnableReportEdit.NO) {
holder.ivPanoEdit.setVisibility(View.INVISIBLE);
} else {
// 360タイプのみ360編集ボタン表示
holder.ivPanoEdit.setVisibility(View.VISIBLE);
if (operationDto.contentCreatingFlg) { //Panoコンテンツ作成中の状態
holder.ivPanoEdit.setVisibility(View.INVISIBLE);
holder.ivSync.setVisibility(View.INVISIBLE);
} else {
if (operationDto.contentId == null || operationDto.contentId != 0) {
holder.ivPanoEdit.setVisibility(View.VISIBLE);
} else {
holder.ivPanoEdit.setVisibility(View.INVISIBLE);
}
}
}
} else {
holder.ivPanoEdit.setVisibility(View.INVISIBLE);
}
// 全体のレイアウト(ボタン以外)のタップ処理 // 全体のレイアウト(ボタン以外)のタップ処理
holder.listLayout.setOnClickListener(new View.OnClickListener() { holder.listLayout.setOnClickListener(new View.OnClickListener() {
@Override @Override
...@@ -154,13 +130,6 @@ public class OperationListAdapter extends AbstractOperationAdapter { ...@@ -154,13 +130,6 @@ public class OperationListAdapter extends AbstractOperationAdapter {
listener.openReport(operationDto); listener.openReport(operationDto);
} }
}); });
// 360編集ボタンのタップイベント
holder.ivPanoEdit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
listener.onPanoEdit(operationDto);
}
});
// 同期ボタンのタップイベント // 同期ボタンのタップイベント
holder.ivSync.setOnClickListener(new View.OnClickListener() { holder.ivSync.setOnClickListener(new View.OnClickListener() {
@Override @Override
...@@ -182,8 +151,6 @@ public class OperationListAdapter extends AbstractOperationAdapter { ...@@ -182,8 +151,6 @@ public class OperationListAdapter extends AbstractOperationAdapter {
ImageView ivReportType; ImageView ivReportType;
ImageView ivOperationType; ImageView ivOperationType;
// 360編集関連
ImageView ivPanoEdit;
// 情報更新関連 // 情報更新関連
ImageView ivSync; ImageView ivSync;
......
...@@ -11,7 +11,6 @@ import android.widget.TextView; ...@@ -11,7 +11,6 @@ import android.widget.TextView;
import java.util.List; import java.util.List;
import jp.agentec.abook.abv.bl.acms.type.OperationType; import jp.agentec.abook.abv.bl.acms.type.OperationType;
import jp.agentec.abook.abv.bl.common.Constant;
import jp.agentec.abook.abv.bl.common.Constant.ReportType; import jp.agentec.abook.abv.bl.common.Constant.ReportType;
import jp.agentec.abook.abv.bl.dto.OperationDto; import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.launcher.android.R; import jp.agentec.abook.abv.launcher.android.R;
...@@ -81,14 +80,14 @@ public class OperationPanelAdapter extends AbstractOperationAdapter { ...@@ -81,14 +80,14 @@ public class OperationPanelAdapter extends AbstractOperationAdapter {
ImageView ivReportType; ImageView ivReportType;
ImageView ivOperationType; ImageView ivOperationType;
// パンネルのレイアウト // パンネルのレイアウト
LinearLayout panelLayout; LinearLayout panelLayout;
// 360編集関連
ImageView ivPanoEdit;
// 同期関連 // 同期関連
ImageView ivSync; ImageView ivSync;
// ステータス別作業数
TextView reportCountNotStarted;
TextView reportCountWorking;
TextView reportCountCompleted;
} }
@Override @Override
...@@ -106,12 +105,14 @@ public class OperationPanelAdapter extends AbstractOperationAdapter { ...@@ -106,12 +105,14 @@ public class OperationPanelAdapter extends AbstractOperationAdapter {
// 作業ベースタイプ // 作業ベースタイプ
holder.ivOperationType = convertView.findViewById(R.id.operation_type); holder.ivOperationType = convertView.findViewById(R.id.operation_type);
// 360編集関連
holder.ivPanoEdit = convertView.findViewById(R.id.btn_pano_edit);
// 同期関連 // 同期関連
holder.ivSync = convertView.findViewById(R.id.btn_sync); holder.ivSync = convertView.findViewById(R.id.btn_sync);
// ステータス別作業数
holder.reportCountNotStarted = convertView.findViewById(R.id.report_count_not_started);
holder.reportCountWorking = convertView.findViewById(R.id.report_count_working);
holder.reportCountCompleted = convertView.findViewById(R.id.report_count_completed);
convertView.setTag(holder); convertView.setTag(holder);
} else { } else {
holder = (OperationPanelAdapter.ViewHolder) convertView.getTag(); holder = (OperationPanelAdapter.ViewHolder) convertView.getTag();
...@@ -154,25 +155,9 @@ public class OperationPanelAdapter extends AbstractOperationAdapter { ...@@ -154,25 +155,9 @@ public class OperationPanelAdapter extends AbstractOperationAdapter {
holder.ivSync.setVisibility(View.INVISIBLE); holder.ivSync.setVisibility(View.INVISIBLE);
} }
holder.reportCountNotStarted.setText(String.valueOf(operationDto.statusNotStartedCount));
if(operationDto.operationType == OperationType.PANO) { holder.reportCountWorking.setText(String.valueOf(operationDto.statusWorkingCount));
if (operationDto.enableReportEdit == Constant.EnableReportEdit.NO) { holder.reportCountCompleted.setText(String.valueOf(operationDto.statusCompletedCount));
holder.ivPanoEdit.setVisibility(View.INVISIBLE);
} else {
if (operationDto.contentCreatingFlg) { //Panoコンテンツ作成中の状態
holder.ivPanoEdit.setVisibility(View.INVISIBLE);
holder.ivSync.setVisibility(View.INVISIBLE);
} else {
if (operationDto.contentId != null && operationDto.contentId != 0) {
holder.ivPanoEdit.setVisibility(View.VISIBLE);
} else {
holder.ivPanoEdit.setVisibility(View.INVISIBLE);
}
}
}
} else {
holder.ivPanoEdit.setVisibility(View.INVISIBLE);
}
// 全体のレイアウト(ボタン以外)のタップ処理 // 全体のレイアウト(ボタン以外)のタップ処理
holder.panelLayout.setOnClickListener(new View.OnClickListener() { holder.panelLayout.setOnClickListener(new View.OnClickListener() {
...@@ -182,13 +167,6 @@ public class OperationPanelAdapter extends AbstractOperationAdapter { ...@@ -182,13 +167,6 @@ public class OperationPanelAdapter extends AbstractOperationAdapter {
} }
}); });
// 360編集ボタンのタップイベント
holder.ivPanoEdit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
listener.onPanoEdit(operationDto);
}
});
// 同期ボタンのタップイベント // 同期ボタンのタップイベント
holder.ivSync.setOnClickListener(new View.OnClickListener() { holder.ivSync.setOnClickListener(new View.OnClickListener() {
@Override @Override
......
...@@ -163,12 +163,6 @@ public abstract class OperationListHelper { ...@@ -163,12 +163,6 @@ public abstract class OperationListHelper {
} }
@Override @Override
public void onPanoEdit(OperationDto operationDto) {
// 360編集処理
mAppActivity.startPanoEdit(operationDto);
}
@Override
public void onSyncOperation(final OperationDto operationDto) { public void onSyncOperation(final OperationDto operationDto) {
// 同期処理 // 同期処理
mAppActivity.startSyncOperation(operationDto); mAppActivity.startSyncOperation(operationDto);
...@@ -231,12 +225,6 @@ public abstract class OperationListHelper { ...@@ -231,12 +225,6 @@ public abstract class OperationListHelper {
} }
@Override @Override
public void onPanoEdit(OperationDto operationDto) {
// 360編集処理
mAppActivity.startPanoEdit(operationDto);
}
@Override
public void onSyncOperation(final OperationDto operationDto) { public void onSyncOperation(final OperationDto operationDto) {
// 同期処理 // 同期処理
mAppActivity.startSyncOperation(operationDto); mAppActivity.startSyncOperation(operationDto);
......
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