Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abook_check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_android
abook_check
Commits
60419936
Commit
60419936
authored
Mar 06, 2019
by
Lee Jaebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#32706 作業一覧画面改善(パンネル・リストビューの切り替え表示)
parent
8fb0a434
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
706 additions
and
44 deletions
+706
-44
ABVJE_Res_Default_Android/res/drawable/operation_panel_frame.xml
+13
-0
ABVJE_Res_Default_Android/res/drawable/panel_frame.xml
+13
-0
ABVJE_UI_Android/res/layout-large/ac_operation_list.xml
+3
-2
ABVJE_UI_Android/res/layout/item_operation_list_panel_render.xml
+187
-0
ABVJE_UI_Android/res/values/ids.xml
+5
-0
ABVJE_UI_Android/src/com/handmark/pulltorefresh/library/PullToRefreshGridView.java
+105
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/appinfo/AppDefType.java
+5
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
+0
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/adapter/AbstractOperationListAdapter.java
+109
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/adapter/OperationListAdapter.java
+38
-42
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/adapter/OperationListPanelAdapter.java
+197
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/AbstractOperationListHelper.java
+31
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/OperationListHelper.java
+0
-0
No files found.
ABVJE_Res_Default_Android/res/drawable/operation_panel_frame.xml
0 → 100644
View file @
60419936
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item>
<shape>
<solid
android:color=
"#ffffff"
/>
<stroke
android:width=
"1px"
android:color=
"#cccccc"
/>
</shape>
</item>
</selector>
\ No newline at end of file
ABVJE_Res_Default_Android/res/drawable/panel_frame.xml
0 → 100644
View file @
60419936
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item>
<shape>
<solid
android:color=
"#ffffff"
/>
<stroke
android:width=
"1px"
android:color=
"#cccccc"
/>
</shape>
</item>
</selector>
\ No newline at end of file
ABVJE_UI_Android/res/layout-large/ac_operation_list.xml
View file @
60419936
...
@@ -101,8 +101,9 @@
...
@@ -101,8 +101,9 @@
android:onClick=
"onClickShowHelpView"
/>
android:onClick=
"onClickShowHelpView"
/>
</RelativeLayout>
</RelativeLayout>
<com.handmark.pulltorefresh.library.PullToRefreshListView
<FrameLayout
android:id=
"@+id/operationListView"
android:id=
"@+id/contents_list_layout"
style=
"@style/content_list_bg"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
android:layout_height=
"match_parent"
/>
...
...
ABVJE_UI_Android/res/layout/item_operation_list_panel_render.xml
0 → 100644
View file @
60419936
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/root"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"10dp"
android:layout_marginLeft=
"10dp"
android:layout_marginRight=
"10dp"
android:background=
"@drawable/panel_frame"
android:orientation=
"vertical"
android:paddingLeft=
"10dp"
android:paddingRight=
"10dp"
android:paddingTop=
"10dp"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/content_submenu_button"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:contentDescription=
"@string/content_description"
android:text=
"TaskName"
/>
</LinearLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:padding=
"5dp"
>
<FrameLayout
android:id=
"@+id/frameLayout1"
android:layout_width=
"@dimen/content_panel_image_size_width"
android:layout_height=
"@dimen/content_panel_image_size_height"
android:layout_alignParentLeft=
"true"
android:layout_centerVertical=
"true"
android:layout_marginBottom=
"10dp"
android:layout_marginRight=
"10dp"
>
<RelativeLayout
android:id=
"@+id/content_thumbnail_layout"
android:layout_width=
"@dimen/content_panel_image_size_width"
android:layout_height=
"@dimen/content_panel_image_size_height"
android:layout_gravity=
"center"
>
<ImageButton
android:id=
"@+id/btn_information_update1"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_centerHorizontal=
"true"
android:background=
"@drawable/btn_information_update"
/>
</RelativeLayout>
</FrameLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_alignParentTop=
"true"
android:layout_toRightOf=
"@+id/frameLayout1"
android:layout_centerInParent=
"true"
android:orientation=
"vertical"
android:paddingBottom=
"10dp"
>
<LinearLayout
android:id=
"@+id/content_size_layout"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_marginBottom=
"10dp"
android:layout_marginTop=
"10dp"
android:layout_weight=
"2"
android:background=
"#dce6e6"
android:orientation=
"vertical"
android:padding=
"3dp"
>
<TextView
android:id=
"@+id/content_size"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:ellipsize=
"end"
android:maxLines=
"1"
android:text=
"@string/dummy_num"
android:textColor=
"@color/text_select"
android:textSize=
"18sp"
/>
<TextView
android:id=
"@+id/content_delivery_date"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:minLines=
"2"
android:text=
"@string/dummy_date"
android:textColor=
"@color/text_select"
android:textSize=
"15sp"
/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
<LinearLayout
android:id=
"@+id/button_layout"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#e6e6e6"
android:orientation=
"horizontal"
android:padding=
"5dp"
android:visibility=
"visible"
>
<LinearLayout
android:id=
"@+id/edit_layout"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:background=
"#e6e6e6"
android:gravity=
"center"
android:orientation=
"horizontal"
android:padding=
"5dp"
android:visibility=
"visible"
>
<LinearLayout
android:id=
"@+id/layout_pano_edit"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"10dp"
android:orientation=
"vertical"
android:visibility=
"visible"
>
<ImageView
android:id=
"@+id/btn_pano_edit"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/btn_pano_edit"
/>
<TextView
android:id=
"@+id/txt_pano_edit"
style=
"@style/ProjectIconText"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/pano_edit"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id=
"@+id/update_layout"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:background=
"#e6e6e6"
android:gravity=
"center"
android:orientation=
"horizontal"
android:padding=
"5dp"
android:visibility=
"visible"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"10dp"
android:orientation=
"vertical"
>
<ImageButton
android:id=
"@+id/btn_information_update"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/btn_information_update"
/>
<TextView
android:id=
"@+id/txt_information_update"
style=
"@style/ProjectIconText"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/information_update"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
ABVJE_UI_Android/res/values/ids.xml
0 → 100644
View file @
60419936
<?xml version="1.0" encoding="utf-8"?>
<resources>
<item
name=
"gridview"
type=
"id"
/>
</resources>
\ No newline at end of file
ABVJE_UI_Android/src/com/handmark/pulltorefresh/library/PullToRefreshGridView.java
0 → 100644
View file @
60419936
/*******************************************************************************
* Copyright 2011, 2012 Chris Banes.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/
package
com
.
handmark
.
pulltorefresh
.
library
;
import
android.annotation.TargetApi
;
import
android.content.Context
;
import
android.os.Build.VERSION
;
import
android.os.Build.VERSION_CODES
;
import
android.util.AttributeSet
;
import
android.view.View
;
import
android.widget.GridView
;
import
com.handmark.pulltorefresh.library.internal.EmptyViewMethodAccessor
;
import
jp.agentec.abook.abv.launcher.android.R
;
public
class
PullToRefreshGridView
extends
PullToRefreshAdapterViewBase
<
GridView
>
{
public
PullToRefreshGridView
(
Context
context
)
{
super
(
context
);
}
public
PullToRefreshGridView
(
Context
context
,
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
}
public
PullToRefreshGridView
(
Context
context
,
Mode
mode
)
{
super
(
context
,
mode
);
}
public
PullToRefreshGridView
(
Context
context
,
Mode
mode
,
AnimationStyle
style
)
{
super
(
context
,
mode
,
style
);
}
@Override
public
final
Orientation
getPullToRefreshScrollDirection
()
{
return
Orientation
.
VERTICAL
;
}
@Override
protected
final
GridView
createRefreshableView
(
Context
context
,
AttributeSet
attrs
)
{
final
GridView
gv
;
if
(
VERSION
.
SDK_INT
>=
VERSION_CODES
.
GINGERBREAD
)
{
gv
=
new
InternalGridViewSDK9
(
context
,
attrs
);
}
else
{
gv
=
new
InternalGridView
(
context
,
attrs
);
}
// Use Generated ID (from res/values/ids.xml)
gv
.
setId
(
R
.
id
.
gridview
);
return
gv
;
}
class
InternalGridView
extends
GridView
implements
EmptyViewMethodAccessor
{
public
InternalGridView
(
Context
context
,
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
}
@Override
public
void
setEmptyView
(
View
emptyView
)
{
PullToRefreshGridView
.
this
.
setEmptyView
(
emptyView
);
}
@Override
public
void
setEmptyViewInternal
(
View
emptyView
)
{
super
.
setEmptyView
(
emptyView
);
}
}
@TargetApi
(
9
)
final
class
InternalGridViewSDK9
extends
InternalGridView
{
public
InternalGridViewSDK9
(
Context
context
,
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
}
@Override
protected
boolean
overScrollBy
(
int
deltaX
,
int
deltaY
,
int
scrollX
,
int
scrollY
,
int
scrollRangeX
,
int
scrollRangeY
,
int
maxOverScrollX
,
int
maxOverScrollY
,
boolean
isTouchEvent
)
{
final
boolean
returnValue
=
super
.
overScrollBy
(
deltaX
,
deltaY
,
scrollX
,
scrollY
,
scrollRangeX
,
scrollRangeY
,
maxOverScrollX
,
maxOverScrollY
,
isTouchEvent
);
// Does all of the hard work...
OverscrollHelper
.
overScrollBy
(
PullToRefreshGridView
.
this
,
deltaX
,
scrollX
,
deltaY
,
scrollY
,
isTouchEvent
);
return
returnValue
;
}
}
}
\ No newline at end of file
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/appinfo/AppDefType.java
View file @
60419936
...
@@ -6,6 +6,11 @@ public interface AppDefType {
...
@@ -6,6 +6,11 @@ public interface AppDefType {
interface
PrefName
{
interface
PrefName
{
String
USER_PREFERENCE
=
"user_info"
;
String
USER_PREFERENCE
=
"user_info"
;
}
}
interface
ViewMode
{
int
PANEL
=
0
;
int
LIST
=
1
;
}
interface
DefPrefKey
{
interface
DefPrefKey
{
String
REPEATABLE_PLAY
=
"repeatablePlay"
;
String
REPEATABLE_PLAY
=
"repeatablePlay"
;
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
View file @
60419936
This diff is collapsed.
Click to expand it.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/adapter/AbstractOperationListAdapter.java
0 → 100644
View file @
60419936
package
jp
.
agentec
.
abook
.
abv
.
ui
.
home
.
adapter
;
import
android.os.AsyncTask
;
import
android.view.View
;
import
android.widget.BaseAdapter
;
import
android.widget.ImageView
;
import
java.util.ArrayList
;
import
java.util.List
;
import
jp.agentec.abook.abv.bl.dto.OperationDto
;
import
jp.agentec.abook.abv.launcher.android.R
;
/**
* Created by leej on 2019/03/06.
*/
public
abstract
class
AbstractOperationListAdapter
extends
BaseAdapter
{
protected
AbstractOperationListAdapterListener
listener
;
protected
List
<
OperationDto
>
listItem
=
new
ArrayList
<>();
// NullPointException防止
public
boolean
isEditMode
;
public
interface
AbstractOperationListAdapterListener
{
boolean
onContentDownload
(
long
contentId
);
void
onContentDownloadPause
(
long
contentId
);
void
onContentDownloadResume
(
OperationDto
OperationDto
);
void
onOpenContentView
(
long
contentId
);
void
onOpenContentSubmenu
(
OperationDto
OperationDto
);
void
onContentChecked
();
}
@Override
public
int
getCount
()
{
return
listItem
.
size
();
}
@Override
public
OperationDto
getItem
(
int
position
)
{
return
listItem
.
get
(
position
);
}
@Override
public
long
getItemId
(
int
position
)
{
return
listItem
.
get
(
position
).
contentId
;
}
public
void
setItem
(
List
<
OperationDto
>
listItem
)
{
this
.
listItem
=
listItem
;
notifyDataSetChanged
();
}
public
void
setAdapterListener
(
AbstractOperationListAdapterListener
listener
)
{
this
.
listener
=
listener
;
}
protected
class
OnDownloadPauseButtonClickListener
implements
View
.
OnClickListener
{
private
OperationDto
OperationDto
;
public
OnDownloadPauseButtonClickListener
(
OperationDto
OperationDto
)
{
this
.
OperationDto
=
OperationDto
;
}
@Override
public
void
onClick
(
View
v
)
{
AsyncTask
<
Params
,
Void
,
Void
>
task
=
new
AsyncTask
<
Params
,
Void
,
Void
>()
{
@Override
protected
Void
doInBackground
(
Params
...
params
)
{
listener
.
onContentDownloadPause
(
params
[
0
].
contentId
);
return
null
;
}
};
Params
params
=
new
Params
();
params
.
contentId
=
OperationDto
.
contentId
;
task
.
execute
(
params
);
}
}
protected
class
OnDownloadResumeButtonClickListener
implements
View
.
OnClickListener
{
private
OperationDto
OperationDto
;
public
OnDownloadResumeButtonClickListener
(
OperationDto
OperationDto
)
{
this
.
OperationDto
=
OperationDto
;
}
@Override
public
void
onClick
(
View
v
)
{
// ダウンロード登録に時間がかかるので非同期処理で実行
AsyncTask
<
Params
,
Void
,
Void
>
task
=
new
AsyncTask
<
Params
,
Void
,
Void
>()
{
@Override
protected
Void
doInBackground
(
Params
...
params
)
{
listener
.
onContentDownloadResume
(
OperationDto
);
return
null
;
}
};
Params
params
=
new
Params
();
params
.
contentId
=
OperationDto
.
contentId
;
task
.
execute
(
params
);
}
}
}
class
Params
{
long
contentId
;
}
class
Result
{
boolean
result
;
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/adapter/OperationListAdapter.java
View file @
60419936
...
@@ -26,6 +26,7 @@ import jp.agentec.abook.abv.bl.logic.AbstractLogic;
...
@@ -26,6 +26,7 @@ import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import
jp.agentec.abook.abv.bl.logic.OperationLogic
;
import
jp.agentec.abook.abv.bl.logic.OperationLogic
;
import
jp.agentec.abook.abv.launcher.android.R
;
import
jp.agentec.abook.abv.launcher.android.R
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType
;
import
jp.agentec.abook.abv.ui.home.activity.OperationListActivity
;
import
jp.agentec.adf.util.DateTimeFormat
;
import
jp.agentec.adf.util.DateTimeFormat
;
import
jp.agentec.adf.util.DateTimeUtil
;
import
jp.agentec.adf.util.DateTimeUtil
;
import
jp.agentec.adf.util.StringUtil
;
import
jp.agentec.adf.util.StringUtil
;
...
@@ -36,11 +37,11 @@ import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
...
@@ -36,11 +37,11 @@ import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
* Created by leej on 2018/08/17.
* Created by leej on 2018/08/17.
*/
*/
public
class
OperationListAdapter
extends
Base
Adapter
{
public
class
OperationListAdapter
extends
AbstractOperationList
Adapter
{
private
static
final
String
TAG
=
"OperationListAdapter"
;
private
static
final
String
TAG
=
"OperationListAdapter"
;
private
Context
mContext
;
private
Context
mContext
;
private
LayoutInflater
mInflater
;
private
LayoutInflater
mInflater
;
private
OperationListAdapter
.
OperationAdapterListener
listener
;
//
private OperationListAdapter.OperationAdapterListener listener;
private
List
<
OperationDto
>
mListItem
=
new
ArrayList
<>();
private
List
<
OperationDto
>
mListItem
=
new
ArrayList
<>();
private
ContentDao
mContentDao
=
AbstractDao
.
getDao
(
ContentDao
.
class
);
private
ContentDao
mContentDao
=
AbstractDao
.
getDao
(
ContentDao
.
class
);
private
int
mOperationAuthLevel
=
ABVDataCache
.
getInstance
().
getMemberInfo
().
operationAuthLevel
;
private
int
mOperationAuthLevel
=
ABVDataCache
.
getInstance
().
getMemberInfo
().
operationAuthLevel
;
...
@@ -48,10 +49,10 @@ public class OperationListAdapter extends BaseAdapter {
...
@@ -48,10 +49,10 @@ public class OperationListAdapter extends BaseAdapter {
private
OperationLogic
mOperationLogic
=
AbstractLogic
.
getLogic
(
OperationLogic
.
class
);
private
OperationLogic
mOperationLogic
=
AbstractLogic
.
getLogic
(
OperationLogic
.
class
);
private
boolean
mNormalSizeFlg
;
private
boolean
mNormalSizeFlg
;
public
OperationListAdapter
(
Context
context
,
List
<
OperationDto
>
listItem
,
boolean
isNormalSize
)
{
public
OperationListAdapter
(
Context
context
,
List
<
OperationDto
>
listItem
)
{
mContext
=
context
;
mContext
=
context
;
mListItem
=
listItem
;
mListItem
=
listItem
;
mNormalSizeFlg
=
isNormalSize
;
mNormalSizeFlg
=
((
OperationListActivity
)
context
).
isNormalSize
()
;
mInflater
=
(
LayoutInflater
)
context
.
getSystemService
(
Context
.
LAYOUT_INFLATER_SERVICE
);
mInflater
=
(
LayoutInflater
)
context
.
getSystemService
(
Context
.
LAYOUT_INFLATER_SERVICE
);
}
}
public
List
<
OperationDto
>
getData
()
{
public
List
<
OperationDto
>
getData
()
{
...
@@ -72,11 +73,6 @@ public class OperationListAdapter extends BaseAdapter {
...
@@ -72,11 +73,6 @@ public class OperationListAdapter extends BaseAdapter {
return
mListItem
.
get
(
position
).
operationId
;
return
mListItem
.
get
(
position
).
operationId
;
}
}
public
void
setItem
(
List
<
OperationDto
>
listItem
)
{
mListItem
=
listItem
;
notifyDataSetChanged
();
}
public
interface
OperationAdapterListener
{
public
interface
OperationAdapterListener
{
void
onPanoEdit
(
OperationDto
operationDto
);
void
onPanoEdit
(
OperationDto
operationDto
);
...
@@ -90,7 +86,7 @@ public class OperationListAdapter extends BaseAdapter {
...
@@ -90,7 +86,7 @@ public class OperationListAdapter extends BaseAdapter {
}
}
public
void
setAdapterListener
(
OperationAdapterListener
listener
)
{
public
void
setAdapterListener
(
OperationAdapterListener
listener
)
{
this
.
listener
=
listener
;
//
this.listener = listener;
}
}
@Override
@Override
...
@@ -214,38 +210,38 @@ public class OperationListAdapter extends BaseAdapter {
...
@@ -214,38 +210,38 @@ public class OperationListAdapter extends BaseAdapter {
holder
.
lyPanoEditLayout
.
setVisibility
(
View
.
GONE
);
holder
.
lyPanoEditLayout
.
setVisibility
(
View
.
GONE
);
}
}
holder
.
ivPanoEdit
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
//
holder.ivPanoEdit.setOnClickListener(new View.OnClickListener() {
@Override
//
@Override
public
void
onClick
(
View
v
)
{
//
public void onClick(View v) {
listener
.
onPanoEdit
(
operationDto
);
//
listener.onPanoEdit(operationDto);
}
//
}
});
//
});
//
holder
.
ivInformationUpdate
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
//
holder.ivInformationUpdate.setOnClickListener(new View.OnClickListener() {
@Override
//
@Override
public
void
onClick
(
View
v
)
{
//
public void onClick(View v) {
listener
.
onSyncOperation
(
operationDto
);
//
listener.onSyncOperation(operationDto);
}
//
}
});
//
});
//
holder
.
ivWork
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
//
holder.ivWork.setOnClickListener(new View.OnClickListener() {
@Override
//
@Override
public
void
onClick
(
View
v
)
{
//
public void onClick(View v) {
if
(
operationDto
.
contentId
!=
null
&&
operationDto
.
contentId
!=
0
)
{
//
if(operationDto.contentId != null && operationDto.contentId != 0) {
listener
.
onOpenDirectionsOrReportView
(
operationDto
);
//
listener.onOpenDirectionsOrReportView(operationDto);
}
else
{
//
} else {
listener
.
onShowEntryPanoContentDialog
(
operationDto
);
//
listener.onShowEntryPanoContentDialog(operationDto);
}
//
}
}
//
}
});
//
});
//
holder
.
ivDocumentReference
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
//
holder.ivDocumentReference.setOnClickListener(new View.OnClickListener() {
@Override
//
@Override
public
void
onClick
(
View
v
)
{
//
public void onClick(View v) {
//
listener
.
onOpenRelatedContentList
(
operationDto
);
//
listener.onOpenRelatedContentList(operationDto);
}
//
}
});
//
});
checkRelatedContent
(
holder
,
operationDto
.
operationId
);
checkRelatedContent
(
holder
,
operationDto
.
operationId
);
}
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/adapter/OperationListPanelAdapter.java
0 → 100644
View file @
60419936
package
jp
.
agentec
.
abook
.
abv
.
ui
.
home
.
adapter
;
import
android.content.Context
;
import
android.graphics.Bitmap
;
import
android.graphics.drawable.BitmapDrawable
;
import
android.os.AsyncTask
;
import
android.os.Build
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.BaseAdapter
;
import
android.widget.Button
;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
import
android.widget.ProgressBar
;
import
android.widget.RelativeLayout
;
import
android.widget.TextView
;
import
java.text.DecimalFormat
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.concurrent.ConcurrentHashMap
;
import
jp.agentec.abook.abv.bl.common.ABVEnvironment
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.bl.data.ABVDataCache
;
import
jp.agentec.abook.abv.bl.data.dao.AbstractDao
;
import
jp.agentec.abook.abv.bl.dto.ContentDto
;
import
jp.agentec.abook.abv.bl.dto.OperationDto
;
import
jp.agentec.abook.abv.bl.logic.AbstractLogic
;
import
jp.agentec.abook.abv.bl.logic.ContractLogic
;
import
jp.agentec.abook.abv.cl.util.BitmapUtil
;
import
jp.agentec.abook.abv.launcher.android.R
;
import
jp.agentec.adf.util.DateTimeFormat
;
import
jp.agentec.adf.util.DateTimeUtil
;
/**
* Created by leej on 2019/03/06.
*/
public
class
OperationListPanelAdapter
extends
AbstractOperationListAdapter
{
final
private
String
TAG
=
"OperationListPanelAdapter"
;
private
Context
context
;
private
LayoutInflater
inflater
;
private
DecimalFormat
df
;
private
final
int
padding
;
private
int
categoryId
;
private
OperationListPanelAdapter
.
OperationListPanelAdapterListener
mListener
;
private
ConcurrentHashMap
<
Long
,
OperationListPanelAdapter
.
ViewHolder
>
viewHolderMap
;
public
interface
OperationListPanelAdapterListener
{
void
onPanoEdit
(
OperationDto
operationDto
);
void
onSyncOperation
(
OperationDto
operationDto
);
void
onOpenDirectionsOrReportView
(
OperationDto
operationDto
);
void
onOpenRelatedContentList
(
OperationDto
operationDto
);
void
onShowEntryPanoContentDialog
(
OperationDto
operationDto
);
}
public
OperationListPanelAdapter
(
Context
context
,
List
<
OperationDto
>
listItem
)
{
this
.
context
=
context
;
this
.
listItem
=
listItem
;
padding
=
(
int
)
(
4
f
*
context
.
getResources
().
getDisplayMetrics
().
density
+
0.5f
);
inflater
=
(
LayoutInflater
)
context
.
getSystemService
(
Context
.
LAYOUT_INFLATER_SERVICE
);
df
=
new
DecimalFormat
(
"#,##0.00"
);
viewHolderMap
=
new
ConcurrentHashMap
<>();
}
public
void
setAdapterListener
(
OperationListPanelAdapter
.
OperationListPanelAdapterListener
listener
)
{
this
.
mListener
=
listener
;
}
@Override
public
int
getCount
()
{
return
listItem
.
size
();
}
@Override
public
OperationDto
getItem
(
int
position
)
{
return
listItem
.
get
(
position
);
}
@Override
public
long
getItemId
(
int
position
)
{
return
listItem
.
get
(
position
).
contentId
;
}
public
List
<
OperationDto
>
getListItem
()
{
return
listItem
;
}
private
static
class
ViewHolder
{
long
contentId
;
TextView
tvGenreName
;
RelativeLayout
thumbnailLayout
;
TextView
tvContentId
;
TextView
tvLastDeliveryDate
;
TextView
tvNewContentMark
;
TextView
tvContentName
;
ImageView
ivThumbnail
;
ProgressBar
downloadProgressBar
;
LinearLayout
operationLayout
;
Button
btnSaveContent
;
Button
btnDeleteContent
;
Button
btnOpenContent
;
Button
btnUpdateContent
;
Button
btnPauseSave
;
Button
btnRestartSave
;
Button
btnCancelSave
;
}
@Override
public
View
getView
(
int
position
,
View
convertView
,
final
ViewGroup
parent
)
{
OperationListPanelAdapter
.
ViewHolder
holder
=
null
;
Logger
.
i
(
TAG
,
"OperationListPanelAdapter getView ......"
);
if
(
null
==
convertView
)
{
holder
=
new
OperationListPanelAdapter
.
ViewHolder
();
convertView
=
inflater
.
inflate
(
R
.
layout
.
item_operation_list_panel_render
,
null
);
convertView
.
setTag
(
holder
);
}
else
{
holder
=
(
OperationListPanelAdapter
.
ViewHolder
)
convertView
.
getTag
();
}
final
OperationDto
operationDto
=
getItem
(
position
);
// // コンテンツID
// holder.tvContentId.setText(context.getString(R.string.content_num) + " " + contentDto.contractContentId);
//
// // 最後の公開処理日
// String lastDeliveryDate = DateTimeUtil.toString(contentDto.lastDeliveryDate, DateTimeFormat.yyyyMMdd_slash);
// if (lastDeliveryDate != null) {
// holder.tvLastDeliveryDate.setText(lastDeliveryDate + " " + context.getString(R.string.content_update));
// }
//
// // コンテンツ名
// holder.tvContentName.setText(" " + contentDto.contentName);
//
// // サムネイル
// if (holder.ivThumbnail.getDrawable() != null) {
// ((BitmapDrawable) holder.ivThumbnail.getDrawable()).getBitmap().recycle();
// }
//
// Bitmap resized = BitmapUtil.getResizedBitmap(contentDto.thumbnailNormalPath, thumbnailSizeWidth, thumbnailSizeHeight, Bitmap.Config.RGB_565);
// // nullの場合サムネイルなしイメージを表示
// if (resized == null) {
// resized = BitmapUtil.getResizedBitmapResource(context.getResources(), R.drawable.not_exist_thumbnail, thumbnailSizeWidth, thumbnailSizeHeight, Bitmap.Config.RGB_565);
// }
// // レイアウトを画像サイズに合わせる
// ViewGroup.LayoutParams params = holder.thumbnailLayout.getLayoutParams();
// params.width = resized.getWidth() + padding;
// params.height = resized.getHeight() + padding;
// holder.ivThumbnail.setImageBitmap(resized);
//
//
// // 操作
// configureOperationButton(holder, contentDto);
holder
.
contentId
=
getItemId
(
position
);
viewHolderMap
.
put
(
operationDto
.
operationId
,
holder
);
return
convertView
;
}
public
void
configureOperationButton
(
final
OperationListPanelAdapter
.
ViewHolder
holder
,
final
ContentDto
contentDto
)
{
Logger
.
i
(
TAG
,
"configureOperationButton ......"
);
holder
.
tvNewContentMark
.
setVisibility
(
View
.
GONE
);
holder
.
operationLayout
.
setVisibility
(
View
.
VISIBLE
);
holder
.
btnSaveContent
.
setVisibility
(
View
.
GONE
);
holder
.
btnDeleteContent
.
setVisibility
(
View
.
GONE
);
holder
.
btnOpenContent
.
setVisibility
(
View
.
GONE
);
holder
.
btnUpdateContent
.
setVisibility
(
View
.
GONE
);
holder
.
btnPauseSave
.
setVisibility
(
View
.
GONE
);
holder
.
btnRestartSave
.
setVisibility
(
View
.
GONE
);
holder
.
btnCancelSave
.
setVisibility
(
View
.
GONE
);
}
class
Params
{
long
contentId
;
}
class
Result
{
boolean
result
;
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/AbstractOperationListHelper.java
0 → 100644
View file @
60419936
package
jp
.
agentec
.
abook
.
abv
.
ui
.
home
.
helper
;
import
android.view.ViewGroup
;
import
com.handmark.pulltorefresh.library.PullToRefreshListView
;
import
jp.agentec.abook.abv.ui.home.activity.OperationListActivity
;
/**
* Created by leej on 2019/03/06.
*/
public
abstract
class
AbstractOperationListHelper
{
protected
OperationListActivity
mAppActivity
;
public
AbstractOperationListHelper
(
OperationListActivity
activity
)
{
mAppActivity
=
activity
;
}
/**
* 表示するコンテンツリスト取得を実装するメソッド
* @return ViewGroup
*/
public
abstract
ViewGroup
getOperationList
();
/**
* 表示中のリストを再表示する
*/
public
abstract
void
refreshList
();
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/OperationListHelper.java
0 → 100644
View file @
60419936
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment