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
781669e0
Commit
781669e0
authored
Mar 17, 2021
by
onuma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
カテゴリ選択機能(タブレット)実装
parent
c976e02c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
0 deletions
+43
-0
ABVJE_UI_Android/res/layout-large/ac_operation_list.xml
+10
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
+33
-0
No files found.
ABVJE_UI_Android/res/layout-large/ac_operation_list.xml
View file @
781669e0
...
@@ -30,6 +30,16 @@
...
@@ -30,6 +30,16 @@
android:layout_toRightOf=
"@+id/btn_view_mode"
android:layout_toRightOf=
"@+id/btn_view_mode"
android:onClick=
"onClickOperationFilterList"
android:onClick=
"onClickOperationFilterList"
android:src=
"@drawable/ic_filter"
/>
android:src=
"@drawable/ic_filter"
/>
<!-- カテゴリ選択機能追加 -->
<ImageButton
android:id=
"@+id/btn_category_location"
style=
"@style/ToolBarIcon"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10dp"
android:layout_toRightOf=
"@+id/icon_filter"
android:onClick=
"onClickGroupLocationByTablet"
android:src=
"@drawable/ic_category_off"
/>
<!-- ここまで -->
<TextView
<TextView
android:id=
"@+id/title"
android:id=
"@+id/title"
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
View file @
781669e0
...
@@ -12,6 +12,7 @@ import android.net.Uri;
...
@@ -12,6 +12,7 @@ import android.net.Uri;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.provider.MediaStore
;
import
android.provider.MediaStore
;
import
android.util.SparseBooleanArray
;
import
android.util.SparseBooleanArray
;
import
android.view.Gravity
;
import
android.view.KeyEvent
;
import
android.view.KeyEvent
;
import
android.view.View
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.ViewGroup
;
...
@@ -2269,4 +2270,36 @@ public class OperationListActivity extends ABVUIActivity {
...
@@ -2269,4 +2270,36 @@ public class OperationListActivity extends ABVUIActivity {
private
boolean
isSearched
()
{
private
boolean
isSearched
()
{
return
!(
StringUtil
.
isNullOrEmpty
(
mSearchWord
)
&&
StringUtil
.
isNullOrEmpty
(
mStartDateStr
)
&&
StringUtil
.
isNullOrEmpty
(
mEndDateStr
));
return
!(
StringUtil
.
isNullOrEmpty
(
mSearchWord
)
&&
StringUtil
.
isNullOrEmpty
(
mStartDateStr
)
&&
StringUtil
.
isNullOrEmpty
(
mEndDateStr
));
}
}
/**
* 全て・カテゴリ選択画面(タブレット)
*
* @param anchor
*/
public
void
onClickGroupLocationByTablet
(
final
View
anchor
)
{
Logger
.
d
(
TAG
,
"onClickGroupLocationByTablet start"
);
final
ABVPopupListWindow
popup
=
new
ABVPopupListWindow
(
this
,
R
.
layout
.
popup_simple_list
);
popup
.
setTitle
(
getRString
(
R
.
string
.
category_list
));
popup
.
setWidth
(
getRDimensionSize
(
R
.
dimen
.
popup_size_large
));
// 表示するコンテンツタイプのリストを作成
ListView
listView
=
popup
.
getListView
();
ArrayAdapter
<
String
>
adapter
=
new
ArrayAdapter
<
String
>(
this
,
R
.
layout
.
item_dialog_list
,
Arrays
.
asList
(
getRStringArray
(
R
.
array
.
category_types
)));
popup
.
setListViewAdapter
(
adapter
);
popup
.
setOnItemClickListener
(
new
AdapterView
.
OnItemClickListener
()
{
@Override
public
void
onItemClick
(
AdapterView
<?>
parent
,
View
view
,
int
position
,
long
id
)
{
popup
.
dismiss
();
setOperationLocation
(
id
);
}
});
if
(
anchor
==
null
)
{
// 呼び出したViewが存在しない場合、真ん中に表示する
popup
.
showAtLocation
(
getWindow
().
getDecorView
().
findViewById
(
android
.
R
.
id
.
content
),
Gravity
.
CENTER
,
0
,
0
);
}
else
{
popup
.
showAsDropDown
(
anchor
);
}
}
}
}
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