mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2026-11-07 19:47:36 +00:00
Compare commits
653
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c8517ad814 | ||
|
|
ffb6ebb358 | ||
|
|
a4db519fcf | ||
|
|
5ff6ac32ba | ||
|
|
bc06438811 | ||
|
|
6adcbf81c6 | ||
|
|
bc24ec45af | ||
|
|
ca3b4d78a5 | ||
|
|
c1b8722b82 | ||
|
|
646627ac49 | ||
|
|
6a98deab83 | ||
|
|
92b48336ac | ||
|
|
81d545b90b | ||
|
|
9daccbb084 | ||
|
|
a47d652275 | ||
|
|
e55b5709dd | ||
|
|
9fc5d160ac | ||
|
|
544b09dc39 | ||
|
|
bc42d59471 | ||
|
|
5d46fc3e81 | ||
|
|
9a17910862 | ||
|
|
8441b88ab3 | ||
|
|
92d147ab65 | ||
|
|
1eee31316a | ||
|
|
302eccfdfe | ||
|
|
93d1fa3f19 | ||
|
|
2154e67178 | ||
|
|
de9b78035a | ||
|
|
7cb5b1ca7c | ||
|
|
85c419c3ea | ||
|
|
685bdd56f8 | ||
|
|
a32ea3568f | ||
|
|
275cd77f53 | ||
|
|
a8274d3882 | ||
|
|
8b0b58ce99 | ||
|
|
eeb5387cdf | ||
|
|
41d5f8d71f | ||
|
|
b90ef6a487 | ||
|
|
734f6eb41d | ||
|
|
4f762627cf | ||
|
|
85a1f8a505 | ||
|
|
98232dc403 | ||
|
|
e925893ad2 | ||
|
|
2f21ecd6bd | ||
|
|
d203b1b76e | ||
|
|
a15383d420 | ||
|
|
6433b9a1ae | ||
|
|
1a1446ac62 | ||
|
|
60544c7905 | ||
|
|
7e7d72f903 | ||
|
|
5a468e37f9 | ||
|
|
25cbc32ef9 | ||
|
|
310944f51e | ||
|
|
c90715b0f5 | ||
|
|
effdd8e9f3 | ||
|
|
b07d370e69 | ||
|
|
f51313411b | ||
|
|
c183327842 | ||
|
|
95d9af1281 | ||
|
|
413c42fdc1 | ||
|
|
7eca8e9528 | ||
|
|
a0deb45fa0 | ||
|
|
e19198446b | ||
|
|
e0fe27eadd | ||
|
|
83707f8bec | ||
|
|
c3d9bb0cf9 | ||
|
|
39d356841b | ||
|
|
4db67a59d7 | ||
|
|
26f5968a4a | ||
|
|
6be44cd9b5 | ||
|
|
efa3134dc6 | ||
|
|
21f2f55531 | ||
|
|
02f1ac13cf | ||
|
|
e0f634fcb6 | ||
|
|
69a0b392ff | ||
|
|
0d42dc3461 | ||
|
|
2aa6bf8c5b | ||
|
|
123145b6a8 | ||
|
|
e723174b81 | ||
|
|
c1b3c06a9d | ||
|
|
a23010b535 | ||
|
|
29e0dca2c7 | ||
|
|
a1c87535c6 | ||
|
|
a0c4718b3a | ||
|
|
7c0d82f25c | ||
|
|
5f74123c63 | ||
|
|
d0543d89b9 | ||
|
|
fd74f5eab0 | ||
|
|
1bac068c8c | ||
|
|
bbad45fbbd | ||
|
|
f2dfd2ca56 | ||
|
|
e3d6826912 | ||
|
|
b28a939792 | ||
|
|
7ba70cc84b | ||
|
|
865d8b994c | ||
|
|
1c5325711a | ||
|
|
aff7af76d4 | ||
|
|
9fecefeb4e | ||
|
|
577453a4db | ||
|
|
814dfd23fa | ||
|
|
0309864d0b | ||
|
|
947c2aa2ab | ||
|
|
0f4ce1b9b1 | ||
|
|
8a851e4f11 | ||
|
|
a298247824 | ||
|
|
acb039ee23 | ||
|
|
59e32fe696 | ||
|
|
7965ce90a6 | ||
|
|
142ca57f76 | ||
|
|
15beb0af57 | ||
|
|
14e7fbd127 | ||
|
|
144ff7dfd2 | ||
|
|
d030847992 | ||
|
|
eb1ad1f4af | ||
|
|
fc048c9bd6 | ||
|
|
c7a387df3d | ||
|
|
732f047ff7 | ||
|
|
bbeba2b733 | ||
|
|
83d2d0af02 | ||
|
|
3518464716 | ||
|
|
f9247e9114 | ||
|
|
be610059cf | ||
|
|
b12c689d4e | ||
|
|
55ae0b541a | ||
|
|
f74abd11fc | ||
|
|
8817c62ed3 | ||
|
|
d5616d63b6 | ||
|
|
9cbf6f9d56 | ||
|
|
ad66688bf9 | ||
|
|
b5281443bf | ||
|
|
c616edf9f7 | ||
|
|
aa4f8360dc | ||
|
|
99dea6d6f6 | ||
|
|
b3dcaefede | ||
|
|
9ec45096ba | ||
|
|
a3edcf845a | ||
|
|
48de3f9a8d | ||
|
|
979a3f8ee7 | ||
|
|
9c79e02cc8 | ||
|
|
3db91fb937 | ||
|
|
e9f2a6b711 | ||
|
|
955c0122cf | ||
|
|
d5f3d36d23 | ||
|
|
2c74fa3339 | ||
|
|
e3220910f5 | ||
|
|
8e97dd6972 | ||
|
|
0bf6b3fa1a | ||
|
|
6ac0599f4c | ||
|
|
f14b9accee | ||
|
|
da2ff27391 | ||
|
|
60d13ac9a9 | ||
|
|
011cac925a | ||
|
|
4d0412e5bd | ||
|
|
be30ce2c62 | ||
|
|
3c6541607c | ||
|
|
be80e42dc5 | ||
|
|
031a1d2810 | ||
|
|
ccbbb45f39 | ||
|
|
13b53c62ec | ||
|
|
8c83c7adcf | ||
|
|
5617dacfe7 | ||
|
|
ed9e20ede3 | ||
|
|
b7f91b593e | ||
|
|
4a39c5c525 | ||
|
|
fc716df189 | ||
|
|
9d108212dd | ||
|
|
e34dd65dda | ||
|
|
3386418abd | ||
|
|
c8b99e10e8 | ||
|
|
d8f8b87c54 | ||
|
|
31d3b975ea | ||
|
|
fb5de4f12a | ||
|
|
b02c0a421c | ||
|
|
2843ed749d | ||
|
|
9722a3d9b7 | ||
|
|
0d21f7a783 | ||
|
|
866b8270fe | ||
|
|
e0af9381cb | ||
|
|
e70f930929 | ||
|
|
2364a32de9 | ||
|
|
c8c0c2f42c | ||
|
|
e87056a12f | ||
|
|
cfd3153620 | ||
|
|
78c11ee41e | ||
|
|
bed4011b40 | ||
|
|
6a326072d4 | ||
|
|
ac2001142f | ||
|
|
6d71322982 | ||
|
|
3bf14799b5 | ||
|
|
aaf4264f44 | ||
|
|
b097e8070a | ||
|
|
99ad244376 | ||
|
|
99817d3e33 | ||
|
|
5a92c210f7 | ||
|
|
20aab465a8 | ||
|
|
8c8ee9bd9c | ||
|
|
5f116189e1 | ||
|
|
6da0732642 | ||
|
|
839cb6b058 | ||
|
|
a44bdd317d | ||
|
|
4b2de05e5c | ||
|
|
8e34ba7939 | ||
|
|
c5081f73be | ||
|
|
470d3cca27 | ||
|
|
7df53d9f40 | ||
|
|
051a6e582f | ||
|
|
989dc094fa | ||
|
|
0820496c45 | ||
|
|
5898aa791c | ||
|
|
10c29cee6e | ||
|
|
e25fb9a48e | ||
|
|
432d93aaa2 | ||
|
|
043ccbe6c2 | ||
|
|
e230b27e5b | ||
|
|
10c1e99335 | ||
|
|
ce83c46cba | ||
|
|
54ed1ccb80 | ||
|
|
71b0a6783a | ||
|
|
9fe216036b | ||
|
|
24c24bbffe | ||
|
|
b05232a05f | ||
|
|
da193440f2 | ||
|
|
08fb9d79f0 | ||
|
|
3fcc34436b | ||
|
|
720139660a | ||
|
|
d58dde5a95 | ||
|
|
79784787ee | ||
|
|
28fa96e153 | ||
|
|
1c1e037557 | ||
|
|
ee805d0447 | ||
|
|
c36fd98110 | ||
|
|
cb6b329ce1 | ||
|
|
733a30f310 | ||
|
|
e6aece5a05 | ||
|
|
5a158d3b61 | ||
|
|
f968f8e88a | ||
|
|
996630d0dd | ||
|
|
6a79dbdaec | ||
|
|
0c2972cf95 | ||
|
|
6945b7cd32 | ||
|
|
8dfde3332b | ||
|
|
ced5129263 | ||
|
|
eb1e6f23b0 | ||
|
|
13496ba454 | ||
|
|
d714aef47f | ||
|
|
56eecb45e4 | ||
|
|
1a332ce707 | ||
|
|
802a0b617d | ||
|
|
85206956e7 | ||
|
|
37bc68fef9 | ||
|
|
24632351ed | ||
|
|
c9dbefbe38 | ||
|
|
4fb93c41e8 | ||
|
|
81053009e0 | ||
|
|
8f4ffb4731 | ||
|
|
cb187fc7ed | ||
|
|
41c90f5467 | ||
|
|
4eef590bcf | ||
|
|
389e60b284 | ||
|
|
81afba02a0 | ||
|
|
0718e15ec9 | ||
|
|
07a3103a84 | ||
|
|
d3bab9b062 | ||
|
|
6040411c4f | ||
|
|
443310b3e5 | ||
|
|
38b149cbfc | ||
|
|
4664817d76 | ||
|
|
903bf9e3bb | ||
|
|
33dd27bb3d | ||
|
|
93971a097a | ||
|
|
820cf6ea87 | ||
|
|
42177d9251 | ||
|
|
03fd6b10b8 | ||
|
|
4836460f65 | ||
|
|
67cdd63ad4 | ||
|
|
5d866d8513 | ||
|
|
e8dc956b7d | ||
|
|
4c20c7411b | ||
|
|
af3273f9c6 | ||
|
|
3760588796 | ||
|
|
ed6e9bd469 | ||
|
|
e2a6cb02d7 | ||
|
|
6c32823a75 | ||
|
|
e867a09e25 | ||
|
|
7b4757491c | ||
|
|
c5c1768083 | ||
|
|
78cfe50597 | ||
|
|
99f4fa65ad | ||
|
|
739e0392b6 | ||
|
|
ffe823698c | ||
|
|
eff8e2037a | ||
|
|
06a78ebee0 | ||
|
|
24abd02472 | ||
|
|
a459a93d11 | ||
|
|
3d473ae5c4 | ||
|
|
bf965e8fd4 | ||
|
|
9bc6a144ec | ||
|
|
7f79248c50 | ||
|
|
c0f4b8bce7 | ||
|
|
47a38471c7 | ||
|
|
f1bef54bb4 | ||
|
|
fe56913df0 | ||
|
|
7bc5138208 | ||
|
|
637d77f95b | ||
|
|
cfeb51b422 | ||
|
|
4ae3a20b40 | ||
|
|
50881a3b2a | ||
|
|
c443093924 | ||
|
|
e74921acda | ||
|
|
e5f0402079 | ||
|
|
326d7495ac | ||
|
|
b099ec1a41 | ||
|
|
a589a2ad3f | ||
|
|
2b640f994d | ||
|
|
c3d06c4d1f | ||
|
|
a0ce6bf7f2 | ||
|
|
efa377409d | ||
|
|
65c6264428 | ||
|
|
077a8bc4d9 | ||
|
|
ad1467878f | ||
|
|
adc76d7213 | ||
|
|
a9c6086f2b | ||
|
|
3ca9cf0b62 | ||
|
|
4e287d02f9 | ||
|
|
7eeed348ca | ||
|
|
c968100b9d | ||
|
|
1b6df08df8 | ||
|
|
975b3abd98 | ||
|
|
14ba4f0c93 | ||
|
|
e3ebe25cdd | ||
|
|
c36246bded | ||
|
|
d30d6ef519 | ||
|
|
78b6c58dcd | ||
|
|
232ca60238 | ||
|
|
021650f064 | ||
|
|
1cf28d5997 | ||
|
|
334954b6a8 | ||
|
|
0fc5c13427 | ||
|
|
66f79842b7 | ||
|
|
094eed8bb3 | ||
|
|
06f746d7b0 | ||
|
|
95456166c2 | ||
|
|
206173e73a | ||
|
|
a683815540 | ||
|
|
93abec047d | ||
|
|
82732d4c35 | ||
|
|
137316d95b | ||
|
|
92ec3d31f4 | ||
|
|
b7fd424f33 | ||
|
|
ea923aa884 | ||
|
|
493cd5050d | ||
|
|
e3421d6ce4 | ||
|
|
84ac06d5df | ||
|
|
b7e29233cd | ||
|
|
17c7b5b675 | ||
|
|
f8a1aa1e77 | ||
|
|
ac011bf2d1 | ||
|
|
0e42001287 | ||
|
|
c5ba8e8fee | ||
|
|
26c8c2c6ad | ||
|
|
239ae81c78 | ||
|
|
4366723b21 | ||
|
|
e1190449c6 | ||
|
|
f5cff1c43b | ||
|
|
faf4f9bc1f | ||
|
|
605bdf5d9b | ||
|
|
2a60f884cf | ||
|
|
579cd86dab | ||
|
|
5d8b132956 | ||
|
|
10b3b514d0 | ||
|
|
16ec2b886d | ||
|
|
f406e2a258 | ||
|
|
6051271c81 | ||
|
|
7cced5a4b1 | ||
|
|
b4ba9308d2 | ||
|
|
2ada626c04 | ||
|
|
c9a7b79b50 | ||
|
|
88a64ce43d | ||
|
|
4e089c5405 | ||
|
|
30cd6b94f0 | ||
|
|
365cf562cb | ||
|
|
2078698bfa | ||
|
|
80e9274cf6 | ||
|
|
86b9e3ff3e | ||
|
|
ecead0465d | ||
|
|
e8aab5e730 | ||
|
|
0f8cf3dca0 | ||
|
|
8f1b47d4c4 | ||
|
|
76c0fc1fe7 | ||
|
|
2ff657c59d | ||
|
|
1216d9a3b7 | ||
|
|
f0ab914ca5 | ||
|
|
12537b3506 | ||
|
|
5f6d4df5b2 | ||
|
|
95dafdebe5 | ||
|
|
d23e8510db | ||
|
|
42a541e5dc | ||
|
|
7daac01c58 | ||
|
|
25827d0e9d | ||
|
|
b9fef9ad73 | ||
|
|
c33348d5fd | ||
|
|
2b3b738d3c | ||
|
|
3d7fbf8a95 | ||
|
|
132991122f | ||
|
|
43b0dd4eed | ||
|
|
c3b53776e4 | ||
|
|
79dfc5b5ba | ||
|
|
55f51cef47 | ||
|
|
d1402ad91b | ||
|
|
f6e6b91213 | ||
|
|
81dc92f449 | ||
|
|
5fd3a88b38 | ||
|
|
3bab78883b | ||
|
|
ac3523780f | ||
|
|
87850eb899 | ||
|
|
698a191586 | ||
|
|
c35bf9cabd | ||
|
|
8c21d0db04 | ||
|
|
c875ba5e54 | ||
|
|
c297fb043a | ||
|
|
bd97508a3e | ||
|
|
07a489b151 | ||
|
|
c59871300a | ||
|
|
173e91f461 | ||
|
|
12cba0242b | ||
|
|
4ed88e8fac | ||
|
|
1d9de332db | ||
|
|
72163182a0 | ||
|
|
801d7e0737 | ||
|
|
58b87f879a | ||
|
|
e518eaf742 | ||
|
|
e3346dd605 | ||
|
|
ca3cd2b12c | ||
|
|
af25a502dc | ||
|
|
b731e566e7 | ||
|
|
2f29f5bf85 | ||
|
|
6660469b43 | ||
|
|
992caa4088 | ||
|
|
31e1f23475 | ||
|
|
5b5f4b16ad | ||
|
|
dbb338ce63 | ||
|
|
1d33ded518 | ||
|
|
fe17397b38 | ||
|
|
db2cac5c62 | ||
|
|
aeec6c60b2 | ||
|
|
243720ee96 | ||
|
|
ec81dfd525 | ||
|
|
39e22de1a2 | ||
|
|
b7f7183094 | ||
|
|
911465a7ac | ||
|
|
82ed7c7111 | ||
|
|
636affe312 | ||
|
|
54aed8ec6b | ||
|
|
1d36a09731 | ||
|
|
c3eb16af85 | ||
|
|
efb4a9f8a2 | ||
|
|
31799218a9 | ||
|
|
423993b53e | ||
|
|
b2410b2625 | ||
|
|
d47832ac82 | ||
|
|
d61104d1ab | ||
|
|
00983d49cd | ||
|
|
cd77da18a0 | ||
|
|
f45900b464 | ||
|
|
cda0974d99 | ||
|
|
c1ce3e0625 | ||
|
|
de1977e1ff | ||
|
|
ec08358fcc | ||
|
|
d40a630487 | ||
|
|
f28e506060 | ||
|
|
957ad6aacb | ||
|
|
8196e9afcb | ||
|
|
2cd506d062 | ||
|
|
1627e05fa5 | ||
|
|
028a00bde6 | ||
|
|
fe843e0429 | ||
|
|
d575dcdb10 | ||
|
|
8a1314446d | ||
|
|
ca82fe5e55 | ||
|
|
374986816f | ||
|
|
5f731268b5 | ||
|
|
878480097a | ||
|
|
e033eb754d | ||
|
|
9c30879084 | ||
|
|
36b0884481 | ||
|
|
0a9054deac | ||
|
|
489ed3c4f8 | ||
|
|
d28f03573d | ||
|
|
5b9b9b5580 | ||
|
|
cb2ad03a80 | ||
|
|
4dc68854d3 | ||
|
|
c12319e103 | ||
|
|
5101bb05dc | ||
|
|
ab709a0273 | ||
|
|
ceebd341b1 | ||
|
|
cba87159ab | ||
|
|
1e3565405e | ||
|
|
24433528dc | ||
|
|
1e0a9f47b6 | ||
|
|
2cf3898f65 | ||
|
|
960f159a31 | ||
|
|
922168c86b | ||
|
|
779a07ff26 | ||
|
|
21b0212de7 | ||
|
|
0c504da18c | ||
|
|
12d2a3c935 | ||
|
|
5262253624 | ||
|
|
6f962feef7 | ||
|
|
bacab14be6 | ||
|
|
e0a786764e | ||
|
|
17bf162341 | ||
|
|
0540f775d3 | ||
|
|
2b04432a37 | ||
|
|
0a4dbbabd9 | ||
|
|
2f004502a1 | ||
|
|
8b0a7232cc | ||
|
|
fc4db3f86a | ||
|
|
58b7b274b8 | ||
|
|
d4f1d76763 | ||
|
|
250101c00a | ||
|
|
9270662842 | ||
|
|
d212e8d893 | ||
|
|
510d31544f | ||
|
|
e50a3bb8ce | ||
|
|
e626829b5c | ||
|
|
2ab8999638 | ||
|
|
8f118b7067 | ||
|
|
8a0b6bd3db | ||
|
|
bd17bf5f80 | ||
|
|
080f11c3e7 | ||
|
|
117ed40796 | ||
|
|
2188e55c5f | ||
|
|
49cc132f14 | ||
|
|
4296ed6209 | ||
|
|
8663b86fc6 | ||
|
|
c46ffd8454 | ||
|
|
cde4867b7e | ||
|
|
fdb2d535cd | ||
|
|
6e8ad7f9fc | ||
|
|
0613c8284a | ||
|
|
08fafcfced | ||
|
|
b463b61fd4 | ||
|
|
6e069a1579 | ||
|
|
17cb6af538 | ||
|
|
6c1bd61240 | ||
|
|
52049d599a | ||
|
|
57184a2c8b | ||
|
|
c767f65683 | ||
|
|
2155edd15f | ||
|
|
2b97ecf1fd | ||
|
|
6f3639702a | ||
|
|
62247033e9 | ||
|
|
ee448ad2e5 | ||
|
|
6069d1eb1c | ||
|
|
9c1aeb0dbf | ||
|
|
b9ae72aedd | ||
|
|
5180a51c74 | ||
|
|
082166cc5d | ||
|
|
94e0ff7eed | ||
|
|
5cf403a124 | ||
|
|
8a789ffe7d | ||
|
|
26df200fe4 | ||
|
|
e19bfb7f09 | ||
|
|
2502cf64ec | ||
|
|
2ccc576c69 | ||
|
|
b4ee93cd5c | ||
|
|
6cadc2d75b | ||
|
|
7b8e7a3e48 | ||
|
|
be5d7f7214 | ||
|
|
970fbdc270 | ||
|
|
ec3618deb3 | ||
|
|
4eb5b3ad08 | ||
|
|
7124d089a7 | ||
|
|
e108cd7834 | ||
|
|
90362ad0f4 | ||
|
|
e05de15865 | ||
|
|
8d86197270 | ||
|
|
984b82d4a1 | ||
|
|
7c3588275c | ||
|
|
02ab3467ed | ||
|
|
7c1ab534d8 | ||
|
|
3394148c93 | ||
|
|
c8cec5d002 | ||
|
|
ad982378ed | ||
|
|
4f50861280 | ||
|
|
f8c4ee9e6c | ||
|
|
cbe5d1069a | ||
|
|
d222d77a91 | ||
|
|
0804bfb8f6 | ||
|
|
b49dda2e18 | ||
|
|
daef06810b | ||
|
|
6786fbf569 | ||
|
|
df0386e349 | ||
|
|
e9689bb99a | ||
|
|
22d92f87ce | ||
|
|
ab4a88e4bd | ||
|
|
6983353912 | ||
|
|
d561bf2ea6 | ||
|
|
c4427313b0 | ||
|
|
4df58a5af9 | ||
|
|
7e262b6b57 | ||
|
|
20575e115c | ||
|
|
a0a730a6a9 | ||
|
|
0e1a2c78a2 | ||
|
|
6b1c41bd30 | ||
|
|
73a1373908 | ||
|
|
e5bfd5142b | ||
|
|
57c93abeef | ||
|
|
661da2f5ee | ||
|
|
a2c4710654 | ||
|
|
70a7ca5d08 | ||
|
|
28956b24da | ||
|
|
c782960949 | ||
|
|
31fcdd788a | ||
|
|
ef6431afbc | ||
|
|
5b227ee089 | ||
|
|
8de21d751e | ||
|
|
eb79cffb34 | ||
|
|
2c1f1c6828 | ||
|
|
c9f3510745 | ||
|
|
309b425e2c | ||
|
|
7add8bcc39 | ||
|
|
c5db820e1d | ||
|
|
119140a6bc | ||
|
|
6bc741d0b0 | ||
|
|
1682e06d24 | ||
|
|
729600917c | ||
|
|
141bddd504 | ||
|
|
ee53b48d96 | ||
|
|
7ec0492c0c | ||
|
|
5f35de732d | ||
|
|
bb667a3d37 | ||
|
|
82fcf044cf | ||
|
|
065d3594ac | ||
|
|
5aed05adc4 | ||
|
|
8f7a420ae3 | ||
|
|
29641c370e | ||
|
|
efb2484569 | ||
|
|
4c958bb333 | ||
|
|
6ca1fd6097 | ||
|
|
52087c3b9e | ||
|
|
5c22b2731b | ||
|
|
63f4a8229a | ||
|
|
08149e9e7e | ||
|
|
6fb08cfa99 | ||
|
|
a28feee4dc | ||
|
|
a3923f7a3a | ||
|
|
d7f73d9207 | ||
|
|
c182c97390 | ||
|
|
64e85478bd | ||
|
|
0402909473 | ||
|
|
6d40e00126 | ||
|
|
85282a2a34 |
No files matched your search
@@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
name: 新機能用テンプレート
|
||||||
|
about: 新規開発Issue用テンプレート
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
WIP
|
||||||
Generated
+12
-5
@@ -1,10 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="deploymentTargetDropDown">
|
<component name="deploymentTargetDropDown">
|
||||||
<value>
|
<runningDeviceTargetSelectedWithDropDown>
|
||||||
<entry key="app">
|
<Target>
|
||||||
<State />
|
<type value="RUNNING_DEVICE_TARGET" />
|
||||||
</entry>
|
<deviceKey>
|
||||||
</value>
|
<Key>
|
||||||
|
<type value="SERIAL_NUMBER" />
|
||||||
|
<value value="ZY227DCBHN" />
|
||||||
|
</Key>
|
||||||
|
</deviceKey>
|
||||||
|
</Target>
|
||||||
|
</runningDeviceTargetSelectedWithDropDown>
|
||||||
|
<timeTargetWasSelectedWithDropDown value="2023-12-21T04:53:14.729902700Z" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
Generated
+8
@@ -4,6 +4,14 @@
|
|||||||
<selectionStates>
|
<selectionStates>
|
||||||
<SelectionState runConfigName="app">
|
<SelectionState runConfigName="app">
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
<option name="selectionMode" value="DROPDOWN" />
|
||||||
|
<DropdownSelection timestamp="2023-12-18T03:36:14.973846Z">
|
||||||
|
<Target type="DEFAULT_BOOT">
|
||||||
|
<handle>
|
||||||
|
<DeviceId pluginId="PhysicalDevice" identifier="serial=ZY22H7V3G7" />
|
||||||
|
</handle>
|
||||||
|
</Target>
|
||||||
|
</DropdownSelection>
|
||||||
|
<DialogSelection />
|
||||||
</SelectionState>
|
</SelectionState>
|
||||||
</selectionStates>
|
</selectionStates>
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
Generated
+8
@@ -4,6 +4,7 @@
|
|||||||
<component name="GradleSettings">
|
<component name="GradleSettings">
|
||||||
<option name="linkedExternalProjectsSettings">
|
<option name="linkedExternalProjectsSettings">
|
||||||
<GradleProjectSettings>
|
<GradleProjectSettings>
|
||||||
|
<option name="testRunner" value="GRADLE" />
|
||||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
<option name="gradleJvm" value="jbr-17" />
|
<option name="gradleJvm" value="jbr-17" />
|
||||||
<option name="modules">
|
<option name="modules">
|
||||||
@@ -22,6 +23,13 @@
|
|||||||
<option value="$PROJECT_DIR$/feature/library" />
|
<option value="$PROJECT_DIR$/feature/library" />
|
||||||
<option value="$PROJECT_DIR$/feature/scan" />
|
<option value="$PROJECT_DIR$/feature/scan" />
|
||||||
<option value="$PROJECT_DIR$/feature/search" />
|
<option value="$PROJECT_DIR$/feature/search" />
|
||||||
|
<option value="$PROJECT_DIR$/model" />
|
||||||
|
<option value="$PROJECT_DIR$/processor" />
|
||||||
|
<option value="$PROJECT_DIR$/shared" />
|
||||||
|
<option value="$PROJECT_DIR$/shared/icon" />
|
||||||
|
<option value="$PROJECT_DIR$/shared/ui" />
|
||||||
|
<option value="$PROJECT_DIR$/source" />
|
||||||
|
<option value="$PROJECT_DIR$/utils" />
|
||||||
</set>
|
</set>
|
||||||
</option>
|
</option>
|
||||||
<option name="resolveExternalAnnotations" value="false" />
|
<option name="resolveExternalAnnotations" value="false" />
|
||||||
|
|||||||
Generated
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
# Lacerta
|
# Lacerta
|
||||||
WIP
|
WIP
|
||||||
## モジュール設計
|
## モジュール設計
|
||||||

|
|
||||||
|

|
||||||
|
|
||||||
|
## メモ
|
||||||
|
- アイコン: Google Material Icons https://fonts.google.com/icons (Weight:300, Grade:0, Optical size: 24px)
|
||||||
|
|
||||||
## コーディング規則/推奨(WIP)
|
## コーディング規則/推奨(WIP)
|
||||||
### 規則
|
### 規則
|
||||||
|
|||||||
+28
-1
@@ -11,13 +11,35 @@ android {
|
|||||||
applicationId "one.nem.lacerta"
|
applicationId "one.nem.lacerta"
|
||||||
minSdk 26
|
minSdk 26
|
||||||
targetSdk 33
|
targetSdk 33
|
||||||
|
|
||||||
|
// ベータ, Internal, Release問わず毎回インクリメントする
|
||||||
|
// https://developer.android.com/studio/publish/versioning#versioningsettings
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0"
|
versionName "0.1.0"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
debug { // 開発メンバー用
|
||||||
|
debuggable true
|
||||||
|
minifyEnabled false
|
||||||
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
|
|
||||||
|
matchingFallbacks = ['release']
|
||||||
|
}
|
||||||
|
internal_release {
|
||||||
|
minifyEnabled false
|
||||||
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
|
|
||||||
|
matchingFallbacks = ['release']
|
||||||
|
}
|
||||||
|
beta_release {
|
||||||
|
minifyEnabled false
|
||||||
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
|
|
||||||
|
matchingFallbacks = ['release']
|
||||||
|
}
|
||||||
release {
|
release {
|
||||||
minifyEnabled false
|
minifyEnabled false
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
@@ -58,6 +80,11 @@ dependencies {
|
|||||||
// implementation project(':data:source:preference')
|
// implementation project(':data:source:preference')
|
||||||
//
|
//
|
||||||
implementation project(':data')
|
implementation project(':data')
|
||||||
|
|
||||||
|
implementation project(':shared:ui')
|
||||||
|
|
||||||
|
implementation project(':shared:icon')
|
||||||
|
|
||||||
// Hilt (DI)
|
// Hilt (DI)
|
||||||
implementation libs.com.google.dagger.hilt.android
|
implementation libs.com.google.dagger.hilt.android
|
||||||
annotationProcessor libs.com.google.dagger.hilt.compiler
|
annotationProcessor libs.com.google.dagger.hilt.compiler
|
||||||
|
|||||||
@@ -2,6 +2,17 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<uses-feature
|
||||||
|
android:name="android.hardware.camera"
|
||||||
|
android:required="false" />
|
||||||
|
<uses-permission android:name="android.permission.CAMERA" />
|
||||||
|
|
||||||
|
<queries>
|
||||||
|
<intent>
|
||||||
|
<action android:name="android.media.action.IMAGE_CAPTURE" />
|
||||||
|
</intent>
|
||||||
|
</queries>
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||||
@@ -22,6 +33,16 @@
|
|||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
|
<provider
|
||||||
|
android:name="androidx.core.content.FileProvider"
|
||||||
|
android:authorities="one.nem.lacerta.provider"
|
||||||
|
android:exported="false"
|
||||||
|
android:grantUriPermissions="true">
|
||||||
|
<meta-data
|
||||||
|
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||||
|
android:resource="@xml/file_paths" />
|
||||||
|
</provider>
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
@@ -11,6 +11,8 @@ public class LacertaApplication extends Application {
|
|||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
|
|
||||||
|
// DynamicColorを有効化
|
||||||
DynamicColors.applyToActivitiesIfAvailable(this);
|
DynamicColors.applyToActivitiesIfAvailable(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:theme="@style/Theme.Lacerta"
|
||||||
tools:context=".MainActivity">
|
tools:context=".MainActivity">
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
<androidx.fragment.app.FragmentContainerView
|
||||||
@@ -17,7 +18,7 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:navGraph="@navigation/main_nav"
|
app:navGraph="@navigation/main_nav"
|
||||||
tools:layout="@layout/fragment_debug_menu" />
|
tools:layout="@layout/fragment_debug_menu_container" />
|
||||||
|
|
||||||
<com.google.android.material.bottomnavigation.BottomNavigationView
|
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||||
android:id="@+id/bottom_nav"
|
android:id="@+id/bottom_nav"
|
||||||
|
|||||||
@@ -1,9 +1,20 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@id/feature_home_navigation"
|
||||||
|
android:icon="@drawable/home_24px"
|
||||||
|
android:title="Home"/>
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@id/feature_library_navigation"
|
||||||
|
android:icon="@drawable/folder_24px"
|
||||||
|
android:title="Library"/>
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@id/feature_debug_navigation"
|
android:id="@id/feature_debug_navigation"
|
||||||
android:title="DebugMenu"/>
|
android:icon="@drawable/developer_mode_24px"
|
||||||
|
android:title="Debug menu"/>
|
||||||
|
|
||||||
|
|
||||||
</menu>
|
</menu>
|
||||||
@@ -6,5 +6,9 @@
|
|||||||
|
|
||||||
<include app:graph="@navigation/feature_debug_navigation" />
|
<include app:graph="@navigation/feature_debug_navigation" />
|
||||||
|
|
||||||
|
<include app:graph="@navigation/feature_library_navigation" />
|
||||||
|
|
||||||
|
<include app:graph="@navigation/feature_home_navigation" />
|
||||||
|
|
||||||
|
|
||||||
</navigation>
|
</navigation>
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
|
||||||
<!-- Base application theme. -->
|
|
||||||
<style name="Base.Theme.Lacerta" parent="Theme.Material3.DayNight.NoActionBar">
|
|
||||||
<!-- Customize your dark theme here. -->
|
|
||||||
<!-- <item name="colorPrimary">@color/my_dark_primary</item> -->
|
|
||||||
</style>
|
|
||||||
</resources>
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<!-- UI -->
|
|
||||||
<color name="ui_bg">@android:color/system_neutral1_50</color>
|
|
||||||
<color name="ui_fg">@android:color/system_neutral1_900</color>
|
|
||||||
<color name="ui_fg_disabled">@android:color/system_neutral1_400</color>
|
|
||||||
<color name="ui_fg_secondary">@android:color/system_neutral2_600</color> <!-- A12 B2: 700 -->
|
|
||||||
<color name="ui_accent">@color/accent_dark</color>
|
|
||||||
<color name="ui_accent_inverse">@color/accent_light</color>
|
|
||||||
<color name="ui_accent_variant">@color/accent_variant_dark</color>
|
|
||||||
<color name="ui_surface">@android:color/system_accent1_50</color>
|
|
||||||
<color name="ui_primary_surface">@android:color/system_accent1_100</color>
|
|
||||||
<color name="changelog_bg">@android:color/system_neutral2_50</color>
|
|
||||||
<color name="changelog_border">@android:color/system_neutral1_400</color>
|
|
||||||
<color name="error">#DA000E</color>
|
|
||||||
<color name="success">#008753</color>
|
|
||||||
|
|
||||||
<!-- Launcher icon -->
|
|
||||||
<color name="launcher_fg">@android:color/system_neutral2_700</color>
|
|
||||||
<color name="launcher_bg">@android:color/background_light</color>
|
|
||||||
|
|
||||||
<color name="accent_light">@android:color/system_accent1_300</color>
|
|
||||||
<color name="accent_dark">@android:color/system_accent1_600</color>
|
|
||||||
<color name="accent_variant_light">@android:color/system_accent3_100</color>
|
|
||||||
<color name="accent_variant_dark">@android:color/system_accent3_600</color>
|
|
||||||
|
|
||||||
<!-- Material3 colors -->
|
|
||||||
<color name="colorPrimaryLight">@color/material_dynamic_primary40</color>
|
|
||||||
<color name="colorPrimaryDark">@color/material_dynamic_primary80</color>
|
|
||||||
<color name="colorPrimaryContainerLight">@color/material_dynamic_primary90</color>
|
|
||||||
<color name="colorPrimaryContainerDark">@color/material_dynamic_primary30</color>
|
|
||||||
<color name="colorOnPrimaryContainerLight">@color/material_dynamic_primary10</color>
|
|
||||||
<color name="colorOnPrimaryContainerDark">@color/material_dynamic_primary90</color>
|
|
||||||
<color name="colorSecondaryContainerLight">@color/material_dynamic_secondary90</color>
|
|
||||||
<color name="colorSecondaryContainerDark">@color/material_dynamic_secondary90</color>
|
|
||||||
<color name="colorOnSecondaryContainerLight">@color/material_dynamic_secondary10</color>
|
|
||||||
<color name="colorOnSecondaryContainerDark">@color/material_dynamic_secondary10</color>
|
|
||||||
<color name="colorTertiaryLight">@color/material_dynamic_tertiary40</color>
|
|
||||||
<color name="colorTertiaryDark">@color/material_dynamic_tertiary80</color>
|
|
||||||
<color name="colorOnTertiaryLight">@color/material_dynamic_primary100</color>
|
|
||||||
<color name="colorOnTertiaryDark">@color/material_dynamic_tertiary20</color>
|
|
||||||
<color name="colorTertiaryContainerLight">@color/material_dynamic_tertiary90</color>
|
|
||||||
<color name="colorTertiaryContainerDark">@color/material_dynamic_tertiary30</color>
|
|
||||||
<color name="colorOnTertiaryContainerLight">@color/material_dynamic_tertiary10</color>
|
|
||||||
<color name="colorOnTertiaryContainerDark">@color/material_dynamic_tertiary90</color>
|
|
||||||
<color name="colorSurfaceLight">@color/material_dynamic_neutral99</color>
|
|
||||||
<color name="colorSurfaceDark">@color/material_dynamic_neutral10</color>
|
|
||||||
<color name="colorOnSurfaceLight">@color/material_dynamic_neutral10</color>
|
|
||||||
<color name="colorOnSurfaceDark">@color/material_dynamic_neutral90</color>
|
|
||||||
<color name="colorSurfaceVariantLight">@color/material_dynamic_neutral_variant90</color>
|
|
||||||
<color name="colorSurfaceVariantDark">@color/material_dynamic_neutral_variant30</color>
|
|
||||||
<color name="colorOnSurfaceVariantLight">@color/material_dynamic_neutral_variant30</color>
|
|
||||||
<color name="colorOnSurfaceVariantDark">@color/material_dynamic_neutral_variant80</color>
|
|
||||||
<color name="colorOutlineLight">@color/material_dynamic_neutral_variant50</color>
|
|
||||||
<color name="colorOutlineDark">@color/material_dynamic_neutral_variant60</color>
|
|
||||||
<color name="colorErrorContainerLight">#FFF9DEDC</color>
|
|
||||||
<color name="colorErrorContainerDark">#FF8C1D18</color>
|
|
||||||
<color name="colorOnErrorContainerLight">#FF410E0B</color>
|
|
||||||
<color name="colorOnErrorContainerDark">#FFF9DEDC</color>
|
|
||||||
|
|
||||||
</resources>
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
|
||||||
<!-- Base application theme. -->
|
|
||||||
<style name="Base.Theme.Lacerta" parent="Theme.Material3.DayNight.NoActionBar">
|
|
||||||
<!-- Customize your light theme here. -->
|
|
||||||
<!-- <item name="colorPrimary">@color/my_light_primary</item> -->
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="Theme.Lacerta" parent="Base.Theme.Lacerta" />
|
|
||||||
</resources>
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<paths>
|
||||||
|
<cache-path name="cache" path="." />
|
||||||
|
</paths>
|
||||||
@@ -34,4 +34,7 @@ dependencies {
|
|||||||
androidTestImplementation libs.androidx.test.espresso.core
|
androidTestImplementation libs.androidx.test.espresso.core
|
||||||
|
|
||||||
implementation 'com.websitebeaver:documentscanner:1.0.0'
|
implementation 'com.websitebeaver:documentscanner:1.0.0'
|
||||||
|
|
||||||
|
implementation project(':shared:ui')
|
||||||
|
implementation project(':model')
|
||||||
}
|
}
|
||||||
+55
@@ -0,0 +1,55 @@
|
|||||||
|
package one.nem.lacerta.component.scanner;
|
||||||
|
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
public class CaptureResultAdapter extends RecyclerView.Adapter<CaptureResultAdapter.ViewHolder> {
|
||||||
|
private final ArrayList<CapturedData> results;
|
||||||
|
|
||||||
|
public CaptureResultAdapter(ArrayList<CapturedData> results) {
|
||||||
|
this.results = results;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CaptureResultAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||||
|
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_item_scanner_component_manager_stub, parent, false);
|
||||||
|
return new CaptureResultAdapter.ViewHolder(view);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(CaptureResultAdapter.ViewHolder holder, int position) {
|
||||||
|
CapturedData result = results.get(position);
|
||||||
|
holder.textViewPath.setText(result.getPath());
|
||||||
|
holder.textViewResolutionHeight.setText(result.getResolutionHeight());
|
||||||
|
holder.textViewResolutionWidth.setText(result.getResolutionWidth());
|
||||||
|
holder.imageView.setImageBitmap(result.getBitmap());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return results.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
|
public TextView textViewPath;
|
||||||
|
public TextView textViewResolutionHeight;
|
||||||
|
public TextView textViewResolutionWidth;
|
||||||
|
public ImageView imageView;
|
||||||
|
|
||||||
|
public ViewHolder(View view) {
|
||||||
|
super(view);
|
||||||
|
textViewPath = view.findViewById(R.id.textViewPath);
|
||||||
|
textViewResolutionHeight = view.findViewById(R.id.textViewResHeight);
|
||||||
|
textViewResolutionWidth = view.findViewById(R.id.textViewResWidth);
|
||||||
|
imageView = view.findViewById(R.id.imageViewResult);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package one.nem.lacerta.component.scanner;
|
||||||
|
|
||||||
|
import android.graphics.Bitmap;
|
||||||
|
|
||||||
|
public class CapturedData {
|
||||||
|
|
||||||
|
private String path;
|
||||||
|
private String resolutionHeight;
|
||||||
|
private String resolutionWidth;
|
||||||
|
private String size;
|
||||||
|
private Bitmap bitmap;
|
||||||
|
|
||||||
|
// Constructor
|
||||||
|
|
||||||
|
public CapturedData(String path, String resolutionHeight, String resolutionWidth, String size, Bitmap bitmap) {
|
||||||
|
this.path = path;
|
||||||
|
this.resolutionHeight = resolutionHeight;
|
||||||
|
this.resolutionWidth = resolutionWidth;
|
||||||
|
this.size = size;
|
||||||
|
this.bitmap = bitmap;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Getters
|
||||||
|
|
||||||
|
public String getPath() {
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getResolutionHeight() {
|
||||||
|
return resolutionHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getResolutionWidth() {
|
||||||
|
return resolutionWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSize() {
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Bitmap getBitmap() {
|
||||||
|
return bitmap;
|
||||||
|
}
|
||||||
|
}
|
||||||
+144
@@ -0,0 +1,144 @@
|
|||||||
|
package one.nem.lacerta.component.scanner;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.graphics.Bitmap;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import androidx.activity.result.ActivityResultLauncher;
|
||||||
|
import androidx.activity.result.contract.ActivityResultContracts;
|
||||||
|
import androidx.core.content.FileProvider;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import android.os.Environment;
|
||||||
|
import android.provider.MediaStore;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A simple {@link Fragment} subclass.
|
||||||
|
* Use the {@link ScannerDataManagerStubFragment#newInstance} factory method to
|
||||||
|
* create an instance of this fragment.
|
||||||
|
*/
|
||||||
|
public class ScannerDataManagerStubFragment extends Fragment {
|
||||||
|
|
||||||
|
// TODO-rca: 時間があったらcacheを使うようにする?
|
||||||
|
|
||||||
|
// Results
|
||||||
|
private ArrayList<CapturedData> results = new ArrayList<>();
|
||||||
|
|
||||||
|
private Uri photoURI;
|
||||||
|
|
||||||
|
private final ActivityResultLauncher<Intent> cameraLauncher = registerForActivityResult(
|
||||||
|
new ActivityResultContracts.StartActivityForResult(),
|
||||||
|
result -> {
|
||||||
|
if (result.getResultCode() == Activity.RESULT_OK) {
|
||||||
|
try {
|
||||||
|
if (getActivity() == null) {
|
||||||
|
Log.d("ScannerDataManagerStubFragment", "getActivity() is null");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (photoURI == null) {
|
||||||
|
Log.d("ScannerDataManagerStubFragment", "photoURI is null");
|
||||||
|
Toast.makeText(getActivity(), "photoURI is null", Toast.LENGTH_LONG).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Bitmap imageBitmap = MediaStore.Images.Media.getBitmap(getActivity().getContentResolver(), photoURI);
|
||||||
|
results.add(new CapturedData("Placeholder", Integer.toString(imageBitmap.getHeight()), Integer.toString(imageBitmap.getWidth()), "Placeholder", imageBitmap));
|
||||||
|
} catch (IOException e) {
|
||||||
|
Log.e("ScannerDataManagerStubFragment", "Error occurred while reading the file", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
public ScannerDataManagerStubFragment() {
|
||||||
|
// Required empty public constructor
|
||||||
|
}
|
||||||
|
// TODO: Rename and change types and number of parameters
|
||||||
|
public static ScannerDataManagerStubFragment newInstance() {
|
||||||
|
ScannerDataManagerStubFragment fragment = new ScannerDataManagerStubFragment();
|
||||||
|
Bundle args = new Bundle();
|
||||||
|
fragment.setArguments(args);
|
||||||
|
return fragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
|
Bundle savedInstanceState) {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
return inflater.inflate(R.layout.fragment_scanner_data_manager_stub, container, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||||
|
super.onViewCreated(view, savedInstanceState);
|
||||||
|
|
||||||
|
view.findViewById(R.id.button_call_camera).setOnClickListener(v -> {
|
||||||
|
Log.d("ScannerDataManagerStubFragment", "button_call_camera clicked");
|
||||||
|
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||||
|
if (takePictureIntent.resolveActivity(getActivity().getPackageManager()) != null) {
|
||||||
|
File photoFile = null;
|
||||||
|
try {
|
||||||
|
String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss", Locale.US).format(new Date());
|
||||||
|
String imageFileName = "JPEG_" + timeStamp + "_";
|
||||||
|
File storageDir = getActivity().getExternalFilesDir(Environment.DIRECTORY_PICTURES);
|
||||||
|
photoFile = File.createTempFile(imageFileName, ".jpg", storageDir);
|
||||||
|
} catch (IOException ex) {
|
||||||
|
Log.e("ScannerDataManagerStubFragment", "Error occurred while creating the file", ex);
|
||||||
|
}
|
||||||
|
if (photoFile != null) {
|
||||||
|
photoURI = FileProvider.getUriForFile(getActivity(), "one.nem.lacerta.provider", photoFile);
|
||||||
|
takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);
|
||||||
|
cameraLauncher.launch(takePictureIntent);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Log.d("ScannerDataManagerStubFragment", "photoFile is null");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Log.d("ScannerDataManagerStubFragment", "camera not available");
|
||||||
|
}
|
||||||
|
updateResults();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
Log.d("ScannerDataManagerStubFragment", "onResume");
|
||||||
|
updateResults();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateResults() {
|
||||||
|
Log.d("ScannerDataManagerStubFragment", "updateResults");
|
||||||
|
|
||||||
|
// TODO-rca: エラーハンドリング
|
||||||
|
RecyclerView recyclerView = getView().findViewById(R.id.result_recycler_view);
|
||||||
|
|
||||||
|
recyclerView.setLayoutManager(new androidx.recyclerview.widget.LinearLayoutManager(getContext()));
|
||||||
|
recyclerView.setAdapter(new CaptureResultAdapter(this.results));
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
-75
@@ -1,75 +0,0 @@
|
|||||||
package one.nem.lacerta.component.scanner;
|
|
||||||
|
|
||||||
import android.graphics.BitmapFactory;
|
|
||||||
import android.os.Bundle;
|
|
||||||
|
|
||||||
import androidx.constraintlayout.utils.widget.ImageFilterView;
|
|
||||||
import androidx.fragment.app.Fragment;
|
|
||||||
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
|
|
||||||
import com.websitebeaver.documentscanner.DocumentScanner;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A simple {@link Fragment} subclass.
|
|
||||||
* Use the {@link ScannerScanFragment#newInstance} factory method to
|
|
||||||
* create an instance of this fragment.
|
|
||||||
*/
|
|
||||||
public class ScannerScanFragment extends Fragment {
|
|
||||||
|
|
||||||
// TODO: Rename parameter arguments, choose names that match
|
|
||||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
|
||||||
// private static final String MAX_SCAN_COUNT = "max_scan_count"; // 規定値
|
|
||||||
|
|
||||||
// TODO: Rename and change types of parameters
|
|
||||||
private String mParam1;
|
|
||||||
|
|
||||||
|
|
||||||
public ScannerScanFragment() {
|
|
||||||
// Required empty public constructor
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ScannerScanFragment newInstance(String param1) {
|
|
||||||
ScannerScanFragment fragment = new ScannerScanFragment();
|
|
||||||
Bundle args = new Bundle();
|
|
||||||
// args.putString(MAX_SCAN_COUNT, param1);
|
|
||||||
fragment.setArguments(args);
|
|
||||||
return fragment;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
if (getArguments() != null) {
|
|
||||||
// mParam1 = getArguments().getString(MAX_SCAN_COUNT);
|
|
||||||
// scan(Integer.parseInt(mParam1));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public DocumentScanner getDocumentScanner() {
|
|
||||||
return new DocumentScanner(
|
|
||||||
this,
|
|
||||||
(croppedImageResults) -> {
|
|
||||||
// display the first cropped image
|
|
||||||
croppedImageView.setImageBitmap(
|
|
||||||
BitmapFactory.decodeFile(croppedImageResults.get(0))
|
|
||||||
);
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
(errorMessage) -> {
|
|
||||||
// an error happened
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
() -> {
|
|
||||||
// user canceled document scan
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:theme="@style/Theme.Lacerta"
|
||||||
|
tools:context=".ScannerDataManagerStubFragment" >
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/action_button_container"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/button_call_camera"
|
||||||
|
style="@style/Widget.Material3.Button.IconButton.Filled"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="16px"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="Call camera" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/result_recycler_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/action_button_container" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -1,133 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
tools:context=".MainActivity">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.utils.widget.ImageFilterView
|
|
||||||
android:id="@+id/cropped_image_view"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/linear_layout_buttons">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_margin="12dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0"
|
|
||||||
android:text="Saturation" />
|
|
||||||
|
|
||||||
<SeekBar
|
|
||||||
android:id="@+id/seekBar_saturation"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:max="200"
|
|
||||||
android:progress="100"/>
|
|
||||||
</LinearLayout>
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_margin="12dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0"
|
|
||||||
android:text="Contrast" />
|
|
||||||
|
|
||||||
<SeekBar
|
|
||||||
android:id="@+id/seekBar_contrast"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:max="200"
|
|
||||||
android:progress="100"/>
|
|
||||||
</LinearLayout>
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_margin="12dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0"
|
|
||||||
android:text="Brightness" />
|
|
||||||
|
|
||||||
<SeekBar
|
|
||||||
android:id="@+id/seekBar_brightness"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:max="200"
|
|
||||||
android:progress="100"
|
|
||||||
android:layout_weight="1"/>
|
|
||||||
</LinearLayout>
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_margin="12dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0"
|
|
||||||
android:text="Warmth" />
|
|
||||||
|
|
||||||
<SeekBar
|
|
||||||
android:id="@+id/seekBar_warmth"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:max="500"
|
|
||||||
android:progress="100"
|
|
||||||
android:layout_weight="1"/>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/linear_layout_buttons"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent">
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/button_save_image"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:insetLeft="12dp"
|
|
||||||
android:insetRight="12dp"
|
|
||||||
android:text="Save Image" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/button_kill_me"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:insetLeft="12dp"
|
|
||||||
android:insetRight="12dp"
|
|
||||||
android:text="Kill me" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="24px">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/imageViewResult"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:srcCompat="@android:drawable/presence_video_online"
|
||||||
|
android:adjustViewBounds="true"/>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/imageViewResult">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="2"
|
||||||
|
android:text="Resolution:"
|
||||||
|
android:textIsSelectable="false"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewResHeight"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="Height"
|
||||||
|
android:textIsSelectable="false"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewResWidth"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="Width"
|
||||||
|
android:textIsSelectable="false"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewPath"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="Path"
|
||||||
|
android:textIsSelectable="false"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
+16
-3
@@ -8,7 +8,7 @@ android {
|
|||||||
compileSdk 34
|
compileSdk 34
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk 24
|
minSdk 26
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
consumerProguardFiles "consumer-rules.pro"
|
consumerProguardFiles "consumer-rules.pro"
|
||||||
@@ -38,6 +38,19 @@ dependencies {
|
|||||||
implementation libs.com.google.dagger.hilt.android
|
implementation libs.com.google.dagger.hilt.android
|
||||||
annotationProcessor libs.com.google.dagger.hilt.compiler
|
annotationProcessor libs.com.google.dagger.hilt.compiler
|
||||||
|
|
||||||
// libsディレクトリにあるライブラリを追加
|
// JGit
|
||||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
implementation 'org.eclipse.jgit:org.eclipse.jgit:6.8.0.202311291450-r'
|
||||||
|
|
||||||
|
// Room
|
||||||
|
implementation libs.androidx.room.runtime
|
||||||
|
annotationProcessor libs.androidx.room.compiler
|
||||||
|
|
||||||
|
// Utilsモジュール
|
||||||
|
implementation project(':utils')
|
||||||
|
|
||||||
|
// 型モジュール
|
||||||
|
implementation project(':model')
|
||||||
|
|
||||||
|
// データソースモジュール
|
||||||
|
implementation project(':source')
|
||||||
}
|
}
|
||||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,46 @@
|
|||||||
|
package one.nem.lacerta.data;
|
||||||
|
|
||||||
|
import java.lang.reflect.Array;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import one.nem.lacerta.model.document.DocumentMeta;
|
||||||
|
import one.nem.lacerta.model.document.DocumentDetail;
|
||||||
|
import one.nem.lacerta.model.document.path.DocumentPath;
|
||||||
|
import one.nem.lacerta.model.document.tag.DocumentTag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ドキュメントのデータを取得する
|
||||||
|
*/
|
||||||
|
public interface Document {
|
||||||
|
|
||||||
|
ArrayList<DocumentMeta> getAllDocumentMetas(int limit);
|
||||||
|
|
||||||
|
ArrayList<DocumentMeta> getAllDocumentMetas(int limit, int offset);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新の新しいドキュメントから順に並べてlimit件取得する
|
||||||
|
* @param limit 取得する上限数
|
||||||
|
*/
|
||||||
|
ArrayList<DocumentMeta> getRecentDocumentMetas(int limit);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新の新しいドキュメントから順に並べてoffset位置からlimit件取得する
|
||||||
|
* @param limit 取得する上限数
|
||||||
|
* @param offset 取得するオフセット
|
||||||
|
*/
|
||||||
|
ArrayList<DocumentMeta> getRecentDocumentMetas(int limit, int offset);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ドキュメントIDからDocumentDetailを取得する
|
||||||
|
* @param id ドキュメントID
|
||||||
|
*/
|
||||||
|
DocumentDetail getDocumentDetail(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DocumentMetaからDocumentDetailを取得する
|
||||||
|
* @param meta DocumentMeta
|
||||||
|
*/
|
||||||
|
DocumentDetail getDocumentDetailByMeta(DocumentMeta meta); // 簡単に使えるように
|
||||||
|
|
||||||
|
DocumentDetail createDocumentByMeta(DocumentMeta meta);
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package one.nem.lacerta.data;
|
||||||
|
|
||||||
|
import one.nem.lacerta.model.document.DocumentMeta;
|
||||||
|
import one.nem.lacerta.model.document.DocumentDetail;
|
||||||
|
import one.nem.lacerta.model.document.path.DocumentPath;
|
||||||
|
import one.nem.lacerta.model.document.tag.DocumentTag;
|
||||||
|
|
||||||
|
public interface DocumentDebug {
|
||||||
|
|
||||||
|
void insertDocument(DocumentMeta meta, DocumentDetail detail);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
package one.nem.lacerta.data.impl;
|
|
||||||
|
|
||||||
import android.os.Build;
|
|
||||||
|
|
||||||
import one.nem.lacerta.data.repository.DeviceMeta;
|
|
||||||
import one.nem.lacerta.data.model.DeviceMetaModel;
|
|
||||||
|
|
||||||
import javax.inject.Inject;
|
|
||||||
|
|
||||||
public class DeviceMetaImpl implements DeviceMeta{
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
public DeviceMetaImpl() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public DeviceMetaModel getDeviceMeta() {
|
|
||||||
DeviceMetaModel deviceMetaModel = new DeviceMetaModel(
|
|
||||||
Build.MANUFACTURER,
|
|
||||||
Build.MODEL,
|
|
||||||
Build.VERSION.RELEASE,
|
|
||||||
Build.VERSION.SDK_INT
|
|
||||||
);
|
|
||||||
return deviceMetaModel;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package one.nem.lacerta.data.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import one.nem.lacerta.data.DocumentDebug;
|
||||||
|
import one.nem.lacerta.model.document.DocumentDetail;
|
||||||
|
import one.nem.lacerta.model.document.DocumentMeta;
|
||||||
|
|
||||||
|
import one.nem.lacerta.source.database.entity.DocumentEntity;
|
||||||
|
import one.nem.lacerta.source.database.entity.LibraryEntity;
|
||||||
|
import one.nem.lacerta.source.database.entity.TagEntity;
|
||||||
|
|
||||||
|
import one.nem.lacerta.source.database.LacertaDatabase;
|
||||||
|
|
||||||
|
public class DocumentDebugImpl implements DocumentDebug{
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
LacertaDatabase database;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
public DocumentDebugImpl() {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void insertDocument(DocumentMeta meta, DocumentDetail detail) {
|
||||||
|
DocumentEntity documentEntity = new DocumentEntity();
|
||||||
|
LibraryEntity libraryEntity = new LibraryEntity();
|
||||||
|
|
||||||
|
documentEntity.id = meta.getId();
|
||||||
|
documentEntity.title = meta.getTitle();
|
||||||
|
documentEntity.createdAt = meta.getCreatedAt();
|
||||||
|
documentEntity.updatedAt = meta.getUpdatedAt();
|
||||||
|
documentEntity.author = detail.getAuthor();
|
||||||
|
documentEntity.defaultBranch = detail.getDefaultBranch();
|
||||||
|
// ArrayListからListに変換
|
||||||
|
documentEntity.tagIds = meta.getTagIds();
|
||||||
|
|
||||||
|
libraryEntity.id = meta.getId();
|
||||||
|
libraryEntity.path = "Placeholder";
|
||||||
|
libraryEntity.rootPath = "Placeholder";
|
||||||
|
|
||||||
|
database.documentDao().insert(documentEntity);
|
||||||
|
database.libraryDao().insert(libraryEntity);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,141 @@
|
|||||||
|
package one.nem.lacerta.data.impl;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import one.nem.lacerta.data.Document;
|
||||||
|
|
||||||
|
import one.nem.lacerta.model.document.DocumentMeta;
|
||||||
|
import one.nem.lacerta.model.document.DocumentDetail;
|
||||||
|
|
||||||
|
import one.nem.lacerta.model.document.path.DocumentPath;
|
||||||
|
import one.nem.lacerta.model.document.tag.DocumentTag;
|
||||||
|
import one.nem.lacerta.source.database.LacertaDatabase;
|
||||||
|
|
||||||
|
import one.nem.lacerta.source.database.entity.DocumentEntity;
|
||||||
|
import one.nem.lacerta.source.database.entity.LibraryEntity;
|
||||||
|
import one.nem.lacerta.source.database.entity.TagEntity;
|
||||||
|
|
||||||
|
import one.nem.lacerta.source.jgit.JGitRepository;
|
||||||
|
import one.nem.lacerta.utils.repository.DeviceInfoUtils;
|
||||||
|
|
||||||
|
|
||||||
|
public class DocumentImpl implements Document{
|
||||||
|
|
||||||
|
private LacertaDatabase database;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
public DocumentImpl(LacertaDatabase database) {
|
||||||
|
this.database = database;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
JGitRepository jGitRepository;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
DeviceInfoUtils deviceInfoUtils;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ArrayList<DocumentMeta> getAllDocumentMetas(int limit) {
|
||||||
|
ArrayList<DocumentMeta> documentMetas = new ArrayList<>();
|
||||||
|
List<DocumentEntity> documentEntities = database.documentDao().getAllWithLimit(limit);
|
||||||
|
|
||||||
|
for (DocumentEntity documentEntity : documentEntities) {
|
||||||
|
// タグ取得
|
||||||
|
// TODO-rca: 切り出すべきかも?
|
||||||
|
List<TagEntity> tagEntities = database.tagDao().findByIds(documentEntity.tagIds);
|
||||||
|
ArrayList<DocumentTag> documentTags = new ArrayList<>();
|
||||||
|
for (TagEntity tagEntity : tagEntities) {
|
||||||
|
documentTags.add(new DocumentTag(tagEntity.id, tagEntity.tagName, tagEntity.color));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 組み立て処理
|
||||||
|
// 可読性が終わるのでコンストラクタはつかわないほうがいいかも?
|
||||||
|
DocumentMeta documentMeta = new DocumentMeta();
|
||||||
|
documentMeta.setId(documentEntity.id);
|
||||||
|
documentMeta.setTitle(documentEntity.title);
|
||||||
|
documentMeta.setCreatedAt(documentEntity.createdAt);
|
||||||
|
documentMeta.setUpdatedAt(documentEntity.updatedAt);
|
||||||
|
documentMeta.setTags(documentTags);
|
||||||
|
|
||||||
|
documentMetas.add(documentMeta);
|
||||||
|
}
|
||||||
|
|
||||||
|
return documentMetas;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ArrayList<DocumentMeta> getAllDocumentMetas(int limit, int offset) {
|
||||||
|
return null; // TODO-rca: 実装する
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ArrayList<DocumentMeta> getRecentDocumentMetas(int limit) {
|
||||||
|
// ArrayList<DocumentMeta> documentMetas = new ArrayList<>();
|
||||||
|
// database.documentDao().
|
||||||
|
// TODO-rca: 履歴取得するDao実装する
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ArrayList<DocumentMeta> getRecentDocumentMetas(int limit, int offset) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DocumentDetail getDocumentDetail(String id) {
|
||||||
|
DocumentDetail documentDetail = new DocumentDetail();
|
||||||
|
DocumentEntity documentEntity = database.documentDao().findById(id);
|
||||||
|
|
||||||
|
// タグ取得
|
||||||
|
// TODO-rca: 切り出すべきかも?
|
||||||
|
List<TagEntity> tagEntities = database.tagDao().findByIds(documentEntity.tagIds);
|
||||||
|
ArrayList<DocumentTag> documentTags = new ArrayList<>();
|
||||||
|
for (TagEntity tagEntity : tagEntities) {
|
||||||
|
documentTags.add(new DocumentTag(tagEntity.id, tagEntity.tagName, tagEntity.color));
|
||||||
|
}
|
||||||
|
|
||||||
|
// パス取得
|
||||||
|
// TODO-rca: 切り出すべきかも?
|
||||||
|
LibraryEntity libraryEntity = database.libraryDao().findById(id);
|
||||||
|
DocumentPath documentPath = new DocumentPath(libraryEntity.rootPath, libraryEntity.path);
|
||||||
|
|
||||||
|
// リポジトリ取得
|
||||||
|
documentDetail.setRepository(jGitRepository.getRepository(id)); // TODO-rca: エラーハンドリング
|
||||||
|
|
||||||
|
// 組み立て処理
|
||||||
|
// 可読性が終わるのでコンストラクタはつかわないほうがいいかも?
|
||||||
|
DocumentMeta documentMeta = new DocumentMeta();
|
||||||
|
documentMeta.setId(documentEntity.id);
|
||||||
|
documentMeta.setTitle(documentEntity.title);
|
||||||
|
documentMeta.setCreatedAt(documentEntity.createdAt);
|
||||||
|
documentMeta.setUpdatedAt(documentEntity.updatedAt);
|
||||||
|
documentMeta.setTags(documentTags);
|
||||||
|
|
||||||
|
documentDetail.setMeta(documentMeta);
|
||||||
|
documentDetail.setAuthor(documentEntity.author);
|
||||||
|
documentDetail.setPath(documentPath);
|
||||||
|
documentDetail.setDefaultBranch(documentEntity.defaultBranch);
|
||||||
|
|
||||||
|
return documentDetail;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DocumentDetail getDocumentDetailByMeta(DocumentMeta meta) {
|
||||||
|
return getDocumentDetail(meta.getId()); // TODO-rca: 効率悪いのでMetaはもらった物を使うようにする(処理を切り分ける?)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DocumentDetail createDocumentByMeta(DocumentMeta meta) {
|
||||||
|
DocumentDetail documentDetail = new DocumentDetail();
|
||||||
|
|
||||||
|
documentDetail.setMeta(meta);
|
||||||
|
documentDetail.setAuthor("author"); // TODO-rca: SharedPrefを扱う機能を作ってそこから取得するようにする or Gitの設定を参照するようにする
|
||||||
|
documentDetail.setPath(new DocumentPath(deviceInfoUtils.getExternalStorageDirectoryString(), meta.getId()));
|
||||||
|
documentDetail.setDefaultBranch("master"); // TODO-rca: SharedPrefを扱う機能を作ってそこから取得するようにする?
|
||||||
|
|
||||||
|
return documentDetail;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
package one.nem.lacerta.data.impl;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.inject.Inject;
|
|
||||||
|
|
||||||
import one.nem.lacerta.data.model.documents.DocumentMeta;
|
|
||||||
import one.nem.lacerta.data.repository.Documents;
|
|
||||||
|
|
||||||
public class DocumentsImpl implements Documents {
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
public DocumentsImpl() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public ArrayList<DocumentMeta> getRecentDocuments(int limit) {
|
|
||||||
return null; // TODO-rca:
|
|
||||||
}
|
|
||||||
|
|
||||||
public ArrayList<DocumentMeta> getStarredDocuments(int limit) {
|
|
||||||
return null; // TODO-rca:
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
package one.nem.lacerta.data.impl;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.SharedPreferences;
|
|
||||||
|
|
||||||
import javax.inject.Inject;
|
|
||||||
|
|
||||||
import dagger.hilt.android.qualifiers.ApplicationContext;
|
|
||||||
import one.nem.lacerta.data.repository.SharedPref;
|
|
||||||
|
|
||||||
import one.nem.lacerta.data.model.shared_pref.enums.SharedPrefType;
|
|
||||||
|
|
||||||
public class SharedPrefImpl implements SharedPref{
|
|
||||||
|
|
||||||
private final Context applicationContext;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
public SharedPrefImpl(@ApplicationContext Context applicationContext) {
|
|
||||||
this.applicationContext = applicationContext;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SharedPreferences getSharedPreferencesByTag(SharedPrefType sharedPrefType) {
|
|
||||||
return applicationContext.getSharedPreferences(sharedPrefType.getTag(), Context.MODE_PRIVATE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
package one.nem.lacerta.data.impl.stub;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Random;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
import javax.inject.Inject;
|
|
||||||
|
|
||||||
import one.nem.lacerta.data.model.documents.DocumentMeta;
|
|
||||||
|
|
||||||
import one.nem.lacerta.data.model.documents.enums.DocumentType;
|
|
||||||
|
|
||||||
import one.nem.lacerta.data.repository.Documents;
|
|
||||||
|
|
||||||
public class DocumentsImpl implements Documents {
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
public DocumentsImpl() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public ArrayList<DocumentMeta> getRecentDocuments(int limit) { // Generate dummy data
|
|
||||||
ArrayList<DocumentMeta> documentMetaList = new ArrayList<>();
|
|
||||||
for (int i = 0; i < limit; i++) {
|
|
||||||
DocumentMeta documentMeta = new DocumentMeta();
|
|
||||||
documentMeta.id = UUID.randomUUID().toString();
|
|
||||||
documentMeta.name = "Document " + i;
|
|
||||||
documentMeta.created = new Date();
|
|
||||||
documentMeta.type = new Random(i).nextInt()/2 == 0 ? DocumentType.OTHER : DocumentType.NOTEBOOK;
|
|
||||||
documentMeta.tags = new String[] {"tag1", "tag2", "tag3"};
|
|
||||||
documentMeta.categories = new String[] {"category1", "category2", "category3"};
|
|
||||||
documentMetaList.add(documentMeta);
|
|
||||||
}
|
|
||||||
|
|
||||||
return documentMetaList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ArrayList<DocumentMeta> getStarredDocuments(int limit) { // Generate dummy data
|
|
||||||
ArrayList<DocumentMeta> documentMetaList = new ArrayList<>();
|
|
||||||
for (int i = 0; i < limit; i++) {
|
|
||||||
DocumentMeta documentMeta = new DocumentMeta();
|
|
||||||
documentMeta.id = UUID.randomUUID().toString();
|
|
||||||
documentMeta.name = "Document " + i;
|
|
||||||
documentMeta.created = new Date();
|
|
||||||
documentMeta.type = new Random(i).nextInt()/2 == 0 ? DocumentType.OTHER : DocumentType.NOTEBOOK;
|
|
||||||
documentMeta.tags = new String[] {"tag1", "tag2", "tag3"};
|
|
||||||
documentMeta.categories = new String[] {"category1", "category2", "category3"};
|
|
||||||
documentMetaList.add(documentMeta);
|
|
||||||
}
|
|
||||||
|
|
||||||
return documentMetaList;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
package one.nem.lacerta.data.model;
|
|
||||||
|
|
||||||
public class DeviceMetaModel {
|
|
||||||
private String DeviceManufacturer;
|
|
||||||
private String DeviceModel;
|
|
||||||
private String AndroidVersion;
|
|
||||||
private int AndroidApiLevel;
|
|
||||||
|
|
||||||
public DeviceMetaModel(String DeviceManufacturer, String DeviceModel, String AndroidVersion, int AndroidApiLevel) {
|
|
||||||
this.DeviceManufacturer = DeviceManufacturer;
|
|
||||||
this.DeviceModel = DeviceModel;
|
|
||||||
this.AndroidVersion = AndroidVersion;
|
|
||||||
this.AndroidApiLevel = AndroidApiLevel;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Getters
|
|
||||||
// TODO-rca: ボイラープレートコードなので削減する
|
|
||||||
|
|
||||||
public String getDeviceManufacturer() {
|
|
||||||
return DeviceManufacturer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDeviceModel() {
|
|
||||||
return DeviceModel;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAndroidVersion() {
|
|
||||||
return AndroidVersion;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getAndroidApiLevel() {
|
|
||||||
return AndroidApiLevel;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
package one.nem.lacerta.data.model.documents;
|
|
||||||
|
|
||||||
public class DocumentDetail {
|
|
||||||
// ドキュメントの詳細情報
|
|
||||||
private DocumentMeta documentMeta;
|
|
||||||
|
|
||||||
// TODO-rca: ドキュメントの詳細情報を格納するフィールドを追加する
|
|
||||||
}
|
|
||||||
@@ -1,107 +0,0 @@
|
|||||||
package one.nem.lacerta.data.model.documents;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
import one.nem.lacerta.data.model.documents.enums.DocumentType;
|
|
||||||
|
|
||||||
// TODO-rca: Dateをデバイスのロケールに合わせてStringに変換するメソッドを実装する?
|
|
||||||
public class DocumentMeta {
|
|
||||||
// ドキュメントのメタ情報
|
|
||||||
public String id; // ドキュメントの内部ID(UUIDv4?)
|
|
||||||
public String name; // ドキュメントの名前
|
|
||||||
public DocumentType type; // ドキュメントの種類
|
|
||||||
public Date created; // ドキュメントの作成日時
|
|
||||||
public String[] tags; // ドキュメントのタグ
|
|
||||||
public String[] categories; // ドキュメントのカテゴリ
|
|
||||||
|
|
||||||
public DocumentMeta(String id, String name, Date created, DocumentType type, String[] tags, String[] categories) {
|
|
||||||
this.id = id;
|
|
||||||
this.name = name;
|
|
||||||
this.created = created;
|
|
||||||
this.type = type;
|
|
||||||
this.tags = tags;
|
|
||||||
this.categories = categories;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DocumentMeta() {
|
|
||||||
this.id = "";
|
|
||||||
this.name = "";
|
|
||||||
this.created = new Date();
|
|
||||||
this.type = DocumentType.OTHER;
|
|
||||||
this.tags = new String[0];
|
|
||||||
this.categories = new String[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO-rca: ボイラープレートコードなので削減する
|
|
||||||
// Getter
|
|
||||||
|
|
||||||
public String getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getCreated() {
|
|
||||||
return created;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DocumentType getType() {
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String[] getTags() {
|
|
||||||
return tags;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String[] getCategories() {
|
|
||||||
return categories;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Setter
|
|
||||||
|
|
||||||
public void setId(String id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(String name) {
|
|
||||||
if (name == null) {
|
|
||||||
this.name = "";
|
|
||||||
} else {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCreated(Date created) {
|
|
||||||
if (created == null) {
|
|
||||||
this.created = new Date();
|
|
||||||
} else {
|
|
||||||
this.created = created;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setType(DocumentType type) {
|
|
||||||
if (type == null) {
|
|
||||||
this.type = DocumentType.OTHER;
|
|
||||||
} else {
|
|
||||||
this.type = type;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTags(String[] tags) {
|
|
||||||
if (tags == null) {
|
|
||||||
this.tags = new String[0];
|
|
||||||
} else {
|
|
||||||
this.tags = tags;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCategories(String[] categories) {
|
|
||||||
if (categories == null) {
|
|
||||||
this.categories = new String[0];
|
|
||||||
} else {
|
|
||||||
this.categories = categories;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
package one.nem.lacerta.data.model.documents.enums;
|
|
||||||
|
|
||||||
public enum DocumentType {
|
|
||||||
// ドキュメントの種類
|
|
||||||
// TODO: ユーザーがドキュメントの種類を追加できるようにする
|
|
||||||
|
|
||||||
// テキスト
|
|
||||||
TEXTBOOK,
|
|
||||||
// ノート
|
|
||||||
NOTEBOOK,
|
|
||||||
// ワークブック
|
|
||||||
WORKBOOK,
|
|
||||||
// レシート
|
|
||||||
RECEIPT,
|
|
||||||
// チケット
|
|
||||||
TICKET,
|
|
||||||
// メモ
|
|
||||||
MEMO,
|
|
||||||
// その他
|
|
||||||
OTHER
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
package one.nem.lacerta.data.model.shared_pref.enums;
|
|
||||||
|
|
||||||
public enum SharedPrefType {
|
|
||||||
|
|
||||||
COMMON("common"),
|
|
||||||
USERDATA("userdata");
|
|
||||||
|
|
||||||
private String tag;
|
|
||||||
|
|
||||||
SharedPrefType(String tag) {
|
|
||||||
this.tag = tag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTag() {
|
|
||||||
return tag;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package one.nem.lacerta.data.module;
|
|
||||||
|
|
||||||
import one.nem.lacerta.data.impl.DeviceMetaImpl;
|
|
||||||
import one.nem.lacerta.data.repository.DeviceMeta;
|
|
||||||
|
|
||||||
import dagger.Binds;
|
|
||||||
import dagger.Module;
|
|
||||||
import dagger.hilt.InstallIn;
|
|
||||||
// Singleton
|
|
||||||
import dagger.hilt.components.SingletonComponent;
|
|
||||||
|
|
||||||
@Module
|
|
||||||
@InstallIn(SingletonComponent.class)
|
|
||||||
abstract class DeviceMetaModule {
|
|
||||||
|
|
||||||
@Binds
|
|
||||||
public abstract DeviceMeta bindDeviceMeta(DeviceMetaImpl deviceMetaImpl);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package one.nem.lacerta.data.module;
|
||||||
|
|
||||||
|
import dagger.Binds;
|
||||||
|
import dagger.Module;
|
||||||
|
import dagger.hilt.InstallIn;
|
||||||
|
import dagger.hilt.components.SingletonComponent;
|
||||||
|
import one.nem.lacerta.data.DocumentDebug;
|
||||||
|
import one.nem.lacerta.data.impl.DocumentDebugImpl;
|
||||||
|
|
||||||
|
@Module
|
||||||
|
@InstallIn(SingletonComponent.class) // TODO-rca: Singletonでいいのか検討する
|
||||||
|
abstract public class DocumentDebugModule {
|
||||||
|
|
||||||
|
@Binds
|
||||||
|
public abstract DocumentDebug bindDocumentDebug(DocumentDebugImpl documentDebugImpl);
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package one.nem.lacerta.data.module;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
import dagger.Binds;
|
||||||
|
import dagger.Module;
|
||||||
|
import dagger.hilt.InstallIn;
|
||||||
|
import dagger.hilt.components.SingletonComponent;
|
||||||
|
|
||||||
|
import one.nem.lacerta.data.Document;
|
||||||
|
import one.nem.lacerta.data.impl.DocumentImpl;
|
||||||
|
|
||||||
|
@Module
|
||||||
|
@InstallIn(SingletonComponent.class) // TODO-rca: Singletonであるべきか考える
|
||||||
|
abstract public class DocumentModule {
|
||||||
|
|
||||||
|
@Binds
|
||||||
|
public abstract Document bindDocument(DocumentImpl documentImpl);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
package one.nem.lacerta.data.module;
|
|
||||||
|
|
||||||
import dagger.Binds;
|
|
||||||
import dagger.Module;
|
|
||||||
import dagger.hilt.InstallIn;
|
|
||||||
import dagger.hilt.components.SingletonComponent;
|
|
||||||
|
|
||||||
import one.nem.lacerta.data.repository.Documents;
|
|
||||||
import one.nem.lacerta.data.impl.DocumentsImpl;
|
|
||||||
|
|
||||||
@Module
|
|
||||||
@InstallIn(SingletonComponent.class)
|
|
||||||
abstract public class DocumentsModule {
|
|
||||||
|
|
||||||
@Binds
|
|
||||||
public abstract Documents bindDocuments(DocumentsImpl documentsImpl);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package one.nem.lacerta.data.module;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.SharedPreferences;
|
|
||||||
|
|
||||||
import dagger.Binds;
|
|
||||||
import dagger.Module;
|
|
||||||
import dagger.hilt.InstallIn;
|
|
||||||
import dagger.hilt.components.SingletonComponent;
|
|
||||||
import one.nem.lacerta.data.impl.SharedPrefImpl;
|
|
||||||
import one.nem.lacerta.data.repository.SharedPref;
|
|
||||||
|
|
||||||
@Module
|
|
||||||
@InstallIn(SingletonComponent.class)
|
|
||||||
abstract public class SharedPrefModule {
|
|
||||||
|
|
||||||
@Binds
|
|
||||||
public abstract SharedPref bindSharedPref(SharedPrefImpl sharedPrefImpl);
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package one.nem.lacerta.data.processor;
|
||||||
|
|
||||||
|
import org.eclipse.jgit.lib.Repository;
|
||||||
|
|
||||||
|
import one.nem.lacerta.model.document.DocumentDetail;
|
||||||
|
|
||||||
|
public interface DocumentProcessor {
|
||||||
|
// TODO-rca: Initをここでやるべきか検討する?, Documentモデルを作るべきか検討する?
|
||||||
|
|
||||||
|
void setDocumentDetail(DocumentDetail documentDetail);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
package one.nem.lacerta.data.processor.impl;
|
||||||
|
|
||||||
|
public class DocumentProcessorImpl {
|
||||||
|
}
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
package one.nem.lacerta.data.repository;
|
|
||||||
|
|
||||||
import one.nem.lacerta.data.model.DeviceMetaModel;
|
|
||||||
|
|
||||||
public interface DeviceMeta {
|
|
||||||
DeviceMetaModel getDeviceMeta();
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
package one.nem.lacerta.data.repository;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import one.nem.lacerta.data.model.documents.DocumentDetail;
|
|
||||||
import one.nem.lacerta.data.model.documents.DocumentMeta;
|
|
||||||
|
|
||||||
public interface Documents {
|
|
||||||
|
|
||||||
ArrayList<DocumentMeta> getRecentDocuments(int limit);
|
|
||||||
|
|
||||||
ArrayList<DocumentMeta> getStarredDocuments(int limit);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
package one.nem.lacerta.data.repository;
|
|
||||||
|
|
||||||
import android.content.SharedPreferences;
|
|
||||||
|
|
||||||
import one.nem.lacerta.data.model.shared_pref.enums.SharedPrefType;
|
|
||||||
|
|
||||||
public interface SharedPref {
|
|
||||||
|
|
||||||
// タグのTypoを防ぐ為にEnumで管理して取得させるやつ
|
|
||||||
SharedPreferences getSharedPreferencesByTag(SharedPrefType sharedPrefType);
|
|
||||||
}
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
package one.nem.lacerta.source.pref.impl;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.SharedPreferences;
|
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import javax.inject.Inject;
|
|
||||||
|
|
||||||
import dagger.hilt.android.AndroidEntryPoint;
|
|
||||||
import dagger.hilt.android.qualifiers.ApplicationContext;
|
|
||||||
|
|
||||||
import one.nem.lacerta.source.pref.repository.Common;
|
|
||||||
|
|
||||||
public class CommonImpl implements Common {
|
|
||||||
|
|
||||||
Context applicationContext;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
public CommonImpl(@ApplicationContext Context applicationContext) {
|
|
||||||
this.applicationContext = applicationContext;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStringValue(String key) {
|
|
||||||
SharedPreferences pref = applicationContext.getSharedPreferences("common", Context.MODE_PRIVATE);
|
|
||||||
return pref.getString(key, "");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStringValue(String key, String value) {
|
|
||||||
SharedPreferences pref = applicationContext.getSharedPreferences("common", Context.MODE_PRIVATE);
|
|
||||||
SharedPreferences.Editor editor = pref.edit();
|
|
||||||
editor.putString(key, value);
|
|
||||||
editor.apply();
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isExist(String key) {
|
|
||||||
SharedPreferences pref = applicationContext.getSharedPreferences("common", Context.MODE_PRIVATE);
|
|
||||||
return pref.contains(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void remove(String key) {
|
|
||||||
SharedPreferences pref = applicationContext.getSharedPreferences("common", Context.MODE_PRIVATE);
|
|
||||||
SharedPreferences.Editor editor = pref.edit();
|
|
||||||
editor.remove(key);
|
|
||||||
editor.apply();
|
|
||||||
}
|
|
||||||
|
|
||||||
public ArrayList<String> getExistKeys() {
|
|
||||||
SharedPreferences pref = applicationContext.getSharedPreferences("common", Context.MODE_PRIVATE);
|
|
||||||
// キーだけをArrayListに切り出す
|
|
||||||
return new ArrayList<>(pref.getAll().keySet());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
package one.nem.lacerta.source.pref.module;
|
|
||||||
|
|
||||||
import dagger.Binds;
|
|
||||||
import dagger.Module;
|
|
||||||
import dagger.hilt.InstallIn;
|
|
||||||
import dagger.hilt.components.SingletonComponent;
|
|
||||||
import one.nem.lacerta.source.pref.impl.CommonImpl;
|
|
||||||
import one.nem.lacerta.source.pref.repository.Common;
|
|
||||||
|
|
||||||
@Module
|
|
||||||
@InstallIn(SingletonComponent.class)
|
|
||||||
abstract public class CommonModule {
|
|
||||||
|
|
||||||
@Binds
|
|
||||||
public abstract Common bindCommon(CommonImpl commonImpl);
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
package one.nem.lacerta.source.pref.repository;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface Common {
|
|
||||||
// さまざまな用途で使うPref
|
|
||||||
|
|
||||||
String getStringValue(String key);
|
|
||||||
|
|
||||||
void setStringValue(String key, String value);
|
|
||||||
|
|
||||||
boolean isExist(String key);
|
|
||||||
|
|
||||||
void remove(String key);
|
|
||||||
|
|
||||||
ArrayList<String> getExistKeys();
|
|
||||||
}
|
|
||||||
@@ -5,7 +5,7 @@ plugins {
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
namespace 'one.nem.lacerta.feature.debug'
|
namespace 'one.nem.lacerta.feature.debug'
|
||||||
compileSdk 33
|
compileSdk 34
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk 26
|
minSdk 26
|
||||||
@@ -45,9 +45,24 @@ dependencies {
|
|||||||
implementation libs.com.google.dagger.hilt.android
|
implementation libs.com.google.dagger.hilt.android
|
||||||
annotationProcessor libs.com.google.dagger.hilt.compiler
|
annotationProcessor libs.com.google.dagger.hilt.compiler
|
||||||
|
|
||||||
|
// JGit
|
||||||
|
implementation 'org.eclipse.jgit:org.eclipse.jgit:6.8.0.202311291450-r'
|
||||||
|
|
||||||
// 内部モジュール
|
// 内部モジュール
|
||||||
// data
|
// data
|
||||||
implementation project(':data')
|
implementation project(':data')
|
||||||
|
|
||||||
|
// Debug
|
||||||
|
implementation project(':source')
|
||||||
|
implementation project(':utils')
|
||||||
|
|
||||||
|
// 型
|
||||||
|
implementation project(':model')
|
||||||
|
|
||||||
|
// Shared
|
||||||
|
implementation project(':shared:ui')
|
||||||
|
|
||||||
|
// Scanner
|
||||||
|
implementation project(':component:scanner')
|
||||||
|
|
||||||
}
|
}
|
||||||
-24
@@ -1,24 +0,0 @@
|
|||||||
package one.nem.lacerta.feature.debug;
|
|
||||||
|
|
||||||
import android.os.Bundle;
|
|
||||||
|
|
||||||
import androidx.activity.EdgeToEdge;
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
|
||||||
import androidx.core.graphics.Insets;
|
|
||||||
import androidx.core.view.ViewCompat;
|
|
||||||
import androidx.core.view.WindowInsetsCompat;
|
|
||||||
|
|
||||||
public class DebugMenuContainerActivity extends AppCompatActivity {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
EdgeToEdge.enable(this);
|
|
||||||
setContentView(R.layout.activity_debug_menu_container);
|
|
||||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
|
|
||||||
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
|
||||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
|
||||||
return insets;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+67
@@ -0,0 +1,67 @@
|
|||||||
|
package one.nem.lacerta.feature.debug;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import dagger.hilt.android.AndroidEntryPoint;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A simple {@link Fragment} subclass.
|
||||||
|
* Use the {@link DebugMenuContainerFragment#newInstance} factory method to
|
||||||
|
* create an instance of this fragment.
|
||||||
|
*/
|
||||||
|
@AndroidEntryPoint
|
||||||
|
public class DebugMenuContainerFragment extends Fragment {
|
||||||
|
|
||||||
|
// TODO: Rename parameter arguments, choose names that match
|
||||||
|
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||||
|
private static final String ARG_PARAM1 = "param1";
|
||||||
|
private static final String ARG_PARAM2 = "param2";
|
||||||
|
|
||||||
|
// TODO: Rename and change types of parameters
|
||||||
|
private String mParam1;
|
||||||
|
private String mParam2;
|
||||||
|
|
||||||
|
public DebugMenuContainerFragment() {
|
||||||
|
// Required empty public constructor
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use this factory method to create a new instance of
|
||||||
|
* this fragment using the provided parameters.
|
||||||
|
*
|
||||||
|
* @param param1 Parameter 1.
|
||||||
|
* @param param2 Parameter 2.
|
||||||
|
* @return A new instance of fragment DebugMenuSubContainerFragment.
|
||||||
|
*/
|
||||||
|
// TODO: Rename and change types and number of parameters
|
||||||
|
public static DebugMenuContainerFragment newInstance(String param1, String param2) {
|
||||||
|
DebugMenuContainerFragment fragment = new DebugMenuContainerFragment();
|
||||||
|
Bundle args = new Bundle();
|
||||||
|
args.putString(ARG_PARAM1, param1);
|
||||||
|
args.putString(ARG_PARAM2, param2);
|
||||||
|
fragment.setArguments(args);
|
||||||
|
return fragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
if (getArguments() != null) {
|
||||||
|
mParam1 = getArguments().getString(ARG_PARAM1);
|
||||||
|
mParam2 = getArguments().getString(ARG_PARAM2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
|
Bundle savedInstanceState) {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
return inflater.inflate(R.layout.fragment_debug_menu_container, container, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
+81
@@ -0,0 +1,81 @@
|
|||||||
|
package one.nem.lacerta.feature.debug;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import dagger.hilt.android.AndroidEntryPoint;
|
||||||
|
import one.nem.lacerta.data.Document;
|
||||||
|
import one.nem.lacerta.feature.debug.common.adapter.DebugMenuDocumentListItemAdapter;
|
||||||
|
import one.nem.lacerta.feature.debug.common.model.DebugMenuDocumentListItem;
|
||||||
|
import one.nem.lacerta.model.document.DocumentMeta;
|
||||||
|
import one.nem.lacerta.utils.LacertaLogger;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A simple {@link Fragment} subclass.
|
||||||
|
* Use the {@link DebugMenuDocumentTesterListFragment#newInstance} factory method to
|
||||||
|
* create an instance of this fragment.
|
||||||
|
*/
|
||||||
|
|
||||||
|
@AndroidEntryPoint
|
||||||
|
public class DebugMenuDocumentTesterListFragment extends Fragment {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
Document document;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
LacertaLogger logger;
|
||||||
|
|
||||||
|
public DebugMenuDocumentTesterListFragment() {
|
||||||
|
// Required empty public constructor
|
||||||
|
}
|
||||||
|
|
||||||
|
public static DebugMenuDocumentTesterListFragment newInstance() {
|
||||||
|
DebugMenuDocumentTesterListFragment fragment = new DebugMenuDocumentTesterListFragment();
|
||||||
|
Bundle args = new Bundle();
|
||||||
|
fragment.setArguments(args);
|
||||||
|
return fragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
|
Bundle savedInstanceState) {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
View view = inflater.inflate(R.layout.fragment_debug_menu_document_tester_list, container, false);
|
||||||
|
|
||||||
|
RecyclerView recyclerView = view.findViewById(R.id.recycler_view_document_list);
|
||||||
|
recyclerView.setLayoutManager(new androidx.recyclerview.widget.LinearLayoutManager(getContext()));
|
||||||
|
|
||||||
|
ArrayList<DocumentMeta> documentMetas = document.getAllDocumentMetas(100);
|
||||||
|
|
||||||
|
logger.debug("Debug/DocList", "Document count: " + documentMetas.size());
|
||||||
|
|
||||||
|
List<DebugMenuDocumentListItem> debugMenuDocumentListItems = new ArrayList<>();
|
||||||
|
|
||||||
|
for (DocumentMeta documentMeta : documentMetas) {
|
||||||
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
debugMenuDocumentListItems.add(new DebugMenuDocumentListItem(documentMeta.getTitle(), "Internal Id: " + documentMeta.getId(), simpleDateFormat.format(documentMeta.getUpdatedAt())));
|
||||||
|
}
|
||||||
|
|
||||||
|
DebugMenuDocumentListItemAdapter adapter = new DebugMenuDocumentListItemAdapter(debugMenuDocumentListItems);
|
||||||
|
recyclerView.setAdapter(adapter);
|
||||||
|
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
}
|
||||||
+72
@@ -0,0 +1,72 @@
|
|||||||
|
package one.nem.lacerta.feature.debug;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import com.google.android.material.textfield.TextInputEditText;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import dagger.hilt.android.AndroidEntryPoint;
|
||||||
|
import dagger.multibindings.IntKey;
|
||||||
|
import one.nem.lacerta.data.DocumentDebug;
|
||||||
|
|
||||||
|
import one.nem.lacerta.model.document.DocumentMeta;
|
||||||
|
import one.nem.lacerta.model.document.DocumentDetail;
|
||||||
|
|
||||||
|
import one.nem.lacerta.model.document.path.DocumentPath;
|
||||||
|
import one.nem.lacerta.model.document.tag.DocumentTag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A simple {@link Fragment} subclass.
|
||||||
|
* Use the {@link DebugMenuDocumentTesterManageFragment#newInstance} factory method to
|
||||||
|
* create an instance of this fragment.
|
||||||
|
*/
|
||||||
|
@AndroidEntryPoint
|
||||||
|
public class DebugMenuDocumentTesterManageFragment extends Fragment {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
DocumentDebug documentDebug;
|
||||||
|
|
||||||
|
public DebugMenuDocumentTesterManageFragment() {
|
||||||
|
// Required empty public constructor
|
||||||
|
}
|
||||||
|
|
||||||
|
public static DebugMenuDocumentTesterManageFragment newInstance() {
|
||||||
|
DebugMenuDocumentTesterManageFragment fragment = new DebugMenuDocumentTesterManageFragment();
|
||||||
|
Bundle args = new Bundle();
|
||||||
|
fragment.setArguments(args);
|
||||||
|
return fragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
|
Bundle savedInstanceState) {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
View view = inflater.inflate(R.layout.fragment_debug_menu_document_tester_manage, container, false);
|
||||||
|
|
||||||
|
TextInputEditText editTextDocumentTitle = view.findViewById(R.id.edit_text_document_title);
|
||||||
|
view.findViewById(R.id.button_insert_test_data).setOnClickListener( v -> {
|
||||||
|
|
||||||
|
DocumentMeta meta = new DocumentMeta(editTextDocumentTitle != null ? editTextDocumentTitle.getText().toString() : "empty title"); // TODO-rca: Nullable
|
||||||
|
DocumentPath path = new DocumentPath("root", "test_path");
|
||||||
|
DocumentDetail detail = new DocumentDetail(meta, path, "test_author", "test_default_branch");
|
||||||
|
|
||||||
|
documentDebug.insertDocument(meta, detail);
|
||||||
|
});
|
||||||
|
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
}
|
||||||
+59
@@ -0,0 +1,59 @@
|
|||||||
|
package one.nem.lacerta.feature.debug;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import one.nem.lacerta.feature.debug.common.adapter.DebugMenuListItemAdapter;
|
||||||
|
import one.nem.lacerta.feature.debug.common.model.DebugMenuListItem;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A simple {@link Fragment} subclass.
|
||||||
|
* Use the {@link DebugMenuDocumentTesterTopFragment#newInstance} factory method to
|
||||||
|
* create an instance of this fragment.
|
||||||
|
*/
|
||||||
|
public class DebugMenuDocumentTesterTopFragment extends Fragment {
|
||||||
|
public DebugMenuDocumentTesterTopFragment() {
|
||||||
|
// Required empty public constructor
|
||||||
|
}
|
||||||
|
public static DebugMenuDocumentTesterTopFragment newInstance() {
|
||||||
|
DebugMenuDocumentTesterTopFragment fragment = new DebugMenuDocumentTesterTopFragment();
|
||||||
|
Bundle args = new Bundle();
|
||||||
|
fragment.setArguments(args);
|
||||||
|
return fragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
|
Bundle savedInstanceState) {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
View view = inflater.inflate(R.layout.fragment_debug_menu_document_tester_top, container, false);
|
||||||
|
|
||||||
|
RecyclerView recyclerView = view.findViewById(R.id.debug_menu_document_tester_recycler_view);
|
||||||
|
recyclerView.setLayoutManager(new androidx.recyclerview.widget.LinearLayoutManager(getContext()));
|
||||||
|
|
||||||
|
List<DebugMenuListItem> debugMenuDocTesterListItems = new ArrayList<>();
|
||||||
|
|
||||||
|
debugMenuDocTesterListItems.add(new DebugMenuListItem("DocumentListFragment", "DocumentListFragment", R.id.action_debugMenuDocumentTesterTopFragment_to_debugMenuDocumentTesterListFragment, true));
|
||||||
|
debugMenuDocTesterListItems.add(new DebugMenuListItem("DocumentManagerFragment", "DocumentManagerFragment", R.id.action_debugMenuDocumentTesterTopFragment_to_debugMenuDocumentTesterManageFragment, true));
|
||||||
|
|
||||||
|
|
||||||
|
DebugMenuListItemAdapter adapter = new DebugMenuListItemAdapter(debugMenuDocTesterListItems);
|
||||||
|
recyclerView.setAdapter(adapter);
|
||||||
|
return view;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
+110
@@ -0,0 +1,110 @@
|
|||||||
|
package one.nem.lacerta.feature.debug;
|
||||||
|
|
||||||
|
import android.graphics.Bitmap;
|
||||||
|
import android.graphics.Canvas;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.graphics.Paint;
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.EditText;
|
||||||
|
|
||||||
|
import dagger.hilt.android.AndroidEntryPoint;
|
||||||
|
import one.nem.lacerta.source.file.FileManager;
|
||||||
|
import one.nem.lacerta.source.file.factory.FileManagerFactory;
|
||||||
|
|
||||||
|
import one.nem.lacerta.utils.repository.DeviceInfoUtils;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A simple {@link Fragment} subclass.
|
||||||
|
* Use the {@link DebugMenuFileManagerTesterFragment#newInstance} factory method to
|
||||||
|
* create an instance of this fragment.
|
||||||
|
*/
|
||||||
|
@AndroidEntryPoint
|
||||||
|
public class DebugMenuFileManagerTesterFragment extends Fragment {
|
||||||
|
|
||||||
|
public DebugMenuFileManagerTesterFragment() {
|
||||||
|
// Required empty public constructor
|
||||||
|
}
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
FileManagerFactory fileManagerFactory;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
DeviceInfoUtils deviceInfoUtils;
|
||||||
|
|
||||||
|
// TODO: Rename and change types and number of parameters
|
||||||
|
public static DebugMenuFileManagerTesterFragment newInstance() {
|
||||||
|
DebugMenuFileManagerTesterFragment fragment = new DebugMenuFileManagerTesterFragment();
|
||||||
|
Bundle args = new Bundle();
|
||||||
|
|
||||||
|
fragment.setArguments(args);
|
||||||
|
return fragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
|
Bundle savedInstanceState) {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
View view = inflater.inflate(R.layout.fragment_debug_menu_file_manager_tester, container, false);
|
||||||
|
|
||||||
|
view.findViewById(R.id.button_create_directory).setOnClickListener(v -> {
|
||||||
|
EditText editText = view.findViewById(R.id.edit_text_dir_name);
|
||||||
|
String dirName = editText.getText().toString();
|
||||||
|
|
||||||
|
FileManager fileManager = fileManagerFactory.create(deviceInfoUtils.getExternalStorageDirectory());
|
||||||
|
fileManager.createDir(dirName);
|
||||||
|
});
|
||||||
|
|
||||||
|
view.findViewById(R.id.button_save_item).setOnClickListener(v -> {
|
||||||
|
FileManager fileManager = fileManagerFactory.create(deviceInfoUtils.getExternalStorageDirectory());
|
||||||
|
fileManager.createDir("test");
|
||||||
|
fileManager.changeDir("test");
|
||||||
|
Bitmap bitmap = Bitmap.createBitmap(1000, 1000, Bitmap.Config.ARGB_8888);
|
||||||
|
// Bitmapに描画処理を行う
|
||||||
|
Canvas canvas = new Canvas(bitmap);
|
||||||
|
// 大きな山の形状を作成
|
||||||
|
android.graphics.Path bigMountainPath = new android.graphics.Path();
|
||||||
|
bigMountainPath.moveTo(100, 800); // 左下の開始点
|
||||||
|
bigMountainPath.lineTo(500, 300); // 頂点
|
||||||
|
bigMountainPath.lineTo(900, 800); // 右下
|
||||||
|
bigMountainPath.close(); // パスを閉じる
|
||||||
|
|
||||||
|
// 山の描画設定
|
||||||
|
Paint mountainPaint = new Paint();
|
||||||
|
mountainPaint.setColor(Color.GREEN);
|
||||||
|
mountainPaint.setStyle(Paint.Style.FILL);
|
||||||
|
|
||||||
|
// 大きな山を描画
|
||||||
|
canvas.drawPath(bigMountainPath, mountainPaint);
|
||||||
|
|
||||||
|
// 小さな山の形状を作成
|
||||||
|
android.graphics.Path smallMountainPath = new android.graphics.Path();
|
||||||
|
smallMountainPath.moveTo(400, 800); // 左下の開始点
|
||||||
|
smallMountainPath.lineTo(650, 400); // 頂点
|
||||||
|
smallMountainPath.lineTo(900, 800); // 右下
|
||||||
|
smallMountainPath.close(); // パスを閉じる
|
||||||
|
|
||||||
|
Paint smallMountainPaint = new Paint();
|
||||||
|
smallMountainPaint.setColor(Color.parseColor("#006e54"));
|
||||||
|
smallMountainPaint.setStyle(Paint.Style.FILL);
|
||||||
|
|
||||||
|
// 小さな山を描画
|
||||||
|
canvas.drawPath(smallMountainPath, smallMountainPaint);
|
||||||
|
fileManager.saveBitmapAtCurrent(bitmap, "test.png");
|
||||||
|
});
|
||||||
|
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
package one.nem.lacerta.feature.debug;
|
|
||||||
|
|
||||||
import android.os.Bundle;
|
|
||||||
|
|
||||||
import androidx.fragment.app.Fragment;
|
|
||||||
import androidx.navigation.Navigation;
|
|
||||||
import androidx.navigation.ui.NavigationUI;
|
|
||||||
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.widget.Button;
|
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import dagger.hilt.android.AndroidEntryPoint;
|
|
||||||
import javax.inject.Inject;
|
|
||||||
|
|
||||||
import one.nem.lacerta.data.repository.DeviceMeta;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A simple {@link Fragment} subclass.
|
|
||||||
* Use the {@link DebugMenuFragment#newInstance} factory method to
|
|
||||||
* create an instance of this fragment.
|
|
||||||
*/
|
|
||||||
|
|
||||||
@AndroidEntryPoint
|
|
||||||
public class DebugMenuFragment extends Fragment {
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
DeviceMeta deviceMeta;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
|
|
||||||
|
|
||||||
public DebugMenuFragment() {
|
|
||||||
// Required empty public constructor
|
|
||||||
}
|
|
||||||
|
|
||||||
public static DebugMenuFragment newInstance() {
|
|
||||||
DebugMenuFragment fragment = new DebugMenuFragment();
|
|
||||||
Bundle args = new Bundle();
|
|
||||||
fragment.setArguments(args);
|
|
||||||
return fragment;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
|
||||||
Bundle savedInstanceState) {
|
|
||||||
// Inflate the layout for this fragment
|
|
||||||
return inflater.inflate(R.layout.fragment_debug_menu, container, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
|
||||||
super.onViewCreated(view, savedInstanceState);
|
|
||||||
|
|
||||||
view.findViewById(R.id.btn_debug_menu_scan).setOnClickListener( v -> {
|
|
||||||
// スキャン機能呼び出し
|
|
||||||
Toast.makeText(getContext(), "testMessage", Toast.LENGTH_SHORT).show();
|
|
||||||
});
|
|
||||||
|
|
||||||
view.findViewById(R.id.btn_debug_menu_shared_pref_editor).setOnClickListener( v -> {
|
|
||||||
// Fragment移動
|
|
||||||
Navigation.findNavController(view).navigate(R.id.action_debugMenuFragment_to_debugSharedPrefEditorFragment);
|
|
||||||
});
|
|
||||||
|
|
||||||
view.findViewById(R.id.btn_debug_menu_clear_pref).setOnClickListener( v -> {
|
|
||||||
// SharedPrefClear
|
|
||||||
});
|
|
||||||
|
|
||||||
view.findViewById(R.id.btn_debug_menu_call_play_ground).setOnClickListener( v -> {
|
|
||||||
Navigation.findNavController(view).navigate(R.id.action_debugMenuFragment_to_debugPlayGroundFragment);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+39
@@ -0,0 +1,39 @@
|
|||||||
|
package one.nem.lacerta.feature.debug;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A simple {@link Fragment} subclass.
|
||||||
|
* Use the {@link DebugMenuMetaDataFragment#newInstance} factory method to
|
||||||
|
* create an instance of this fragment.
|
||||||
|
*/
|
||||||
|
public class DebugMenuMetaDataFragment extends Fragment {
|
||||||
|
public DebugMenuMetaDataFragment() {
|
||||||
|
// Required empty public constructor
|
||||||
|
}
|
||||||
|
|
||||||
|
public static DebugMenuMetaDataFragment newInstance() {
|
||||||
|
DebugMenuMetaDataFragment fragment = new DebugMenuMetaDataFragment();
|
||||||
|
Bundle args = new Bundle();
|
||||||
|
fragment.setArguments(args);
|
||||||
|
return fragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
|
Bundle savedInstanceState) {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
return inflater.inflate(R.layout.fragment_debug_menu_meta_data, container, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
package one.nem.lacerta.feature.debug;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import dagger.hilt.android.AndroidEntryPoint;
|
||||||
|
import one.nem.lacerta.feature.debug.common.adapter.DebugMenuListItemAdapter;
|
||||||
|
import one.nem.lacerta.feature.debug.common.model.DebugMenuListItem;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A simple {@link Fragment} subclass.
|
||||||
|
* Use the {@link DebugMenuTopFragment#newInstance} factory method to
|
||||||
|
* create an instance of this fragment.
|
||||||
|
*/
|
||||||
|
@AndroidEntryPoint
|
||||||
|
public class DebugMenuTopFragment extends Fragment {
|
||||||
|
public DebugMenuTopFragment() {
|
||||||
|
// Required empty public constructor
|
||||||
|
}
|
||||||
|
public static DebugMenuTopFragment newInstance() {
|
||||||
|
DebugMenuTopFragment fragment = new DebugMenuTopFragment();
|
||||||
|
Bundle args = new Bundle();
|
||||||
|
fragment.setArguments(args);
|
||||||
|
return fragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
|
Bundle savedInstanceState) {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
View view = inflater.inflate(R.layout.fragment_debug_menu_top, container, false);
|
||||||
|
|
||||||
|
RecyclerView recyclerView = view.findViewById(R.id.debug_menu_recycler_view);
|
||||||
|
recyclerView.setLayoutManager(new androidx.recyclerview.widget.LinearLayoutManager(getContext()));
|
||||||
|
List<DebugMenuListItem> debugMenuListItems = new ArrayList<>();
|
||||||
|
|
||||||
|
debugMenuListItems.add(new DebugMenuListItem("Meta Data", "View meta data", R.id.action_debugMenuTopFragment_to_debugMenuMetaDataFragment, true));
|
||||||
|
debugMenuListItems.add(new DebugMenuListItem("Document Tester", "placeholder", R.id.action_debugMenuTopFragment_to_debugMenuDocumentTesterTopFragment, true));
|
||||||
|
debugMenuListItems.add(new DebugMenuListItem("Scanner", "placeholder", R.id.action_debugMenuTopFragment_to_scannerDataManagerStubFragment, true));
|
||||||
|
debugMenuListItems.add(new DebugMenuListItem("File Manager", "placeholder", R.id.action_debugMenuTopFragment_to_debugMenuFileManagerTesterFragment, true));
|
||||||
|
|
||||||
|
DebugMenuListItemAdapter adapter = new DebugMenuListItemAdapter(debugMenuListItems);
|
||||||
|
recyclerView.setAdapter(adapter);
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
}
|
||||||
-65
@@ -1,65 +0,0 @@
|
|||||||
package one.nem.lacerta.feature.debug;
|
|
||||||
|
|
||||||
import android.os.Bundle;
|
|
||||||
|
|
||||||
import androidx.fragment.app.Fragment;
|
|
||||||
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import one.nem.lacerta.data.repository.Documents;
|
|
||||||
|
|
||||||
import one.nem.lacerta.data.repository.SharedPref;
|
|
||||||
|
|
||||||
import one.nem.lacerta.data.model.shared_pref.enums.SharedPrefType;
|
|
||||||
|
|
||||||
import javax.inject.Inject;
|
|
||||||
|
|
||||||
import dagger.hilt.android.AndroidEntryPoint;
|
|
||||||
|
|
||||||
@AndroidEntryPoint // HiltのDIを有効にするアノテーション
|
|
||||||
public class DebugPlayGroundFragment extends Fragment {
|
|
||||||
|
|
||||||
@Inject // DI
|
|
||||||
Documents documents;
|
|
||||||
|
|
||||||
@Inject // DI
|
|
||||||
SharedPref sharedPref;
|
|
||||||
|
|
||||||
public DebugPlayGroundFragment() {
|
|
||||||
// Required empty public constructor
|
|
||||||
}
|
|
||||||
|
|
||||||
public static DebugPlayGroundFragment newInstance() {
|
|
||||||
DebugPlayGroundFragment fragment = new DebugPlayGroundFragment();
|
|
||||||
Bundle args = new Bundle();
|
|
||||||
fragment.setArguments(args);
|
|
||||||
return fragment;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
|
||||||
Bundle savedInstanceState) {
|
|
||||||
// Inflate the layout for this fragment
|
|
||||||
return inflater.inflate(R.layout.fragment_debug_play_ground, container, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
|
||||||
super.onViewCreated(view, savedInstanceState);
|
|
||||||
|
|
||||||
// ここがいままでのonCreateと同等のものです。
|
|
||||||
// findViewById(R.id.hoge)とかは view.findViewById(R.id.hoge) と書き換える必要アリ
|
|
||||||
// (viewは引数として受け取ってるviewなので、別メソッドに切り出したりするなら渡してあげる)
|
|
||||||
|
|
||||||
// ShardPrefの要素数をトーストする例
|
|
||||||
Toast.makeText(getContext(), "SharedPrefの要素数: " + sharedPref.getSharedPreferencesByTag(SharedPrefType.COMMON).getAll().size(), Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-115
@@ -1,115 +0,0 @@
|
|||||||
package one.nem.lacerta.feature.debug;
|
|
||||||
|
|
||||||
import android.os.Bundle;
|
|
||||||
|
|
||||||
import androidx.fragment.app.Fragment;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
|
|
||||||
import android.util.Log;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.widget.EditText;
|
|
||||||
import android.widget.RadioGroup;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import org.w3c.dom.Text;
|
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import one.nem.lacerta.data.model.shared_pref.enums.SharedPrefType;
|
|
||||||
import one.nem.lacerta.source.pref.repository.Common; //TODO-rca: 名前変えるべきかも
|
|
||||||
|
|
||||||
import one.nem.lacerta.data.repository.SharedPref;
|
|
||||||
|
|
||||||
import javax.inject.Inject;
|
|
||||||
|
|
||||||
import dagger.hilt.android.AndroidEntryPoint;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A simple {@link Fragment} subclass.
|
|
||||||
* Use the {@link DebugSharedPrefEditorFragment#newInstance} factory method to
|
|
||||||
* create an instance of this fragment.
|
|
||||||
*/
|
|
||||||
@AndroidEntryPoint
|
|
||||||
public class DebugSharedPrefEditorFragment extends Fragment {
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
Common prefCommon;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
SharedPref sharedPref;
|
|
||||||
|
|
||||||
SharedPrefType sharedPrefType = null;
|
|
||||||
|
|
||||||
public DebugSharedPrefEditorFragment() {
|
|
||||||
// Required empty public constructor
|
|
||||||
}
|
|
||||||
|
|
||||||
public static DebugSharedPrefEditorFragment newInstance() {
|
|
||||||
DebugSharedPrefEditorFragment fragment = new DebugSharedPrefEditorFragment();
|
|
||||||
Bundle args = new Bundle();
|
|
||||||
fragment.setArguments(args);
|
|
||||||
return fragment;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
|
||||||
Bundle savedInstanceState) {
|
|
||||||
// Inflate the layout for this fragment
|
|
||||||
return inflater.inflate(R.layout.fragment_debug_shared_pref_editor, container, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
|
||||||
super.onViewCreated(view, savedInstanceState);
|
|
||||||
|
|
||||||
EditText loadKeyEditText = view.findViewById(R.id.loadKeyEditText);
|
|
||||||
EditText saveKeyEditText = view.findViewById(R.id.saveKeyEditText);
|
|
||||||
|
|
||||||
TextView prefItemTextView = view.findViewById(R.id.prefItemTextView);
|
|
||||||
|
|
||||||
view.findViewById(R.id.loadButton).setOnClickListener(v -> {
|
|
||||||
String value = sharedPref.getSharedPreferencesByTag(sharedPrefType).getString(loadKeyEditText.getText().toString(), "null");
|
|
||||||
((TextView) view.findViewById(R.id.loadValueTextView)).setText(value);
|
|
||||||
});
|
|
||||||
|
|
||||||
view.findViewById(R.id.saveButton).setOnClickListener(v -> {
|
|
||||||
String[] split = saveKeyEditText.getText().toString().split(":");
|
|
||||||
sharedPref.getSharedPreferencesByTag(sharedPrefType).edit().putString(split[0], split[1]).apply();
|
|
||||||
updateList(prefItemTextView);
|
|
||||||
});
|
|
||||||
|
|
||||||
// ラジオボタンの変更を監視
|
|
||||||
((RadioGroup) view.findViewById(R.id.radioGroupPrefType)).setOnCheckedChangeListener((group, checkedId) -> {
|
|
||||||
if (checkedId == R.id.radioButtonCommon) {
|
|
||||||
sharedPrefType = SharedPrefType.COMMON;
|
|
||||||
updateList(prefItemTextView);
|
|
||||||
} else if (checkedId == R.id.radioButtonUserData) {
|
|
||||||
sharedPrefType = SharedPrefType.USERDATA;
|
|
||||||
updateList(prefItemTextView);
|
|
||||||
} else {
|
|
||||||
Log.e("DebugSharedPrefEditorFragment", "radioButtonのIDが不正です");
|
|
||||||
}
|
|
||||||
updateList(prefItemTextView);
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updateList(TextView textView) {
|
|
||||||
// リストの更新
|
|
||||||
Map<String, ?> resultMap = sharedPref.getSharedPreferencesByTag(sharedPrefType).getAll();
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
for (Map.Entry<String, ?> entry : resultMap.entrySet()) {
|
|
||||||
sb.append(entry.getKey()).append(":").append(entry.getValue().toString()).append("\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
textView.setText(sb.toString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+67
@@ -0,0 +1,67 @@
|
|||||||
|
package one.nem.lacerta.feature.debug.common.adapter;
|
||||||
|
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import one.nem.lacerta.feature.debug.R;
|
||||||
|
import one.nem.lacerta.feature.debug.common.model.DebugMenuDocumentListItem;
|
||||||
|
|
||||||
|
public class DebugMenuDocumentListItemAdapter extends RecyclerView.Adapter<DebugMenuDocumentListItemAdapter.DebugMenuDocumentListItemViewHolder> {
|
||||||
|
|
||||||
|
private List<DebugMenuDocumentListItem> debugMenuDocumentListItems;
|
||||||
|
|
||||||
|
public DebugMenuDocumentListItemAdapter(List<DebugMenuDocumentListItem> debugMenuDocumentListItems) {
|
||||||
|
this.debugMenuDocumentListItems = debugMenuDocumentListItems;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public DebugMenuDocumentListItemViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_item_debug_menu_document, parent, false);
|
||||||
|
return new DebugMenuDocumentListItemViewHolder(view);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull DebugMenuDocumentListItemViewHolder holder, int position) {
|
||||||
|
DebugMenuDocumentListItem item = debugMenuDocumentListItems.get(position);
|
||||||
|
|
||||||
|
// Set title
|
||||||
|
holder.title.setText(item.getTitle());
|
||||||
|
// Set description
|
||||||
|
holder.description.setText(item.getDescription());
|
||||||
|
// Set updated at
|
||||||
|
holder.updatedAt.setText("Updated at: " + item.getUpdatedAt());
|
||||||
|
|
||||||
|
holder.itemView.setOnClickListener(v -> {
|
||||||
|
Toast.makeText(v.getContext(), "Clicked on " + item.getTitle(), Toast.LENGTH_SHORT).show(); // Debug
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return debugMenuDocumentListItems.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public class DebugMenuDocumentListItemViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
|
TextView title;
|
||||||
|
TextView description;
|
||||||
|
TextView updatedAt;
|
||||||
|
public DebugMenuDocumentListItemViewHolder(@NonNull View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
|
||||||
|
title = itemView.findViewById(R.id.document_list_item_title);
|
||||||
|
description = itemView.findViewById(R.id.document_list_item_description);
|
||||||
|
updatedAt = itemView.findViewById(R.id.document_list_item_updated_at);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+63
@@ -0,0 +1,63 @@
|
|||||||
|
package one.nem.lacerta.feature.debug.common.adapter;
|
||||||
|
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.navigation.Navigation;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import one.nem.lacerta.feature.debug.R;
|
||||||
|
import one.nem.lacerta.feature.debug.common.model.DebugMenuListItem;
|
||||||
|
import one.nem.lacerta.utils.LacertaLogger;
|
||||||
|
|
||||||
|
public class DebugMenuListItemAdapter extends RecyclerView.Adapter<DebugMenuListItemAdapter.DebugMenuListItemViewHolder> {
|
||||||
|
private List<DebugMenuListItem> debugMenuListItems;
|
||||||
|
|
||||||
|
public DebugMenuListItemAdapter(List<DebugMenuListItem> debugMenuListItems) {
|
||||||
|
this.debugMenuListItems = debugMenuListItems;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public DebugMenuListItemViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_item_debug_menu, parent, false);
|
||||||
|
return new DebugMenuListItemViewHolder(view);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull DebugMenuListItemViewHolder holder, int position) {
|
||||||
|
DebugMenuListItem item = debugMenuListItems.get(position);
|
||||||
|
// Set title
|
||||||
|
holder.title.setText(item.getTitle());
|
||||||
|
// Set description
|
||||||
|
holder.description.setText(item.getDescription());
|
||||||
|
|
||||||
|
holder.itemView.setOnClickListener( v -> {
|
||||||
|
Navigation.findNavController(v).navigate(item.getDestinationId());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return debugMenuListItems.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
static class DebugMenuListItemViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
TextView title;
|
||||||
|
TextView description;
|
||||||
|
|
||||||
|
public DebugMenuListItemViewHolder(@NonNull View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
|
||||||
|
// Get ref to views
|
||||||
|
title = itemView.findViewById(R.id.debug_menu_item_title);
|
||||||
|
description = itemView.findViewById(R.id.debug_menu_item_description);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+27
@@ -0,0 +1,27 @@
|
|||||||
|
package one.nem.lacerta.feature.debug.common.model;
|
||||||
|
|
||||||
|
public class DebugMenuDocumentListItem {
|
||||||
|
|
||||||
|
private String title;
|
||||||
|
private String description;
|
||||||
|
private String updatedAt;
|
||||||
|
|
||||||
|
public DebugMenuDocumentListItem(String title, String description, String updatedAt) {
|
||||||
|
this.title = title;
|
||||||
|
this.description = description;
|
||||||
|
this.updatedAt = updatedAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdatedAt() {
|
||||||
|
return updatedAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+38
@@ -0,0 +1,38 @@
|
|||||||
|
package one.nem.lacerta.feature.debug.common.model;
|
||||||
|
|
||||||
|
public class DebugMenuListItem {
|
||||||
|
|
||||||
|
private String title;
|
||||||
|
private String description;
|
||||||
|
private int destinationId; // Navigation destination ID
|
||||||
|
private boolean enabled;
|
||||||
|
|
||||||
|
public DebugMenuListItem(String title, String description, int destinationId, boolean enabled) {
|
||||||
|
this.title = title;
|
||||||
|
this.description = description;
|
||||||
|
this.destinationId = destinationId;
|
||||||
|
this.enabled = enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDestinationId() {
|
||||||
|
return destinationId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isEnabled() {
|
||||||
|
return enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnabled(boolean enabled) {
|
||||||
|
this.enabled = enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
tools:context=".DebugMenuFragment">
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Debug Menu"
|
|
||||||
android:textSize="36sp"
|
|
||||||
android:padding="16dp" />
|
|
||||||
|
|
||||||
<ScrollView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical" >
|
|
||||||
|
|
||||||
<!-- Call Events -->
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Call Debug Events"
|
|
||||||
android:textSize="24sp"
|
|
||||||
android:padding="8dp" />
|
|
||||||
<!-- android:textColor="@color/material_dynamic_primary10" />-->
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/btn_debug_menu_scan"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Start scan action"
|
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:layout_marginEnd="16dp"
|
|
||||||
android:layout_marginTop="8dp" />
|
|
||||||
|
|
||||||
<!-- Padding -->
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="16dp" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:padding="8dp"
|
|
||||||
android:text="SharedPref"
|
|
||||||
android:textSize="24sp" />
|
|
||||||
<!-- android:textColor="@color/material_dynamic_primary10" />-->
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/btn_debug_menu_clear_pref"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Clear Preferences"
|
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:layout_marginEnd="16dp"
|
|
||||||
android:layout_marginTop="8dp" />
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/btn_debug_menu_shared_pref_editor"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Shared Preferences Editor"
|
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:layout_marginEnd="16dp"
|
|
||||||
android:layout_marginTop="8dp" />
|
|
||||||
|
|
||||||
<!-- Padding -->
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="16dp" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:padding="8dp"
|
|
||||||
android:text="SharedPref"
|
|
||||||
android:textSize="24sp" />
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/btn_debug_menu_call_play_ground"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:layout_marginEnd="16dp"
|
|
||||||
android:text="Playground" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</ScrollView>
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:theme="@style/Theme.Lacerta"
|
||||||
|
tools:context=".DebugMenuContainerFragment" >
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
|
android:id="@+id/debug_menu_top_toolbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/colorPrimaryContainer"
|
||||||
|
app:titleTextColor="@color/colorOnPrimaryContainer"
|
||||||
|
app:title="Debug Menu"
|
||||||
|
android:minHeight="?attr/actionBarSize"
|
||||||
|
android:theme="?attr/actionBarTheme"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<androidx.fragment.app.FragmentContainerView
|
||||||
|
android:id="@+id/fragmentContainerView"
|
||||||
|
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
app:defaultNavHost="true"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/debug_menu_top_toolbar"
|
||||||
|
app:navGraph="@navigation/feature_debug_internal_navigation" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
+6
-12
@@ -2,22 +2,16 @@
|
|||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/main"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".DebugMenuContainerActivity">
|
tools:context=".DebugMenuDocumentTesterListFragment" >
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/fragmentContainerView"
|
android:id="@+id/recycler_view_document_list"
|
||||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="409dp"
|
android:layout_height="0dp"
|
||||||
android:layout_height="729dp"
|
|
||||||
android:layout_marginStart="1dp"
|
|
||||||
android:layout_marginEnd="1dp"
|
|
||||||
app:defaultNavHost="true"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
app:navGraph="@navigation/feature_debug_navigation" />
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".DebugMenuDocumentTesterManageFragment" >
|
||||||
|
|
||||||
|
<ScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical" >
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
android:background="@drawable/rounded_secondary_container">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView2"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textColor="@color/colorOnSecondaryContainer"
|
||||||
|
android:text="Debug actions" />
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="Document title"
|
||||||
|
android:id="@+id/edit_text_document_title"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
android:inputType="text"
|
||||||
|
android:textSize="16sp"
|
||||||
|
style="@style/ThemeOverlay.Material3.TextInputEditText.OutlinedBox" />
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/button_insert_test_data"
|
||||||
|
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
android:text="Insert test data"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</ScrollView>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:theme="@style/Theme.Lacerta"
|
||||||
|
tools:context=".DebugMenuDocumentTesterTopFragment">
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:id="@+id/debug_menu_document_tester_recycler_view"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"/>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".DebugMenuFileManagerTesterFragment">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/edit_text_dir_name"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button_create_directory"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Create dir" />
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button_dir_list"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="List item in current" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button_save_item"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Save Test Image" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
+3
-5
@@ -3,12 +3,10 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".DebugPlayGroundFragment">
|
tools:context=".DebugMenuMetaDataFragment">
|
||||||
|
|
||||||
<!-- TODO: Update blank fragment layout -->
|
<!-- TODO: Update blank fragment layout -->
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:text="@string/hello_blank_fragment" />
|
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:theme="@style/Theme.Lacerta"
|
||||||
|
tools:context=".DebugMenuTopFragment" >
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/debug_menu_recycler_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -1,121 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
tools:context=".DebugSharedPrefEditorFragment">
|
|
||||||
|
|
||||||
<RadioGroup
|
|
||||||
android:id="@+id/radioGroupPrefType"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<RadioButton
|
|
||||||
android:id="@+id/radioButtonCommon"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="Common" />
|
|
||||||
|
|
||||||
<RadioButton
|
|
||||||
android:id="@+id/radioButtonUserData"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="UserData" />
|
|
||||||
|
|
||||||
</RadioGroup>
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Save pref" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/SaveLinearLayout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:weightSum="3">
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/saveKeyEditText"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="4dp"
|
|
||||||
android:layout_weight="2"
|
|
||||||
android:hint="Key:Value" />
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/saveButton"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="4dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="Save" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Load pref" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/LoadLinearLayout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:weightSum="3">
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/loadKeyEditText"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="2"
|
|
||||||
android:hint="Key" />
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/loadButton"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="Load" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/loadValueTextView"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="No value..."
|
|
||||||
android:textSize="24sp" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<ScrollView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical" >
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/prefItemTextView"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:text="None" />
|
|
||||||
</LinearLayout>
|
|
||||||
</ScrollView>
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/debug_menu_item_title"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/debug_menu_item_description"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="14sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/debug_menu_item_title" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/document_list_item_title"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:text="TITLE"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/document_list_item_updated_at"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/document_list_item_description"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:text="DESCRIPTION"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/document_list_item_title" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/document_list_item_updated_at"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:text="Updated at: aaaaaaaaaa"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/feature_debug_internal_navigation"
|
||||||
|
app:startDestination="@id/debugMenuTopFragment">
|
||||||
|
|
||||||
|
<fragment
|
||||||
|
android:id="@+id/debugMenuTopFragment"
|
||||||
|
android:name="one.nem.lacerta.feature.debug.DebugMenuTopFragment"
|
||||||
|
android:label="fragment_debug_menu_top"
|
||||||
|
tools:layout="@layout/fragment_debug_menu_top" >
|
||||||
|
<action
|
||||||
|
android:id="@+id/action_debugMenuTopFragment_to_debugMenuMetaDataFragment"
|
||||||
|
app:destination="@id/debugMenuMetaDataFragment" />
|
||||||
|
<action
|
||||||
|
android:id="@+id/action_debugMenuTopFragment_to_debugMenuDocumentTesterTopFragment"
|
||||||
|
app:destination="@id/debugMenuDocumentTesterTopFragment" />
|
||||||
|
<action
|
||||||
|
android:id="@+id/action_debugMenuTopFragment_to_scannerDataManagerStubFragment"
|
||||||
|
app:destination="@id/scannerDataManagerStubFragment" />
|
||||||
|
<action
|
||||||
|
android:id="@+id/action_debugMenuTopFragment_to_debugMenuFileManagerTesterFragment"
|
||||||
|
app:destination="@id/debugMenuFileManagerTesterFragment" />
|
||||||
|
</fragment>
|
||||||
|
<fragment
|
||||||
|
android:id="@+id/debugMenuMetaDataFragment"
|
||||||
|
android:name="one.nem.lacerta.feature.debug.DebugMenuMetaDataFragment"
|
||||||
|
android:label="fragment_debug_menu_meta_data"
|
||||||
|
tools:layout="@layout/fragment_debug_menu_meta_data" />
|
||||||
|
<fragment
|
||||||
|
android:id="@+id/debugMenuDocumentTesterTopFragment"
|
||||||
|
android:name="one.nem.lacerta.feature.debug.DebugMenuDocumentTesterTopFragment"
|
||||||
|
android:label="fragment_debug_menu_document_tester_top"
|
||||||
|
tools:layout="@layout/fragment_debug_menu_document_tester_top" >
|
||||||
|
<action
|
||||||
|
android:id="@+id/action_debugMenuDocumentTesterTopFragment_to_debugMenuDocumentTesterListFragment"
|
||||||
|
app:destination="@id/debugMenuDocumentTesterListFragment" />
|
||||||
|
<action
|
||||||
|
android:id="@+id/action_debugMenuDocumentTesterTopFragment_to_debugMenuDocumentTesterManageFragment"
|
||||||
|
app:destination="@id/debugMenuDocumentTesterManageFragment" />
|
||||||
|
</fragment>
|
||||||
|
<fragment
|
||||||
|
android:id="@+id/debugMenuDocumentTesterListFragment"
|
||||||
|
android:name="one.nem.lacerta.feature.debug.DebugMenuDocumentTesterListFragment"
|
||||||
|
android:label="fragment_debug_menu_document_tester_list"
|
||||||
|
tools:layout="@layout/fragment_debug_menu_document_tester_list" />
|
||||||
|
<fragment
|
||||||
|
android:id="@+id/debugMenuDocumentTesterManageFragment"
|
||||||
|
android:name="one.nem.lacerta.feature.debug.DebugMenuDocumentTesterManageFragment"
|
||||||
|
android:label="fragment_debug_menu_document_tester_manage"
|
||||||
|
tools:layout="@layout/fragment_debug_menu_document_tester_manage" />
|
||||||
|
<fragment
|
||||||
|
android:id="@+id/scannerDataManagerStubFragment"
|
||||||
|
android:name="one.nem.lacerta.component.scanner.ScannerDataManagerStubFragment"
|
||||||
|
android:label="ScannerDataManagerStubFragment" />
|
||||||
|
<fragment
|
||||||
|
android:id="@+id/debugMenuFileManagerTesterFragment"
|
||||||
|
android:name="one.nem.lacerta.feature.debug.DebugMenuFileManagerTesterFragment"
|
||||||
|
android:label="fragment_debug_menu_file_manager_tester"
|
||||||
|
tools:layout="@layout/fragment_debug_menu_file_manager_tester" />
|
||||||
|
</navigation>
|
||||||
@@ -3,28 +3,10 @@
|
|||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/feature_debug_navigation"
|
android:id="@+id/feature_debug_navigation"
|
||||||
app:startDestination="@id/debugMenuFragment">
|
app:startDestination="@id/debugMenuContainerFragment">
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/debugMenuFragment"
|
android:id="@+id/debugMenuContainerFragment"
|
||||||
android:name="one.nem.lacerta.feature.debug.DebugMenuFragment"
|
android:name="one.nem.lacerta.feature.debug.DebugMenuContainerFragment"
|
||||||
android:label="fragment_debug_menu"
|
android:label="fragment_debug_menu_container"
|
||||||
tools:layout="@layout/fragment_debug_menu" >
|
tools:layout="@layout/fragment_debug_menu_container" />
|
||||||
<action
|
|
||||||
android:id="@+id/action_debugMenuFragment_to_debugSharedPrefEditorFragment"
|
|
||||||
app:destination="@id/debugSharedPrefEditorFragment" />
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_debugMenuFragment_to_debugPlayGroundFragment"
|
|
||||||
app:destination="@id/debugPlayGroundFragment" />
|
|
||||||
</fragment>
|
|
||||||
<fragment
|
|
||||||
android:id="@+id/debugSharedPrefEditorFragment"
|
|
||||||
android:name="one.nem.lacerta.feature.debug.DebugSharedPrefEditorFragment"
|
|
||||||
android:label="fragment_debug_shared_pref_editor"
|
|
||||||
tools:layout="@layout/fragment_debug_shared_pref_editor" />
|
|
||||||
|
|
||||||
<fragment
|
|
||||||
android:id="@+id/debugPlayGroundFragment"
|
|
||||||
android:name="one.nem.lacerta.feature.debug.DebugPlayGroundFragment"
|
|
||||||
android:label="fragment_debug_play_ground"
|
|
||||||
tools:layout="@layout/fragment_debug_play_ground" />
|
|
||||||
</navigation>
|
</navigation>
|
||||||
@@ -27,9 +27,17 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
implementation libs.androidx.appcompat
|
||||||
implementation 'com.google.android.material:material:1.10.0'
|
implementation libs.com.google.android.material
|
||||||
testImplementation 'junit:junit:4.13.2'
|
testImplementation libs.junit
|
||||||
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
androidTestImplementation libs.androidx.test.ext.junit
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
androidTestImplementation libs.androidx.test.espresso.core
|
||||||
|
|
||||||
|
// Navigation
|
||||||
|
implementation libs.navigation.fragment
|
||||||
|
implementation libs.navigation.ui
|
||||||
|
implementation libs.navigation.dynamic.features.fragment
|
||||||
|
|
||||||
|
// shared
|
||||||
|
implementation project(':shared:ui')
|
||||||
}
|
}
|
||||||
+8
-8
@@ -1,4 +1,4 @@
|
|||||||
package one.nem.lacerta.component.scanner;
|
package one.nem.lacerta.feature.home;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
@@ -10,10 +10,10 @@ import android.view.ViewGroup;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple {@link Fragment} subclass.
|
* A simple {@link Fragment} subclass.
|
||||||
* Use the {@link ScannerScanResultFragment#newInstance} factory method to
|
* Use the {@link HomeTopFragment#newInstance} factory method to
|
||||||
* create an instance of this fragment.
|
* create an instance of this fragment.
|
||||||
*/
|
*/
|
||||||
public class ScannerScanResultFragment extends Fragment {
|
public class HomeTopFragment extends Fragment {
|
||||||
|
|
||||||
// TODO: Rename parameter arguments, choose names that match
|
// TODO: Rename parameter arguments, choose names that match
|
||||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||||
@@ -24,7 +24,7 @@ public class ScannerScanResultFragment extends Fragment {
|
|||||||
private String mParam1;
|
private String mParam1;
|
||||||
private String mParam2;
|
private String mParam2;
|
||||||
|
|
||||||
public ScannerScanResultFragment() {
|
public HomeTopFragment() {
|
||||||
// Required empty public constructor
|
// Required empty public constructor
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -34,11 +34,11 @@ public class ScannerScanResultFragment extends Fragment {
|
|||||||
*
|
*
|
||||||
* @param param1 Parameter 1.
|
* @param param1 Parameter 1.
|
||||||
* @param param2 Parameter 2.
|
* @param param2 Parameter 2.
|
||||||
* @return A new instance of fragment ScannerScanResultFragment.
|
* @return A new instance of fragment HomeTopFragment.
|
||||||
*/
|
*/
|
||||||
// TODO: Rename and change types and number of parameters
|
// TODO: Rename and change types and number of parameters
|
||||||
public static ScannerScanResultFragment newInstance(String param1, String param2) {
|
public static HomeTopFragment newInstance(String param1, String param2) {
|
||||||
ScannerScanResultFragment fragment = new ScannerScanResultFragment();
|
HomeTopFragment fragment = new HomeTopFragment();
|
||||||
Bundle args = new Bundle();
|
Bundle args = new Bundle();
|
||||||
args.putString(ARG_PARAM1, param1);
|
args.putString(ARG_PARAM1, param1);
|
||||||
args.putString(ARG_PARAM2, param2);
|
args.putString(ARG_PARAM2, param2);
|
||||||
@@ -59,6 +59,6 @@ public class ScannerScanResultFragment extends Fragment {
|
|||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
// Inflate the layout for this fragment
|
// Inflate the layout for this fragment
|
||||||
return inflater.inflate(R.layout.fragment_scanner_scan_result, container, false);
|
return inflater.inflate(R.layout.fragment_home_top, container, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".ScannerScanFragment">
|
tools:context=".HomeTopFragment">
|
||||||
|
|
||||||
<!-- TODO: Update blank fragment layout -->
|
<!-- TODO: Update blank fragment layout -->
|
||||||
<TextView
|
<TextView
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/feature_home_navigation"
|
||||||
|
app:startDestination="@id/homeTopFragment">
|
||||||
|
|
||||||
|
<fragment
|
||||||
|
android:id="@+id/homeTopFragment"
|
||||||
|
android:name="one.nem.lacerta.feature.home.HomeTopFragment"
|
||||||
|
android:label="fragment_home_top"
|
||||||
|
tools:layout="@layout/fragment_home_top" />
|
||||||
|
</navigation>
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<resources>
|
||||||
|
<!-- TODO: Remove or change this placeholder text -->
|
||||||
|
<string name="hello_blank_fragment">Hello blank fragment</string>
|
||||||
|
</resources>
|
||||||
@@ -27,9 +27,24 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
implementation libs.androidx.appcompat
|
||||||
implementation 'com.google.android.material:material:1.10.0'
|
implementation libs.com.google.android.material
|
||||||
testImplementation 'junit:junit:4.13.2'
|
implementation 'androidx.navigation:navigation-fragment:2.7.5'
|
||||||
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
implementation 'androidx.navigation:navigation-ui:2.7.5'
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
testImplementation libs.junit
|
||||||
|
androidTestImplementation libs.androidx.test.ext.junit
|
||||||
|
androidTestImplementation libs.androidx.test.espresso.core
|
||||||
|
|
||||||
|
// Navigation
|
||||||
|
implementation libs.navigation.fragment
|
||||||
|
implementation libs.navigation.ui
|
||||||
|
implementation libs.navigation.dynamic.features.fragment
|
||||||
|
|
||||||
|
// Hilt (DI)
|
||||||
|
implementation libs.com.google.dagger.hilt.android
|
||||||
|
annotationProcessor libs.com.google.dagger.hilt.compiler
|
||||||
|
|
||||||
|
implementation project(':shared:ui')
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
package one.nem.lacerta.feature.library;
|
||||||
|
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class DocumentAdapter extends RecyclerView.Adapter<DocumentAdapter.DocumentViewHolder> {
|
||||||
|
|
||||||
|
private List<String> documentList;
|
||||||
|
|
||||||
|
public DocumentAdapter(List<String> documentList) {
|
||||||
|
this.documentList = documentList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public DocumentViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_item_library_menu, parent, false);
|
||||||
|
return new DocumentViewHolder(view);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull DocumentViewHolder holder, int position) {
|
||||||
|
holder.title.setText(documentList.get(position));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return documentList.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
class DocumentViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
TextView title;
|
||||||
|
|
||||||
|
DocumentViewHolder(View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
title = itemView.findViewById(R.id.debug_menu_item_title);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+35
@@ -0,0 +1,35 @@
|
|||||||
|
package one.nem.lacerta.feature.library;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
// LibraryArchiveFragment.java
|
||||||
|
public class LibraryArchiveFragment extends AppCompatActivity {
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.fragment_library_top);
|
||||||
|
|
||||||
|
// ここに入力された内容を表示する機能
|
||||||
|
TextView textView = findViewById(R.id.document_list);
|
||||||
|
|
||||||
|
textView.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
// 文字をタップしたときの処理
|
||||||
|
|
||||||
|
// 移動先のアクティビティを指定
|
||||||
|
Intent intent = new Intent(LibraryArchiveFragment.this, LibraryDocFragment.class);
|
||||||
|
|
||||||
|
// データを付加する
|
||||||
|
intent.putExtra("key_name", "value_data");
|
||||||
|
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
package one.nem.lacerta.feature.library;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
|
||||||
|
public class LibraryDocFragment extends Fragment {
|
||||||
|
|
||||||
|
private TextView textView; // フィールドとして TextView を定義
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
|
View view = inflater.inflate(R.layout.fragment_library_file, container, false);
|
||||||
|
|
||||||
|
textView = view.findViewById(R.id.textView);
|
||||||
|
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
// フラグメントに渡されたデータを取得
|
||||||
|
if (getArguments() != null) {
|
||||||
|
String receivedData = getArguments().getString("key_name");
|
||||||
|
|
||||||
|
// onCreateView メソッドで取得した TextView にデータをセットする
|
||||||
|
if (textView != null) {
|
||||||
|
textView.setText(receivedData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Factory method for creating a new instance of the fragment
|
||||||
|
public static LibraryDocFragment newInstance(String data) {
|
||||||
|
LibraryDocFragment fragment = new LibraryDocFragment();
|
||||||
|
|
||||||
|
// フラグメントにデータを渡す
|
||||||
|
Bundle args = new Bundle();
|
||||||
|
args.putString("key_name", data);
|
||||||
|
fragment.setArguments(args);
|
||||||
|
|
||||||
|
return fragment;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
package one.nem.lacerta.feature.library;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ArrayAdapter;
|
||||||
|
import android.widget.ListView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A simple {@link Fragment} subclass.
|
||||||
|
* Use the {@link LibraryTopFragment#newInstance} factory method to
|
||||||
|
* create an instance of this fragment.
|
||||||
|
*/
|
||||||
|
public class LibraryTopFragment extends Fragment {
|
||||||
|
|
||||||
|
// TODO: Rename parameter arguments, choose names that match
|
||||||
|
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||||
|
private static final String ARG_PARAM1 = "param1";
|
||||||
|
private static final String ARG_PARAM2 = "param2";
|
||||||
|
|
||||||
|
// TODO: Rename and change types of parameters
|
||||||
|
private String mParam1;
|
||||||
|
private String mParam2;
|
||||||
|
|
||||||
|
public LibraryTopFragment() {
|
||||||
|
// Required empty public constructor
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use this factory method to create a new instance of
|
||||||
|
* this fragment using the provided parameters.
|
||||||
|
*
|
||||||
|
* @param param1 Parameter 1.
|
||||||
|
* @param param2 Parameter 2.
|
||||||
|
* @return A new instance of fragment LibraryTopFragment.
|
||||||
|
*/
|
||||||
|
// TODO: Rename and change types and number of parameters
|
||||||
|
public static LibraryTopFragment newInstance(String param1, String param2) {
|
||||||
|
LibraryTopFragment fragment = new LibraryTopFragment();
|
||||||
|
Bundle args = new Bundle();
|
||||||
|
args.putString(ARG_PARAM1, param1);
|
||||||
|
args.putString(ARG_PARAM2, param2);
|
||||||
|
fragment.setArguments(args);
|
||||||
|
return fragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
if (getArguments() != null) {
|
||||||
|
mParam1 = getArguments().getString(ARG_PARAM1);
|
||||||
|
mParam2 = getArguments().getString(ARG_PARAM2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
View view = inflater.inflate(R.layout.fragment_library_top, container, false);
|
||||||
|
|
||||||
|
// Use view.findViewById instead of findViewById
|
||||||
|
RecyclerView documentRecyclerView = view.findViewById(R.id.document_list);
|
||||||
|
|
||||||
|
LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
|
||||||
|
documentRecyclerView.setLayoutManager(layoutManager);
|
||||||
|
|
||||||
|
List<String> documentList = new ArrayList<>();
|
||||||
|
documentList.add("Document A");
|
||||||
|
documentList.add("Document B");
|
||||||
|
documentList.add("Document C");
|
||||||
|
|
||||||
|
// Create and set the adapter
|
||||||
|
DocumentAdapter adapter = new DocumentAdapter(documentList);
|
||||||
|
documentRecyclerView.setAdapter(adapter);
|
||||||
|
|
||||||
|
// Use a LinearLayoutManager to specify the layout
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:theme="@style/Theme.Lacerta"
|
||||||
|
tools:context=".LibraryTopFragment">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
|
android:id="@+id/tool_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/colorPrimaryContainer"
|
||||||
|
android:minHeight="?attr/actionBarSize"
|
||||||
|
android:theme="?attr/actionBarTheme"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:title="Library"
|
||||||
|
app:titleTextColor="@color/colorOnPrimaryContainer" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/document_list"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tool_bar" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/debug_menu_item_title"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/debug_menu_item_description"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="14sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/debug_menu_item_title" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/feature_library_navigation"
|
||||||
|
app:startDestination="@id/feature_library_top_fragment">
|
||||||
|
<fragment
|
||||||
|
android:id="@+id/feature_library_top_fragment"
|
||||||
|
android:name="one.nem.lacerta.feature.library.LibraryTopFragment"
|
||||||
|
android:label="fragment_library_top"
|
||||||
|
tools:layout="@layout/fragment_library_top" />
|
||||||
|
</navigation>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<resources>
|
||||||
|
<string name="app_name">Library</string>
|
||||||
|
</resources>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/build
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
plugins {
|
||||||
|
alias(libs.plugins.com.android.library)
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace 'one.nem.lacerta.model'
|
||||||
|
compileSdk 34
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
minSdk 26
|
||||||
|
|
||||||
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
consumerProguardFiles "consumer-rules.pro"
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
minifyEnabled false
|
||||||
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
|
||||||
|
implementation libs.androidx.appcompat
|
||||||
|
implementation libs.com.google.android.material
|
||||||
|
testImplementation libs.junit
|
||||||
|
androidTestImplementation libs.androidx.test.ext.junit
|
||||||
|
androidTestImplementation libs.androidx.test.espresso.core
|
||||||
|
|
||||||
|
// JGit
|
||||||
|
implementation 'org.eclipse.jgit:org.eclipse.jgit:6.8.0.202311291450-r'
|
||||||
|
|
||||||
|
}
|
||||||
File renamed without changes.
Loaded 100 of 223 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user