Commit 972748e7 by Kazuyuki Hida

ステータス別作業数のリスト表示を実装した

parent 85ca0555
......@@ -66,10 +66,49 @@
android:textSize="@dimen/operation_date_text_size" />
</LinearLayout>
<Space
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<TextView
android:id="@+id/report_count_not_started"
android:layout_width="@dimen/report_status_width_1"
android:layout_height="@dimen/report_status_height_1"
android:layout_margin="4dp"
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_1"
android:layout_height="@dimen/report_status_height_1"
android:layout_margin="4dp"
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_1"
android:layout_height="@dimen/report_status_height_1"
android:layout_margin="4dp"
android:layout_gravity="center_vertical"
android:textColor="@color/basic_white1"
android:textSize="9pt"
android:gravity="center"
android:background="@color/marking_color_8"
/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:layout_marginRight="20dp"
android:orientation="horizontal">
<ImageButton
......
......@@ -44,11 +44,23 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginRight="10dp" />
</LinearLayout>
<Space
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal"
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_height="@dimen/report_status_height_2"
android:layout_margin="2dp"
android:layout_gravity="center_vertical"
android:textColor="@color/basic_white1"
......@@ -59,7 +71,7 @@
<TextView
android:id="@+id/report_count_working"
android:layout_width="@dimen/report_status_width_2"
android:layout_height="@dimen/report_status_height"
android:layout_height="@dimen/report_status_height_2"
android:layout_margin="2dp"
android:layout_gravity="center_vertical"
android:textColor="@color/basic_white1"
......@@ -70,7 +82,7 @@
<TextView
android:id="@+id/report_count_completed"
android:layout_width="@dimen/report_status_width_2"
android:layout_height="@dimen/report_status_height"
android:layout_height="@dimen/report_status_height_2"
android:layout_margin="2dp"
android:layout_gravity="center_vertical"
android:textColor="@color/basic_white1"
......@@ -78,12 +90,8 @@
android:gravity="center"
android:background="@color/marking_color_8"
/>
</LinearLayout>
<Space
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
......
......@@ -17,7 +17,7 @@
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:layout_weight="1"
......@@ -40,6 +40,7 @@
android:id="@+id/operation_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:maxLines="2"
android:ellipsize="end"
android:text="@string/dummy_str"
......@@ -73,6 +74,48 @@
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:layout_marginRight="10dp"
android:orientation="vertical">
<TextView
android:id="@+id/report_count_not_started"
android:layout_width="@dimen/report_status_width_2"
android:layout_height="@dimen/report_status_height_3"
android:layout_margin="2dp"
android:layout_gravity="center_vertical"
android:textColor="@color/basic_white1"
android:textSize="8pt"
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_3"
android:layout_margin="2dp"
android:layout_gravity="center_vertical"
android:textColor="@color/basic_white1"
android:textSize="8pt"
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_3"
android:layout_margin="2dp"
android:layout_gravity="center_vertical"
android:textColor="@color/basic_white1"
android:textSize="8pt"
android:gravity="center"
android:background="@color/marking_color_8"
/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
......
......@@ -47,7 +47,7 @@
<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_height="@dimen/report_status_height_2"
android:layout_margin="2dp"
android:layout_gravity="center_vertical"
android:textColor="@color/basic_white1"
......@@ -58,7 +58,7 @@
<TextView
android:id="@+id/report_count_working"
android:layout_width="@dimen/report_status_width_2"
android:layout_height="@dimen/report_status_height"
android:layout_height="@dimen/report_status_height_2"
android:layout_margin="2dp"
android:layout_gravity="center_vertical"
android:textColor="@color/basic_white1"
......@@ -69,7 +69,7 @@
<TextView
android:id="@+id/report_count_completed"
android:layout_width="@dimen/report_status_width_2"
android:layout_height="@dimen/report_status_height"
android:layout_height="@dimen/report_status_height_2"
android:layout_margin="2dp"
android:layout_gravity="center_vertical"
android:textColor="@color/basic_white1"
......
<?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"?>
<resources>
<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_height_1">48dp</dimen>
<dimen name="report_status_height_2">32dp</dimen>
<dimen name="report_status_height_3">24dp</dimen>
<dimen name="report_status_width_1">80dp</dimen>
<dimen name="report_status_width_2">36dp</dimen>
</resources>
......@@ -74,6 +74,11 @@ public class OperationListAdapter extends AbstractOperationAdapter {
// 情報更新関連
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);
} else {
holder = (ViewHolder) convertView.getTag();
......@@ -123,6 +128,10 @@ public class OperationListAdapter extends AbstractOperationAdapter {
holder.ivSync.setVisibility(View.INVISIBLE);
}
holder.reportCountNotStarted.setText(String.valueOf(operationDto.statusNotStartedCount));
holder.reportCountWorking.setText(String.valueOf(operationDto.statusWorkingCount));
holder.reportCountCompleted.setText(String.valueOf(operationDto.statusCompletedCount));
// 全体のレイアウト(ボタン以外)のタップ処理
holder.listLayout.setOnClickListener(new View.OnClickListener() {
@Override
......@@ -154,6 +163,11 @@ public class OperationListAdapter extends AbstractOperationAdapter {
// 情報更新関連
ImageView ivSync;
// ステータス別作業数
TextView reportCountNotStarted;
TextView reportCountWorking;
TextView reportCountCompleted;
}
......
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