Compare commits
315 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
84e7fc60c2 | ||
|
|
6821887263 | ||
|
|
8f8ceb0597 | ||
|
|
deb2403c23 | ||
|
|
d65c722ef0 | ||
|
|
1bdc1409e4 | ||
|
|
467eca6c14 | ||
|
|
da3abb7fb7 | ||
|
|
a8a818225e | ||
|
|
5e650869f2 | ||
|
|
6e06d82b1a | ||
|
|
79370f6a02 | ||
|
|
d0dee1002d | ||
|
|
7517fd976a | ||
|
|
ac9e3e9ff3 | ||
|
|
a8dce30022 | ||
|
|
dac2e6e52e | ||
|
|
b7c3534751 | ||
|
|
2c04b7ca7c | ||
|
|
4a43f1607c | ||
|
|
fef0857050 | ||
|
|
9078634fb7 | ||
|
|
e71c56a146 | ||
|
|
8f85116353 | ||
|
|
1d6b9dd5d8 | ||
|
|
2bd534fde9 | ||
|
|
c05b358b49 | ||
|
|
91255182d2 | ||
|
|
5052f57ee6 | ||
|
|
d651f6acf0 | ||
|
|
ea2b91ca15 | ||
|
|
e280227ee1 | ||
|
|
bc4e4e9b5a | ||
|
|
e732b36cb8 | ||
|
|
894f370dad | ||
|
|
ec04a0ff81 | ||
|
|
b4be0f66dc | ||
|
|
8bfbaee1f5 | ||
|
|
458cfdd8a7 | ||
|
|
2406e9a45d | ||
|
|
d952b23b85 | ||
|
|
0245ddb99e | ||
|
|
40dd967903 | ||
|
|
d524d452bd | ||
|
|
0ac0586fba | ||
|
|
3e470981a8 | ||
|
|
09e416ab74 | ||
|
|
1314b2f068 | ||
|
|
4b70b6e035 | ||
|
|
856b48675b | ||
|
|
534a223cbf | ||
|
|
625c43d786 | ||
|
|
d1f79a63a1 | ||
|
|
f4bf509fa7 | ||
|
|
8ff4f0b88f | ||
|
|
ee2a42bbe2 | ||
|
|
bc1ec45855 | ||
|
|
6d4939d88a | ||
|
|
f7d263570d | ||
|
|
1ea0f95863 | ||
|
|
6003f6fd2a | ||
|
|
ded029e4cb | ||
|
|
e64ab75753 | ||
|
|
2d11c45972 | ||
|
|
63e5ccb7c3 | ||
|
|
568d4cb769 | ||
|
|
88297cc181 | ||
|
|
e5ed6c33ed | ||
|
|
1e7fbfd0a4 | ||
|
|
87cd1a40f4 | ||
|
|
0d7d6738df | ||
|
|
c3dd4a3b7e | ||
|
|
76b2492ba8 | ||
|
|
758bcda581 | ||
|
|
520d2f2ce0 | ||
|
|
8855dc4820 | ||
|
|
6fda457bbb | ||
|
|
360426d851 | ||
|
|
bad9ed000b | ||
|
|
18b1b00f45 | ||
|
|
7bd5653a5f | ||
|
|
fb4e0f644a | ||
|
|
7766832d5f | ||
|
|
11ae42cb03 | ||
|
|
de6ddb42ae | ||
|
|
c100a032d6 | ||
|
|
6b8eb120f0 | ||
|
|
b9b79fdde2 | ||
|
|
40ca5fe0a1 | ||
|
|
e183c17c9f | ||
|
|
d2003893e8 | ||
|
|
22cd08165b | ||
|
|
1f62a71cd5 | ||
|
|
93fab8196d | ||
|
|
5523a2a919 | ||
|
|
d79045e47f | ||
|
|
cffd93bfe6 | ||
|
|
d2c762d29a | ||
|
|
9d9f99a955 | ||
|
|
2c5939fab4 | ||
|
|
95ed503e53 | ||
|
|
51e2c63134 | ||
|
|
50bc03f403 | ||
|
|
f5bc16ba42 | ||
|
|
f4501ce251 | ||
|
|
3317472773 | ||
|
|
acdd47a49a | ||
|
|
fa8be89aaf | ||
|
|
5034af2fb4 | ||
|
|
87842de421 | ||
|
|
1f46a0509f | ||
|
|
8e9713e436 | ||
|
|
fe0a7d81ae | ||
|
|
f9e14349b7 | ||
|
|
a1f087758f | ||
|
|
4068abdb95 | ||
|
|
9314c613bc | ||
|
|
458e93e19f | ||
|
|
ba8d26d250 | ||
|
|
33e3495d9f | ||
|
|
f71e72e443 | ||
|
|
c615a33bd2 | ||
|
|
7ad0ea26e2 | ||
|
|
0ad663beb3 | ||
|
|
1366984c15 | ||
|
|
62d3895373 | ||
|
|
3579c4e821 | ||
|
|
5c39865d40 | ||
|
|
551b2849fe | ||
|
|
633601a0f3 | ||
|
|
ce1c5eb0d8 | ||
|
|
d929c804df | ||
|
|
19c128eecd | ||
|
|
57cf764804 | ||
|
|
ea812e0b67 | ||
|
|
1c517a99f2 | ||
|
|
2687cb146b | ||
|
|
1a9080dcc2 | ||
|
|
580c92b13d | ||
|
|
ae4c4aa89c | ||
|
|
ded7c51f44 | ||
|
|
485e85ddaa | ||
|
|
3c0082a786 | ||
|
|
c474512088 | ||
|
|
f78a542be2 | ||
|
|
131454b99d | ||
|
|
e255182b93 | ||
|
|
3857896d6c | ||
|
|
301e8cb638 | ||
|
|
ae7c724f65 | ||
|
|
751cd04ce2 | ||
|
|
a88ccfa3fc | ||
|
|
9e914974b7 | ||
|
|
9cfa8296b8 | ||
|
|
27ef942723 | ||
|
|
fe03554fbf | ||
|
|
8c2227df73 | ||
|
|
0274c2f070 | ||
|
|
8f85c6a33b | ||
|
|
cf81ca8207 | ||
|
|
07bbafe7dd | ||
|
|
3eee2c7a55 | ||
|
|
1cdde3b6ce | ||
|
|
67aea46c06 | ||
|
|
7adec7dfa5 | ||
|
|
95fa819ed2 | ||
|
|
1e87d344e2 | ||
|
|
9223375304 | ||
|
|
bb862f15bd | ||
|
|
261c94e9bb | ||
|
|
06016514e5 | ||
|
|
cead24b65a | ||
|
|
6eaab57468 | ||
|
|
5852fc233d | ||
|
|
d7e21f6332 | ||
|
|
c78b8d3b97 | ||
|
|
940e3d8ca1 | ||
|
|
e31d0753d1 | ||
|
|
526c66f358 | ||
|
|
d6833a952d | ||
|
|
4760761bb7 | ||
|
|
a33e6dae3b | ||
|
|
d393181f10 | ||
|
|
12df8b82c7 | ||
|
|
1c7eba7af3 | ||
|
|
d39cdaef10 | ||
|
|
cc40fb9c0f | ||
|
|
85c6d548ad | ||
|
|
8dbf605450 | ||
|
|
2f418a7c1a | ||
|
|
5f0c82f54c | ||
|
|
4e659308e5 | ||
|
|
50e24bde17 | ||
|
|
31f7c6a465 | ||
|
|
e734579249 | ||
|
|
2cff46d628 | ||
|
|
87f3f93177 | ||
|
|
30733caa4a | ||
|
|
4e30a550e1 | ||
|
|
cb687d6b10 | ||
|
|
6c6d3a7cd8 | ||
|
|
da06e400e1 | ||
|
|
87b8cbb60f | ||
|
|
8bac300585 | ||
|
|
da7d2b9333 | ||
|
|
e1f84caf19 | ||
|
|
274da2b766 | ||
|
|
35aba35801 | ||
|
|
964e002c46 | ||
|
|
d3318e10ab | ||
|
|
4c43369d59 | ||
|
|
176243b881 | ||
|
|
ed02a340d0 | ||
|
|
2877f4fc5c | ||
|
|
fceb3bf31a | ||
|
|
9883d081ff | ||
|
|
db5a9fb197 | ||
|
|
93438ce3df | ||
|
|
95bca64fb8 | ||
|
|
7821e10869 | ||
|
|
cede3c3129 | ||
|
|
528ee862b9 | ||
|
|
d1507f5eae | ||
|
|
f5682e9137 | ||
|
|
518932c260 | ||
|
|
139d8869c2 | ||
|
|
29bf0c81dd | ||
|
|
9e510bed2d | ||
|
|
ef7437979c | ||
|
|
b1e68f18b0 | ||
|
|
5e02e697d2 | ||
|
|
bfa77fcfb6 | ||
|
|
bcf9d9688f | ||
|
|
281b9cf6c4 | ||
|
|
fb0de5a991 | ||
|
|
e6fb8a8a50 | ||
|
|
e93a05f795 | ||
|
|
8c7601c1bc | ||
|
|
5d18354cbb | ||
|
|
7543f946f2 | ||
|
|
e75112b043 | ||
|
|
7b28688925 | ||
|
|
348d575c62 | ||
|
|
e81490ec34 | ||
|
|
ebdac408b0 | ||
|
|
9411208f81 | ||
|
|
9a7f8c06f6 | ||
|
|
0f6e6bfb65 | ||
|
|
8f499bd050 | ||
|
|
80069719f2 | ||
|
|
48c904258a | ||
|
|
1606d9da99 | ||
|
|
87e185f6f1 | ||
|
|
80f1896752 | ||
|
|
1e5e984fe6 | ||
|
|
4f5c36db18 | ||
|
|
8090ff35ec | ||
|
|
3b6af5fe9f | ||
|
|
d10eab19fc | ||
|
|
03a779ea9c | ||
|
|
be269a4a34 | ||
|
|
0e25c68e5a | ||
|
|
364f41e3c4 | ||
|
|
de079bd6ee | ||
|
|
35524589e4 | ||
|
|
cdd8886692 | ||
|
|
4ddf99feb4 | ||
|
|
4ff065d1b4 | ||
|
|
9d355dbc00 | ||
|
|
eb9e433070 | ||
|
|
62694c4bb8 | ||
|
|
5cb4e5c82e | ||
|
|
74caba75d6 | ||
|
|
0abd92c02a | ||
|
|
8ec2ff8b1a | ||
|
|
8729f9887f | ||
|
|
7937ad0a6a | ||
|
|
eb529f9050 | ||
|
|
08faa694f2 | ||
|
|
be1265fc87 | ||
|
|
1393fc1f66 | ||
|
|
51dab4a167 | ||
|
|
85f7fb71cb | ||
|
|
281de96e52 | ||
|
|
5c7b33e6f2 | ||
|
|
9cad11841d | ||
|
|
d04c2951b5 | ||
|
|
c7dfa7e085 | ||
|
|
831e217be6 | ||
|
|
d00a7b8787 | ||
|
|
30218b9ad8 | ||
|
|
92894b236e | ||
|
|
ba52926d1f | ||
|
|
4d6a1e2c22 | ||
|
|
a308d48e70 | ||
|
|
e84f418731 | ||
|
|
2ee29fb31b | ||
|
|
14a2498d82 | ||
|
|
c90039e437 | ||
|
|
6a1a471d92 | ||
|
|
b6bbec5317 | ||
|
|
14864e924c | ||
|
|
6e7d584d13 | ||
|
|
3bca14f038 | ||
|
|
4fa0a56b5b | ||
|
|
1558794e93 | ||
|
|
9e3b805fdd | ||
|
|
0ece9382af | ||
|
|
baec76c29f | ||
|
|
258a6ab8d3 | ||
|
|
59b5acc79b | ||
|
|
cc7a375c84 | ||
|
|
e4f5dc88a2 | ||
|
|
81a676c3e4 | ||
|
|
b8abba6e94 |
40
.github/workflows/android.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
name: Build for Android
|
||||||
|
|
||||||
|
on: workflow_dispatch
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Download Android keystore
|
||||||
|
id: android_keystore
|
||||||
|
uses: timheuer/base64-to-file@v1.0.3
|
||||||
|
with:
|
||||||
|
fileName: upload-keystore.jks
|
||||||
|
encodedString: ${{ secrets.KEYSTORE_BASE64 }}
|
||||||
|
- name: Create key.properties
|
||||||
|
run: |
|
||||||
|
echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > filcnaplo/android/key.properties
|
||||||
|
echo "storePassword=${{ secrets.STORE_PASSWORD }}" >> filcnaplo/android/key.properties
|
||||||
|
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> filcnaplo/android/key.properties
|
||||||
|
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> filcnaplo/android/key.properties
|
||||||
|
- uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
distribution: "zulu"
|
||||||
|
java-version: "17.x"
|
||||||
|
cache: "gradle"
|
||||||
|
- uses: subosito/flutter-action@v2
|
||||||
|
with:
|
||||||
|
flutter-version: "3.10.2"
|
||||||
|
channel: "stable"
|
||||||
|
cache: "true"
|
||||||
|
- name: Install dependencies
|
||||||
|
run: ./fix-pub.sh
|
||||||
|
- name: Build
|
||||||
|
run: cd filcnaplo && ./build.sh
|
||||||
|
- name: Upload Android Release
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: android-release
|
||||||
|
path: build/outputs/flutter-apk/app-release.apk
|
||||||
65
.github/workflows/ios.yml
vendored
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
name: "Build and Publish iOS"
|
||||||
|
on: workflow_dispatch
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
# Checks-out our repository under $GITHUB_WORKSPACE, so our job can access it
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
# Install the Apple certificate and provisioning profile
|
||||||
|
- name: Install the Apple certificate and provisioning profile
|
||||||
|
env:
|
||||||
|
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
|
||||||
|
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
|
||||||
|
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }}
|
||||||
|
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
||||||
|
run: |
|
||||||
|
# create variables
|
||||||
|
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
|
||||||
|
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
|
||||||
|
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
|
||||||
|
# import certificate and provisioning profile from secrets
|
||||||
|
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH
|
||||||
|
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode --output $PP_PATH
|
||||||
|
# create temporary keychain
|
||||||
|
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
||||||
|
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
|
||||||
|
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
||||||
|
# import certificate to keychain
|
||||||
|
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
|
||||||
|
security list-keychain -d user -s $KEYCHAIN_PATH
|
||||||
|
# apply provisioning profile
|
||||||
|
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
|
||||||
|
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
|
||||||
|
# Install flutter
|
||||||
|
- name: Flutter get
|
||||||
|
uses: subosito/flutter-action@v1
|
||||||
|
with:
|
||||||
|
flutter-version: '3.10.2'
|
||||||
|
|
||||||
|
# Install your project's dependencies
|
||||||
|
- name: Install dependencies
|
||||||
|
run: bash fix-pub.sh
|
||||||
|
|
||||||
|
# Build and sign the ipa using a single flutter command
|
||||||
|
- name: Building IPA
|
||||||
|
working-directory: filcnaplo
|
||||||
|
run: bash build-ipa.sh
|
||||||
|
|
||||||
|
# Collect the file and upload as artifact
|
||||||
|
- name: collect ipa artifacts
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: release-ipa
|
||||||
|
# Path to the release files
|
||||||
|
path: filcnaplo/build/ios/ipa/*.ipa
|
||||||
|
|
||||||
|
# Important! Cleanup: remove the certificate and provisioning profile from the runner!
|
||||||
|
- name: Clean up keychain and provisioning profile
|
||||||
|
if: ${{ always() }}
|
||||||
|
run: |
|
||||||
|
security delete-keychain $RUNNER_TEMP/app-signing.keychain-db
|
||||||
|
rm ~/Library/MobileDevice/Provisioning\ Profiles/build_pp.mobileprovision
|
||||||
27
.gitignore
vendored
@@ -1,8 +1,11 @@
|
|||||||
# See https://www.dartlang.org/guides/libraries/private-files
|
# See https://www.dartlang.org/guides/libraries/private-files
|
||||||
|
|
||||||
|
.gitignore
|
||||||
|
|
||||||
termek.txt
|
termek.txt
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
filc3.properties
|
||||||
|
local.properties
|
||||||
# Files and directories created by pub
|
# Files and directories created by pub
|
||||||
.dart_tool/
|
.dart_tool/
|
||||||
.packages
|
.packages
|
||||||
@@ -24,3 +27,25 @@ doc/api/
|
|||||||
*.js.map
|
*.js.map
|
||||||
|
|
||||||
*.txt
|
*.txt
|
||||||
|
filcnaplo/macos/Flutter/GeneratedPluginRegistrant.swift
|
||||||
|
filcnaplo/windows/flutter/ephemeral/.plugin_symlinks/connectivity_plus
|
||||||
|
filcnaplo/windows/flutter/ephemeral/.plugin_symlinks/dynamic_color
|
||||||
|
filcnaplo/windows/flutter/ephemeral/.plugin_symlinks/flutter_acrylic
|
||||||
|
filcnaplo/windows/flutter/ephemeral/.plugin_symlinks/path_provider_windows
|
||||||
|
filcnaplo/windows/flutter/ephemeral/.plugin_symlinks/permission_handler_windows
|
||||||
|
filcnaplo/windows/flutter/ephemeral/.plugin_symlinks/share_plus_windows
|
||||||
|
filcnaplo/windows/flutter/ephemeral/.plugin_symlinks/url_launcher_windows
|
||||||
|
filcnaplo/windows/flutter/ephemeral/generated_config.cmake
|
||||||
|
filcnaplo/windows/flutter/generated_plugin_registrant.cc
|
||||||
|
filcnaplo/windows/flutter/generated_plugin_registrant.h
|
||||||
|
filcnaplo/windows/flutter/generated_plugins.cmake
|
||||||
|
filcnaplo/linux/flutter/generated_plugin_registrant.cc
|
||||||
|
filcnaplo/linux/flutter/generated_plugin_registrant.h
|
||||||
|
filcnaplo/linux/flutter/generated_plugins.cmake
|
||||||
|
filcnaplo/macos/Flutter/*
|
||||||
|
filcnaplo/ios/Podfile.lock
|
||||||
|
.vscode/
|
||||||
|
key.properties
|
||||||
|
|
||||||
|
.flutter-plugins*
|
||||||
|
filcnaplo/ios/Flutter/flutter_export_environment 4.sh
|
||||||
|
|||||||
15
.gitmodules
vendored
@@ -1,15 +0,0 @@
|
|||||||
[submodule "Mobile UI"]
|
|
||||||
path = filcnaplo_mobile_ui
|
|
||||||
url = https://github.com/filc/mobile
|
|
||||||
|
|
||||||
[submodule "Desktop UI"]
|
|
||||||
path = filcnaplo_desktop_ui
|
|
||||||
url = https://github.com/filc/desktop
|
|
||||||
|
|
||||||
[submodule "Kreta API"]
|
|
||||||
path = filcnaplo_kreta_api
|
|
||||||
url = https://github.com/filc/kreten
|
|
||||||
|
|
||||||
[submodule "Premium"]
|
|
||||||
path = filcnaplo_premium
|
|
||||||
url = git@github.com:filc/premium
|
|
||||||
|
|||||||
3
.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
1286
.idea/libraries/Dart_Packages.xml
generated
Normal file
27
.idea/libraries/Dart_SDK.xml
generated
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<component name="libraryTable">
|
||||||
|
<library name="Dart SDK">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/async" />
|
||||||
|
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/cli" />
|
||||||
|
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/collection" />
|
||||||
|
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/convert" />
|
||||||
|
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/core" />
|
||||||
|
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/developer" />
|
||||||
|
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/ffi" />
|
||||||
|
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/html" />
|
||||||
|
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/indexed_db" />
|
||||||
|
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/io" />
|
||||||
|
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/isolate" />
|
||||||
|
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/js" />
|
||||||
|
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/js_util" />
|
||||||
|
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/math" />
|
||||||
|
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/mirrors" />
|
||||||
|
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/svg" />
|
||||||
|
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/typed_data" />
|
||||||
|
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/web_audio" />
|
||||||
|
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/web_gl" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES />
|
||||||
|
</library>
|
||||||
|
</component>
|
||||||
4
.idea/misc.xml
generated
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectRootManager" version="2" project-jdk-name="Android API 33, extension level 3 Platform" project-jdk-type="Android SDK" />
|
||||||
|
</project>
|
||||||
8
.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/naplo.iml" filepath="$PROJECT_DIR$/.idea/naplo.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
67
.idea/naplo.iml
generated
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/.dart_tool" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/.pub" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/build" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/flutter_acrylic/example/.pub" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/flutter_acrylic/example/build" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/flutter_acrylic/example/.dart_tool" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo_desktop_ui/.dart_tool" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo_desktop_ui/.pub" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo_desktop_ui/build" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/share_plus/example/.pub" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/share_plus/example/.dart_tool" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/share_plus/example/build" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/dynamic_color/.pub" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/dynamic_color/.dart_tool" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/dynamic_color/build" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/url_launcher_linux/.pub" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/url_launcher_linux/build" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/url_launcher_linux/.dart_tool" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/dynamic_color/example/.pub" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/dynamic_color/example/.dart_tool" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/dynamic_color/example/build" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo_premium/build" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo_premium/.dart_tool" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo_premium/.pub" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux/example/.pub" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux/example/.dart_tool" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux/example/build" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/share_plus/.dart_tool" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/share_plus/.pub" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/share_plus/build" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/url_launcher_linux/example/.pub" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/url_launcher_linux/example/.dart_tool" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/url_launcher_linux/example/build" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/connectivity_plus/.pub" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/connectivity_plus/build" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/connectivity_plus/.dart_tool" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/connectivity_plus/example/.dart_tool" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/connectivity_plus/example/build" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/connectivity_plus/example/.pub" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/package_info_plus/.pub" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/package_info_plus/build" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/package_info_plus/.dart_tool" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux/build" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux/.dart_tool" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux/.pub" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo_kreta_api/.dart_tool" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo_kreta_api/build" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo_kreta_api/.pub" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo_mobile_ui/.dart_tool" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo_mobile_ui/.pub" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo_mobile_ui/build" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/package_info_plus/example/.pub" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/package_info_plus/example/.dart_tool" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/package_info_plus/example/build" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/flutter_acrylic/build" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/flutter_acrylic/.pub" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/flutter_acrylic/.dart_tool" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
10
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
<mapping directory="$PROJECT_DIR$/filcnaplo_desktop_ui" vcs="Git" />
|
||||||
|
<mapping directory="$PROJECT_DIR$/filcnaplo_kreta_api" vcs="Git" />
|
||||||
|
<mapping directory="$PROJECT_DIR$/filcnaplo_mobile_ui" vcs="Git" />
|
||||||
|
<mapping directory="$PROJECT_DIR$/filcnaplo_premium" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
22
.vscode/launch.json
vendored
@@ -1,7 +1,4 @@
|
|||||||
{
|
{
|
||||||
// Use IntelliSense to learn about possible attributes.
|
|
||||||
// Hover to view descriptions of existing attributes.
|
|
||||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
@@ -12,6 +9,25 @@
|
|||||||
"toolArgs": [
|
"toolArgs": [
|
||||||
"--dart-define=APPVER=$(cat pubspec.yaml | grep version: | cut -d' ' -f2 | cut -d+ -f1)"
|
"--dart-define=APPVER=$(cat pubspec.yaml | grep version: | cut -d' ' -f2 | cut -d+ -f1)"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "filcnaplo release",
|
||||||
|
"cwd": "filcnaplo release",
|
||||||
|
"request": "launch",
|
||||||
|
"type": "dart",
|
||||||
|
"flutterMode": "release",
|
||||||
|
"program": "lib/main.dart",
|
||||||
|
"toolArgs": [
|
||||||
|
"--dart-define=APPVER=$(cat pubspec.yaml | grep version: | cut -d' ' -f2 | cut -d+ -f1)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Flutter",
|
||||||
|
"program": "lib/main.dart",
|
||||||
|
"cwd": "filcnaplo",
|
||||||
|
"request": "launch",
|
||||||
|
"type": "dart",
|
||||||
|
"flutterMode": "debug"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,39 +1,36 @@
|
|||||||
|
|
||||||
# Contributing Guide
|
# Contribution guide
|
||||||
Köszönjük, ha programozással segíted a munkánkat!
|
Köszönjük, ha programozással segíted a munkánkat!
|
||||||
A folytatáshoz szükséged lesz egy Linuxot vagy Windowst futtató számítógépre, minimális programozási tapasztalatra és egy kis angoltudásra.
|
A folytatáshoz szükséged lesz egy Linux-ot vagy Windows-t futtató számítógépre, minimális programozási tapasztalatra és egy kis angoltudásra.
|
||||||
Segít, ha nem csak kicsit tudsz programozni, és ha ismered a Gitet és a GitHubot ;)
|
Segít, ha már gyakorlottabb vagy a programozásban, és ha ismered a [Git](https://git-scm.com/) és a [GitHub](https://github.com/) működését. ;)
|
||||||
|
|
||||||
## Miben segítsek?
|
## Miben segítsek?
|
||||||
Kérünk, **olyan dologgal járulj hozzá** a Filchez, ami valószínűleg **sok embernek hasznos lesz** majd. Szeretnénk egy minél teljeskörűbb iskolai asszisztenst létrehozni, de az iskolaspecifikus, vagy külön neked hasznos funkciók helye inkább legyen a saját forkod.
|
Kérünk, **olyan dologgal járulj hozzá** a **reFilc**hez, ami valószínűleg **sok embernek hasznos lehet**. Szeretnénk egy minél teljeskörűbb iskolai asszisztenst létrehozni, de az iskolaspecifikus, vagy külön neked hasznos funkciók helye inkább legyen a saját Fork-od.
|
||||||
|
|
||||||
Fontos, hogy **mielőtt egy nagy volumenű projektbe belekezdesz, futtasd meg ötletedet a [Discord szerverünkön](https://filcnaplo.hu/discord),** ahol még azelőtt tudunk tanácsot adni, mielőtt sok-sok órát beleöltél volna egy esetleg felesleges dologba.
|
Fontos, hogy **mielőtt egy nagyobb méretű projektbe belekezdenél, futtasd meg ötletedet a [Discord szerverünkön](https://dc.refilc.hu/)**, ahol még azelőtt tudunk tanácsot adni, hogy sok-sok órát beleöltél volna egy esetleg felesleges dologba.
|
||||||
|
|
||||||
A legjobban annak örülünk, ha az [Issues](https://github.com/filcnaplo/filcnaplo/issues) oldalról szemezgetsz, **ha lehet, a [priority taggel megjelöltekkel kezdd](https://github.com/filcnaplo/filcnaplo/issues?q=is%3Aissue+is%3Aopen+label%3Apriority),** vagy ha új vagy a Flutterhez, ajánljuk figyelmedbe [ezeket a viszonylag könnyen javítható hibákat](https://github.com/filcnaplo/filcnaplo/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) (ha épp van ilyen).
|
A legjobban annak örülünk, ha az [Issues](https://github.com/refilc/naplo/issues) oldalról szemezgetsz. Ha még új vagy a Flutterben, ajánljuk figyelmedbe ezeket a [viszonylag könnyen javítható hibákat](https://github.com/refilc/naplo/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22), ha éppen van ilyen.
|
||||||
|
|
||||||
## Hogyan segítsek?
|
## Hogyan segítsek?
|
||||||
|
Nem ígérhetünk itt sem programozás-, sem Git-kurzust, de a projektspecifikus dolgokat leírjuk, és segítünk a Flutter telepítésében.
|
||||||
|
|
||||||
Nem ígérhetünk itt sem programozás-, sem git-kurzust, de a projektspecifikus dolgokat leírjuk, és segítünk a Flutter feltelepítésében.
|
A **reFilc** a Google által pár éve létrehozott **[Flutter](https://flutter.dev/)** keretrendszert használja, aminek nyelve a **[Dart](https://dart.dev/)**. Ha ismered a C#, Java, C++, vagy egyéb hasonló programnyelvek működését, **nem fog nagy gondot okozni a használata.** A felhasználói felület létrehozásában az is segíthet, ha foglalkoztál már korábban weboldalakkal vagy alkalmazásfejlesztéssel.
|
||||||
|
Ha még nem használtad a Flutter-t, mindenképp böngészd át a [YouTube csatornájukat](https://www.youtube.com/channel/UCwXdFgeE9KYzlDdR7TG9cMw).
|
||||||
|
Kód vagy UI teszteléséhez Flutter telepítése nélkül is használhatod a [DartPad](https://dartpad.dev/)-et.
|
||||||
|
|
||||||
A Filc a Google által pár éve létrehozott **[Fluttert](https://flutter.dev/)** használja, aminek nyelve a **[Dart](https://dart.dev/)**. Ha ismered a C#-ot, Javát, C++t, vagy egyéb hasonló nyelvet, **nem fog gondot okozni a használata.** A felhasználói felület létrehozásában az is segíthet, ha foglalkoztál már korábban weboldalakkal.
|
#### [Segítség a Flutter telepítéséhez](https://docs.flutter.dev/get-started/install)
|
||||||
Ha még nem használtál Fluttert, mindenképp böngészd át a [YouTube csatornájukat](https://www.youtube.com/channel/UCwXdFgeE9KYzlDdR7TG9cMw).
|
**Használd a Flutter stable verzióját!** Írd be a terminálba: `flutter channel stable`
|
||||||
Könnyen tudsz kódot, vagy akár UI-t is tesztelni a [DartPad](https://dartpad.dev/) oldalon.
|
|
||||||
|
|
||||||
#### [Segítség a Flutter telepítéséhez és a forráskód futtatásához](/.github/SETUP.md)
|
Ha nem értessz a Git-hez vagy a GitHub-hoz, ajánljuk figyelmedbe [ezt a cikket](https://medium.com/envienta-magyarorsz%C3%A1g/git-%C3%A9s-github-gyorstalpal%C3%B3-f2d78a732deb), viszont arra kérünk, hogy a használatukat ne a **reFilc**en próbáld ki először. Hozz létre egy saját Repo-t és abban tesztelgess. Ha már nagyjából kitapasztaltad, várjuk hozzájárulásodat.
|
||||||
Fontos: **Legyél a flutter beta verzióján!** Írd be: `flutter channel beta`
|
|
||||||
|
|
||||||
|
Készíts egy Fork-ot a saját GitHub fiókod alá.
|
||||||
|
A **reFilc** legfrissebb, **épp fejlesztés alatt álló verzióját a [master branch](https://github.com/refilc/naplo/tree/master)-en találod**. Kérjük ide Commit-olj és ide célozd a Fork-odból a Pull Request-edet. Írd le benne, hogy mit változtattál és ha lehet, csatolj képernyőképet is.
|
||||||
Ha nem értesz a Githez, ajánljuk figyelmedbe [ezt a cikket](https://medium.com/envienta-magyarorsz%C3%A1g/git-%C3%A9s-github-gyorstalpal%C3%B3-f2d78a732deb). Viszont arra kérünk, a Git használatát ne a Filcen próbáld ki először, hozz létre előbb egy saját Repót, és abba tesztelgess. Ha már nagyjából kitapasztaltad, várjuk hozzájárulásodat.
|
Minél gyakrabban készíts minél részletesebben elnevezett Commit-okat, hogy mások is el tudjanak igazodni az általad beküldött kódban.
|
||||||
|
|
||||||
Készíts egy forkot a saját fiókod alá.
|
|
||||||
A Filc legfrissebb, épp fejlesztés alatt álló verzióját a [dev brancen](https://github.com/filcnaplo/filcnaplo/tree/dev) találod, kérjük ide commitolj, és ide célozd a forkodból a Pull Requested. Írd le benne, mit változtattál, és ha lehet, csatolj képernyőképet is.
|
|
||||||
Minél gyakrabban készíts minél részletesebben elnevezett commitokat, hogy el tudjunk tájékozódni az általad beküldött kódon.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Az általad fejlesztett funkciók mellé a changelogban odakerül GitHub felhasználóneved.
|
Az általad fejlesztett funkciók mellé a Changelog-ba odakerül a GitHub felhasználóneved.
|
||||||
Ha jelentős és rendszeres hozzájáruló vagy, Discordon megkapod a `DEV` rangot.
|
Ha jelentős és rendszeres hozzájáruló vagy, Discord-on megkaphatod a `DEV` rangot.
|
||||||
|
|
||||||
Ha bárhol elakadtál, keress minket Discordon.
|
Ha bárhol elakadtál vagy kérdésed van, keress bátran Discordon!
|
||||||
Jó fejlesztést kívánunk!
|
**Jó fejlesztést kívánunk!**
|
||||||
|
|||||||
2
LICENSE
@@ -1,6 +1,6 @@
|
|||||||
BSD 3-Clause License
|
BSD 3-Clause License
|
||||||
|
|
||||||
Copyright (c) 2021, Filc
|
Copyright (c) 2023, reFilc
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
|||||||
36
README.md
@@ -1,24 +1,50 @@
|
|||||||
<p align=center>
|
<p align=center>
|
||||||
<img src=".github/logo.png" width=150>
|
<img src="https://media.discordapp.net/attachments/1111727410677825596/1113217167513624646/reFilc_Logo_Squircle.png?width=671&height=671" width=150>
|
||||||
<h1 align=center><b>Filc Napló</b></h1>
|
<h1 align=center><b>reFilc</b></h1>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
#### Nem hivatalos e-napló alkalmazás az eKRÉTA rendszerhez
|
#### Nem hivatalos e-napló alkalmazás az e-KRÉTA rendszerhez - tanulóktól, tanulóknak.
|
||||||
|
|
||||||
[](https://github.com/filc/naplo/releases) [](http://filcnaplo.hu/discord)
|
[](https://github.com/refilc/naplo/releases) [](https://dc.refilc.hu)
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
### Clone the project
|
### Clone the project
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git clone --recursive https://github.com/filc/naplo
|
git clone https://github.com/refilc/naplo
|
||||||
cd naplo
|
cd naplo
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Install packages
|
||||||
|
|
||||||
|
Run `fix-pub.sh`
|
||||||
|
|
||||||
### Run the app
|
### Run the app
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd filcnaplo
|
cd filcnaplo
|
||||||
flutter run
|
flutter run
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Contribution
|
||||||
|
|
||||||
|
**Nézd meg a [Contribution guide](CONTRIBUTING.md)-ot!**
|
||||||
|
|
||||||
|
Az összes (ugyan azon verzióhoz tartozó) contribution meg fog jelenni a release-nél. Kérjük, írd le a Discord nevedet a Description-be, hogy adhassunk rangot.
|
||||||
|
|
||||||
|
-------
|
||||||
|
|
||||||
|
# Team
|
||||||
|
|
||||||
|
**kima:** head developer / project manager
|
||||||
|
|
||||||
|
**Reiner, pdf, Pearoo:** community- and project manager / developer
|
||||||
|
|
||||||
|
**vrolandd, TMarccci:** head developer
|
||||||
|
|
||||||
|
**dwe., xou:** designer
|
||||||
|
|
||||||
|
**Péter:** social media manager / video editor
|
||||||
|
|
||||||
|
**annon:** a régi Filc Napló fejlesztője (ez az app, ha bár sokban változott, alapjaiban a Filc-re épül)
|
||||||
1
filcnaplo/.gitignore
vendored
@@ -44,3 +44,4 @@ app.*.map.json
|
|||||||
/android/app/debug
|
/android/app/debug
|
||||||
/android/app/profile
|
/android/app/profile
|
||||||
/android/app/release
|
/android/app/release
|
||||||
|
key.properties
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
# This file should be version controlled.
|
# This file should be version controlled.
|
||||||
|
|
||||||
version:
|
version:
|
||||||
revision: 3c0bee85b8e43b860877922bdc411a7333db4d32
|
revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
|
||||||
channel: beta
|
channel: stable
|
||||||
|
|
||||||
project_type: app
|
project_type: app
|
||||||
|
|
||||||
@@ -13,11 +13,11 @@ project_type: app
|
|||||||
migration:
|
migration:
|
||||||
platforms:
|
platforms:
|
||||||
- platform: root
|
- platform: root
|
||||||
create_revision: 3c0bee85b8e43b860877922bdc411a7333db4d32
|
create_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
|
||||||
base_revision: 3c0bee85b8e43b860877922bdc411a7333db4d32
|
base_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
|
||||||
- platform: macos
|
- platform: web
|
||||||
create_revision: 3c0bee85b8e43b860877922bdc411a7333db4d32
|
create_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
|
||||||
base_revision: 3c0bee85b8e43b860877922bdc411a7333db4d32
|
base_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
|
||||||
|
|
||||||
# User provided section
|
# User provided section
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
# filcnaplo
|
# refilc
|
||||||
|
|
||||||
Main lib
|
Main lib
|
||||||
@@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
def keystoreProperties = new Properties()
|
def keystoreProperties = new Properties()
|
||||||
def keystorePropertiesFile = rootProject.file("$System.env.HOME/keys/filc3.properties")
|
def keystorePropertiesFile = rootProject.file("key.properties")
|
||||||
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
||||||
|
|
||||||
android {
|
android {
|
||||||
@@ -44,7 +44,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "hu.filc.naplo"
|
applicationId "hu.refilc.naplo"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
@@ -53,6 +53,14 @@ android {
|
|||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
// Flag to enable support for the new language APIs
|
||||||
|
coreLibraryDesugaringEnabled true
|
||||||
|
// Sets Java compatibility to Java 8
|
||||||
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
keyAlias keystoreProperties['keyAlias']
|
keyAlias keystoreProperties['keyAlias']
|
||||||
@@ -85,4 +93,7 @@ dependencies {
|
|||||||
implementation 'joda-time:joda-time:2.9.4'
|
implementation 'joda-time:joda-time:2.9.4'
|
||||||
androidTestImplementation 'androidx.test:runner:1.1.1'
|
androidTestImplementation 'androidx.test:runner:1.1.1'
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
|
||||||
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
|
||||||
|
implementation 'androidx.window:window:1.0.0'
|
||||||
|
implementation 'androidx.window:window-java:1.0.0'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="hu.filc.naplo">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="hu.refilc.naplo">
|
||||||
<!-- Permissions -->
|
<!-- Permissions -->
|
||||||
<uses-permission android:name="android.permission.INTERNET"/>
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
<uses-permission android:name="android.permission.VIBRATE" />
|
<uses-permission android:name="android.permission.VIBRATE" />
|
||||||
|
|||||||
@@ -1,7 +1,17 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="hu.filc.naplo">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
<application android:label="Filc Napló" android:icon="@mipmap/ic_launcher" android:requestLegacyExternalStorage="true">
|
xmlns:tools="http://schemas.android.com/tools" package="hu.refilc.naplo">
|
||||||
<activity android:exported="true" android:name=".MainActivity" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize">
|
<application android:name="${applicationName}" android:label="reFilc" tools:replace="android:label" android:icon="@mipmap/ic_launcher"
|
||||||
<meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="@style/NormalTheme" />
|
android:requestLegacyExternalStorage="true">
|
||||||
|
<activity android:exported="true" android:name="hu.refilc.naplo.MainActivity"
|
||||||
|
android:launchMode="singleTop" android:theme="@style/LaunchTheme"
|
||||||
|
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||||
|
android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize"
|
||||||
|
android:showWhenLocked="true"
|
||||||
|
android:turnScreenOn="true">
|
||||||
|
<meta-data android:name="io.flutter.embedding.android.SplashScreenDrawable"
|
||||||
|
android:resource="@drawable/launch_background" />
|
||||||
|
<meta-data android:name="io.flutter.embedding.android.NormalTheme"
|
||||||
|
android:resource="@style/NormalTheme" />
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
@@ -10,16 +20,26 @@
|
|||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<category android:name="android.intent.category.BROWSABLE" />
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
<!-- Accepts URIs that begin with https://api.filcnaplo.hu -->
|
<!-- Accepts URIs that begin with https://api.refilcapp.hu -->
|
||||||
<data
|
<data
|
||||||
android:scheme="https"
|
android:scheme="https"
|
||||||
android:host="api.filcnaplo.hu"
|
android:host="api.refilcapp.hu"
|
||||||
android:pathPrefix="/callback" />
|
android:pathPrefix="/v1/auth/callback" />
|
||||||
|
</intent-filter>
|
||||||
|
<intent-filter android:autoVerify="true">
|
||||||
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
<!-- Accepts URIs that begin with https://refilc.hu -->
|
||||||
|
<data
|
||||||
|
android:scheme="https"
|
||||||
|
android:host="refilc.hu"
|
||||||
|
android:pathPrefix="/app" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<meta-data android:name="flutterEmbedding" android:value="2" />
|
<meta-data android:name="flutterEmbedding" android:value="2" />
|
||||||
|
|
||||||
<receiver android:name=".widget_timetable.WidgetTimetable"
|
<receiver android:name="hu.refilc.naplo.widget_timetable.WidgetTimetable"
|
||||||
android:exported="true">
|
android:exported="true">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
||||||
@@ -35,7 +55,7 @@
|
|||||||
android:resource="@xml/home_widget_test_info" />
|
android:resource="@xml/home_widget_test_info" />
|
||||||
</receiver>
|
</receiver>
|
||||||
|
|
||||||
<service android:name=".widget_timetable.WidgetTimetableService"
|
<service android:name="hu.refilc.naplo.widget_timetable.WidgetTimetableService"
|
||||||
android:permission="android.permission.BIND_REMOTEVIEWS" />
|
android:permission="android.permission.BIND_REMOTEVIEWS" />
|
||||||
|
|
||||||
<receiver android:name="es.antonborri.home_widget.HomeWidgetBackgroundReceiver"
|
<receiver android:name="es.antonborri.home_widget.HomeWidgetBackgroundReceiver"
|
||||||
@@ -49,11 +69,15 @@
|
|||||||
android:permission="android.permission.BIND_JOB_SERVICE" android:exported="true" />
|
android:permission="android.permission.BIND_JOB_SERVICE" android:exported="true" />
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
|
<meta-data android:name="flutterEmbedding" android:value="2" />
|
||||||
|
|
||||||
<!-- Permissions -->
|
<!-- Permissions -->
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.VIBRATE" />
|
<uses-permission android:name="android.permission.VIBRATE" />
|
||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||||
|
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
|
||||||
|
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
||||||
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
||||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
package hu.filc.naplo;
|
|
||||||
|
|
||||||
import android.os.Bundle;
|
|
||||||
|
|
||||||
import io.flutter.embedding.android.FlutterActivity;
|
|
||||||
import io.flutter.plugins.GeneratedPluginRegistrant;
|
|
||||||
|
|
||||||
import io.flutter.embedding.engine.FlutterEngine;
|
|
||||||
|
|
||||||
public class MainActivity extends FlutterActivity {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
|
|
||||||
GeneratedPluginRegistrant.registerWith(new FlutterEngine(this));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../../../../../../../../filcnaplo_premium/android/database
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../../../../../../../../filcnaplo_premium/android/utils
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../../../../../../../../filcnaplo_premium/android/widget_timetable
|
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package hu.refilc.naplo;
|
||||||
|
|
||||||
|
import io.flutter.embedding.android.FlutterActivity;
|
||||||
|
|
||||||
|
public class MainActivity extends FlutterActivity {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,119 @@
|
|||||||
|
package hu.refilc.naplo.database;
|
||||||
|
|
||||||
|
import android.content.ContentValues;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.database.Cursor;
|
||||||
|
import android.database.sqlite.SQLiteDatabase;
|
||||||
|
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
import hu.refilc.naplo.database.SQLiteHelper;
|
||||||
|
|
||||||
|
public class DBManager {
|
||||||
|
private Context context;
|
||||||
|
private SQLiteDatabase database;
|
||||||
|
private SQLiteHelper dbHelper;
|
||||||
|
|
||||||
|
public DBManager(Context c) {
|
||||||
|
this.context = c;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DBManager open() throws SQLException {
|
||||||
|
this.dbHelper = new SQLiteHelper(this.context);
|
||||||
|
this.database = this.dbHelper.getWritableDatabase();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void close() {
|
||||||
|
this.dbHelper.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Cursor fetchWidget(int wid) {
|
||||||
|
Cursor cursor = this.database.query(SQLiteHelper.TABLE_NAME_WIDGETS, new String[]{SQLiteHelper._ID, SQLiteHelper.DAY_SEL}, SQLiteHelper._ID + " = " + wid, null, null, null, null);
|
||||||
|
if (cursor != null) {
|
||||||
|
cursor.moveToFirst();
|
||||||
|
}
|
||||||
|
return cursor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Cursor fetchTimetable() {
|
||||||
|
Cursor cursor = this.database.query(SQLiteHelper.TABLE_NAME_USER_DATA, new String[]{SQLiteHelper.TIMETABLE}, null, null, null, null, null);
|
||||||
|
if (cursor != null) {
|
||||||
|
cursor.moveToFirst();
|
||||||
|
}
|
||||||
|
return cursor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Cursor fetchLastUser() {
|
||||||
|
Cursor cursor = this.database.query(SQLiteHelper.TABLE_NAME_SETTINGS, new String[]{SQLiteHelper.LAST_ACCOUNT_ID}, null, null, null, null, null);
|
||||||
|
if (cursor != null) {
|
||||||
|
cursor.moveToFirst();
|
||||||
|
}
|
||||||
|
return cursor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Cursor fetchTheme() {
|
||||||
|
Cursor cursor = this.database.query(SQLiteHelper.TABLE_NAME_SETTINGS, new String[]{SQLiteHelper.THEME, SQLiteHelper.ACCENT_COLOR}, null, null, null, null, null);
|
||||||
|
if (cursor != null) {
|
||||||
|
cursor.moveToFirst();
|
||||||
|
}
|
||||||
|
return cursor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Cursor fetchPremiumToken() {
|
||||||
|
Cursor cursor = this.database.query(SQLiteHelper.TABLE_NAME_SETTINGS, new String[]{SQLiteHelper.PREMIUM_TOKEN}, null, null, null, null, null);
|
||||||
|
if (cursor != null) {
|
||||||
|
cursor.moveToFirst();
|
||||||
|
}
|
||||||
|
return cursor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Cursor fetchPremiumScopes() {
|
||||||
|
Cursor cursor = this.database.query(SQLiteHelper.TABLE_NAME_SETTINGS, new String[]{SQLiteHelper.PREMIUM_SCOPES}, null, null, null, null, null);
|
||||||
|
if (cursor != null) {
|
||||||
|
cursor.moveToFirst();
|
||||||
|
}
|
||||||
|
return cursor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Cursor fetchLocale() {
|
||||||
|
Cursor cursor = this.database.query(SQLiteHelper.TABLE_NAME_SETTINGS, new String[]{SQLiteHelper.LOCALE}, null, null, null, null, null);
|
||||||
|
if (cursor != null) {
|
||||||
|
cursor.moveToFirst();
|
||||||
|
}
|
||||||
|
return cursor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteWidget(int _id) {
|
||||||
|
this.database.delete(SQLiteHelper.TABLE_NAME_WIDGETS, "_id=" + _id, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*public void changeSettings(int _id, Map<String, String> map) {
|
||||||
|
ContentValues con = new ContentValues();
|
||||||
|
for(Map.Entry<String, String> e: map.entrySet()){
|
||||||
|
con.put(e.getKey(), e.getValue());
|
||||||
|
}
|
||||||
|
this.database.update(SQLiteHelper.TABLE_NAME_WIDGETS, con, "_id = " + _id, null);
|
||||||
|
}
|
||||||
|
public void insertSettings(int _id, Map<String, String> map) {
|
||||||
|
ContentValues con = new ContentValues();
|
||||||
|
for(Map.Entry<String, String> e: map.entrySet()){
|
||||||
|
con.put(e.getKey(), e.getValue());
|
||||||
|
//Log.d("Settings added", e.getKey() + " - " + e.getValue());
|
||||||
|
}
|
||||||
|
this.database.insert(SQLiteHelper.TABLE_NAME_WIDGETS, null, con);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
public void insertSelDay(int _id, int day_sel) {
|
||||||
|
ContentValues con = new ContentValues();
|
||||||
|
con.put(SQLiteHelper._ID, _id);
|
||||||
|
con.put(SQLiteHelper.DAY_SEL, day_sel);
|
||||||
|
this.database.insert(SQLiteHelper.TABLE_NAME_WIDGETS, null, con);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int update(int _id, int day_sel) {
|
||||||
|
ContentValues con = new ContentValues();
|
||||||
|
con.put(SQLiteHelper.DAY_SEL, day_sel);
|
||||||
|
return this.database.update(SQLiteHelper.TABLE_NAME_WIDGETS, con, SQLiteHelper._ID + " = " + _id, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package hu.refilc.naplo.database;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.database.sqlite.SQLiteDatabase;
|
||||||
|
import android.database.sqlite.SQLiteOpenHelper;
|
||||||
|
|
||||||
|
public class SQLiteHelper extends SQLiteOpenHelper {
|
||||||
|
private static final String CREATE_TABLE_WIDGET = " create table widgets ( _id INTEGER NOT NULL, day_sel INTEGER NOT NULL);";
|
||||||
|
private static final String DB_NAME = "app.db";
|
||||||
|
private static final int DB_VERSION = 1;
|
||||||
|
public static final String _ID = "_id";
|
||||||
|
public static final String DAY_SEL = "day_sel";
|
||||||
|
public static final String TIMETABLE = "timetable";
|
||||||
|
public static final String LAST_ACCOUNT_ID = "last_account_id";
|
||||||
|
public static final String THEME = "theme";
|
||||||
|
public static final String PREMIUM_TOKEN = "premium_token";
|
||||||
|
public static final String PREMIUM_SCOPES = "premium_scopes";
|
||||||
|
public static final String LOCALE = "language";
|
||||||
|
public static final String ACCENT_COLOR = "accent_color";
|
||||||
|
public static final String TABLE_NAME_WIDGETS = "widgets";
|
||||||
|
public static final String TABLE_NAME_USER_DATA = "user_data";
|
||||||
|
public static final String TABLE_NAME_SETTINGS = "settings";
|
||||||
|
|
||||||
|
public SQLiteHelper(Context context) {
|
||||||
|
super(context, DB_NAME, null, 7);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onCreate(SQLiteDatabase db) {
|
||||||
|
db.execSQL(CREATE_TABLE_WIDGET);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
|
||||||
|
db.execSQL("DROP TABLE IF EXISTS widgets");
|
||||||
|
onCreate(db);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package hu.refilc.naplo.utils;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.net.ConnectivityManager;
|
||||||
|
import android.net.NetworkInfo;
|
||||||
|
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public class Utils {
|
||||||
|
public static boolean hasNetwork(Context context) {
|
||||||
|
ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||||
|
NetworkInfo netInfo = cm.getActiveNetworkInfo();
|
||||||
|
if (netInfo != null && netInfo.isConnectedOrConnecting()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Date getWeekStartDate() {
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
while (calendar.get(Calendar.DAY_OF_WEEK) != Calendar.MONDAY) {
|
||||||
|
calendar.add(Calendar.DATE, -1);
|
||||||
|
}
|
||||||
|
return calendar.getTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Date getWeekEndDate() {
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
while (calendar.get(Calendar.DAY_OF_WEEK) != Calendar.MONDAY) {
|
||||||
|
calendar.add(Calendar.DATE, 1);
|
||||||
|
}
|
||||||
|
calendar.add(Calendar.DATE, -1);
|
||||||
|
return calendar.getTime();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
package hu.refilc.naplo.utils;
|
||||||
|
|
||||||
|
import java.time.DayOfWeek;
|
||||||
|
import java.time.Duration;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
public class Week {
|
||||||
|
private final LocalDate start;
|
||||||
|
private final LocalDate end;
|
||||||
|
|
||||||
|
private Week(LocalDate start, LocalDate end) {
|
||||||
|
this.start = start;
|
||||||
|
this.end = end;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Week current() {
|
||||||
|
return fromDate(LocalDate.now());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Week fromId(int id) {
|
||||||
|
LocalDate _now = getYearStart().plusDays(id * 7L);
|
||||||
|
return new Week(_now.minusDays(_now.getDayOfWeek().getValue() - 1), _now.plusDays(7 - _now.getDayOfWeek().getValue()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Week fromDate(LocalDate date) {
|
||||||
|
|
||||||
|
return new Week(date.minusDays(date.getDayOfWeek().getValue() - 1), date.plusDays(7 - date.getDayOfWeek().getValue()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Week next() {
|
||||||
|
return Week.fromDate(start.plusDays(8));
|
||||||
|
}
|
||||||
|
|
||||||
|
public int id() {
|
||||||
|
return (int) Math.ceil(Duration.between(getYearStart().atStartOfDay(), start.atStartOfDay()).toDays() / 7f);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static LocalDate getYearStart() {
|
||||||
|
LocalDate now = LocalDate.now();
|
||||||
|
LocalDate start = getYearStart(now.getYear());
|
||||||
|
return start.isBefore(now) ? start : getYearStart(now.getYear() -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static LocalDate getYearStart(int year) {
|
||||||
|
LocalDate time = LocalDate.of(year, 9, 1);
|
||||||
|
if (time.getDayOfWeek() == DayOfWeek.SATURDAY)
|
||||||
|
return time.plusDays(2);
|
||||||
|
else if (time.getDayOfWeek() == DayOfWeek.SUNDAY)
|
||||||
|
return time.plusDays(1);
|
||||||
|
return time;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) return true;
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
Week week = (Week) o;
|
||||||
|
return this.id() == week.id();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return id();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,397 @@
|
|||||||
|
package hu.refilc.naplo.widget_timetable;
|
||||||
|
|
||||||
|
import android.app.PendingIntent;
|
||||||
|
import android.appwidget.AppWidgetManager;
|
||||||
|
import android.appwidget.AppWidgetProvider;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.database.Cursor;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.os.Build;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.RemoteViews;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import org.joda.time.DateTime;
|
||||||
|
import org.json.JSONArray;
|
||||||
|
import org.json.JSONException;
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
import java.time.DayOfWeek;
|
||||||
|
import java.time.format.TextStyle;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
|
import hu.refilc.naplo.database.DBManager;
|
||||||
|
import hu.refilc.naplo.MainActivity;
|
||||||
|
import hu.refilc.naplo.R;
|
||||||
|
|
||||||
|
import hu.refilc.naplo.utils.Week;
|
||||||
|
|
||||||
|
import static android.app.PendingIntent.FLAG_UPDATE_CURRENT;
|
||||||
|
|
||||||
|
import es.antonborri.home_widget.HomeWidgetBackgroundIntent;
|
||||||
|
import es.antonborri.home_widget.HomeWidgetLaunchIntent;
|
||||||
|
import es.antonborri.home_widget.HomeWidgetProvider;
|
||||||
|
|
||||||
|
public class WidgetTimetable extends HomeWidgetProvider {
|
||||||
|
|
||||||
|
private static final String ACTION_WIDGET_CLICK_NAV_LEFT = "list_widget.ACTION_WIDGET_CLICK_NAV_LEFT";
|
||||||
|
private static final String ACTION_WIDGET_CLICK_NAV_RIGHT = "list_widget.ACTION_WIDGET_CLICK_NAV_RIGHT";
|
||||||
|
private static final String ACTION_WIDGET_CLICK_NAV_TODAY = "list_widget.ACTION_WIDGET_CLICK_NAV_TODAY";
|
||||||
|
private static final String ACTION_WIDGET_CLICK_NAV_REFRESH = "list_widget.ACTION_WIDGET_CLICK_NAV_REFRESH";
|
||||||
|
private static final String ACTION_WIDGET_CLICK_BUY_PREMIUM = "list_widget.ACTION_WIDGET_CLICK_BUY_PREMIUM";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds, SharedPreferences widgetData) {
|
||||||
|
for (int i = 0; i < appWidgetIds.length; i++) {
|
||||||
|
RemoteViews views = generateView(context, appWidgetIds[i]);
|
||||||
|
|
||||||
|
if(premiumEnabled(context) && userLoggedIn(context)) {
|
||||||
|
int rday = selectDay(context, appWidgetIds[i], 0, true);
|
||||||
|
views.setTextViewText(R.id.nav_current, convertDayOfWeek(context, rday));
|
||||||
|
}
|
||||||
|
|
||||||
|
pushUpdate(context, views, appWidgetIds[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void pushUpdate(Context context, RemoteViews remoteViews, int appWidgetSingleId) {
|
||||||
|
AppWidgetManager manager = AppWidgetManager.getInstance(context);
|
||||||
|
|
||||||
|
manager.updateAppWidget(appWidgetSingleId, remoteViews);
|
||||||
|
manager.notifyAppWidgetViewDataChanged(appWidgetSingleId, R.id.widget_list);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static RemoteViews generateView(Context context, int appId) {
|
||||||
|
Intent serviceIntent = new Intent(context, WidgetTimetableService.class);
|
||||||
|
serviceIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appId);
|
||||||
|
serviceIntent.setData(Uri.parse(serviceIntent.toUri(Intent.URI_INTENT_SCHEME)));
|
||||||
|
|
||||||
|
RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_timetable);
|
||||||
|
|
||||||
|
views.setViewVisibility(R.id.need_premium, View.GONE);
|
||||||
|
views.setViewVisibility(R.id.need_login, View.GONE);
|
||||||
|
views.setViewVisibility(R.id.tt_grid_cont, View.GONE);
|
||||||
|
|
||||||
|
if(!userLoggedIn(context)) {
|
||||||
|
views.setViewVisibility(R.id.need_login, View.VISIBLE);
|
||||||
|
views.setOnClickPendingIntent(R.id.open_login, makePending(context, ACTION_WIDGET_CLICK_BUY_PREMIUM, appId));
|
||||||
|
} else if(premiumEnabled(context)) {
|
||||||
|
views.setViewVisibility(R.id.tt_grid_cont, View.VISIBLE);
|
||||||
|
views.setOnClickPendingIntent(R.id.nav_to_left, makePending(context, ACTION_WIDGET_CLICK_NAV_LEFT, appId));
|
||||||
|
views.setOnClickPendingIntent(R.id.nav_to_right, makePending(context, ACTION_WIDGET_CLICK_NAV_RIGHT, appId));
|
||||||
|
views.setOnClickPendingIntent(R.id.nav_current, makePending(context, ACTION_WIDGET_CLICK_NAV_TODAY, appId));
|
||||||
|
views.setOnClickPendingIntent(R.id.nav_refresh, makePending(context, ACTION_WIDGET_CLICK_NAV_REFRESH, appId));
|
||||||
|
views.setRemoteAdapter(R.id.widget_list, serviceIntent);
|
||||||
|
views.setEmptyView(R.id.widget_list, R.id.empty_view);
|
||||||
|
} else {
|
||||||
|
views.setViewVisibility(R.id.need_premium, View.VISIBLE);
|
||||||
|
views.setOnClickPendingIntent(R.id.buy_premium, makePending(context, ACTION_WIDGET_CLICK_BUY_PREMIUM, appId));
|
||||||
|
}
|
||||||
|
|
||||||
|
return views;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PendingIntent makePending(Context context, String action, int appWidgetId) {
|
||||||
|
Intent activebtnnext = new Intent(context, WidgetTimetable.class);
|
||||||
|
activebtnnext.setAction(action);
|
||||||
|
activebtnnext.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
|
||||||
|
return PendingIntent.getBroadcast(context, appWidgetId, activebtnnext , PendingIntent.FLAG_IMMUTABLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onReceive(Context context, Intent intent) {
|
||||||
|
super.onReceive(context, intent);
|
||||||
|
|
||||||
|
if(intent.hasExtra(AppWidgetManager.EXTRA_APPWIDGET_ID)) {
|
||||||
|
int appId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID);
|
||||||
|
RemoteViews views = generateView(context, appId);
|
||||||
|
|
||||||
|
try {
|
||||||
|
if(premiumEnabled(context) && userLoggedIn(context)) {
|
||||||
|
if (intent.getAction().equals(ACTION_WIDGET_CLICK_NAV_LEFT)) {
|
||||||
|
int rday = selectDay(context, appId, -1, false);
|
||||||
|
views.setTextViewText(R.id.nav_current, convertDayOfWeek(context, rday));
|
||||||
|
|
||||||
|
pushUpdate(context, views, appId);
|
||||||
|
} else if (intent.getAction().equals(ACTION_WIDGET_CLICK_NAV_RIGHT)) {
|
||||||
|
int rday = selectDay(context, appId, 1, false);
|
||||||
|
views.setTextViewText(R.id.nav_current, convertDayOfWeek(context, rday));
|
||||||
|
|
||||||
|
pushUpdate(context, views, appId);
|
||||||
|
} else if (intent.getAction().equals(ACTION_WIDGET_CLICK_NAV_TODAY)) {
|
||||||
|
int rday = getToday(context);
|
||||||
|
setSelectedDay(context, appId, rday);
|
||||||
|
|
||||||
|
views.setTextViewText(R.id.nav_current, convertDayOfWeek(context, rday));
|
||||||
|
|
||||||
|
pushUpdate(context, views, appId);
|
||||||
|
} else if (intent.getAction().equals(ACTION_WIDGET_CLICK_NAV_REFRESH)) {
|
||||||
|
PendingIntent pendingIntent = HomeWidgetLaunchIntent.INSTANCE.getActivity(context, MainActivity.class, Uri.parse("timetable://refresh"));
|
||||||
|
pendingIntent.send();
|
||||||
|
} else if (intent.getAction().equals("android.appwidget.action.APPWIDGET_DELETED")) {
|
||||||
|
DBManager dbManager = new DBManager(context.getApplicationContext());
|
||||||
|
|
||||||
|
try {
|
||||||
|
dbManager.open();
|
||||||
|
dbManager.deleteWidget(appId);
|
||||||
|
dbManager.close();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(intent.getAction().equals(ACTION_WIDGET_CLICK_BUY_PREMIUM)) {
|
||||||
|
PendingIntent pendingIntent = HomeWidgetLaunchIntent.INSTANCE.getActivity(context, MainActivity.class, Uri.parse("settings://premium"));
|
||||||
|
pendingIntent.send();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String convertDayOfWeek(Context context, int rday) {
|
||||||
|
|
||||||
|
/*if(rday == -1) return DayOfWeek.of(1).getDisplayName(TextStyle.FULL, new Locale("hu", "HU"));
|
||||||
|
|
||||||
|
String dayOfWeek = DayOfWeek.of(rday + 1).getDisplayName(TextStyle.FULL, new Locale("hu", "HU"));*/
|
||||||
|
|
||||||
|
String dayOfWeek = "Unknown";
|
||||||
|
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
|
Locale loc = getLocale(context);
|
||||||
|
|
||||||
|
if (rday == -1)
|
||||||
|
return DayOfWeek.of(1).getDisplayName(TextStyle.FULL, loc);
|
||||||
|
|
||||||
|
dayOfWeek = DayOfWeek.of(rday + 1).getDisplayName(TextStyle.FULL, loc);
|
||||||
|
}
|
||||||
|
|
||||||
|
return dayOfWeek.substring(0, 1).toUpperCase() + dayOfWeek.substring(1).toLowerCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setSelectedDay(Context context, int wid, int day) {
|
||||||
|
DBManager dbManager = new DBManager(context.getApplicationContext());
|
||||||
|
|
||||||
|
try {
|
||||||
|
dbManager.open();
|
||||||
|
dbManager.update(wid, day);
|
||||||
|
dbManager.close();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int getToday(Context context) {
|
||||||
|
int rday = new DateTime().getDayOfWeek() - 1;
|
||||||
|
List<JSONArray> s = genJsonDays(context);
|
||||||
|
|
||||||
|
try {
|
||||||
|
if(checkIsAfter(s, rday)) rday += 1;
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return retDay(rday, s.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int selectDay(Context context, int wid, int add, Boolean afterSubjects) {
|
||||||
|
DBManager dbManager = new DBManager(context.getApplicationContext());
|
||||||
|
|
||||||
|
try {
|
||||||
|
dbManager.open();
|
||||||
|
Cursor cursor = dbManager.fetchWidget(wid);
|
||||||
|
|
||||||
|
List<JSONArray> s = genJsonDays(context);
|
||||||
|
int retday = new DateTime().getDayOfWeek() - 1;
|
||||||
|
|
||||||
|
if(cursor.getCount() != 0) retday = retDay(cursor.getInt(1) + add, s.size());
|
||||||
|
|
||||||
|
if(afterSubjects) if(checkIsAfter(s, retday)) retday += 1;
|
||||||
|
retday = retDay(retday, s.size());
|
||||||
|
|
||||||
|
if(cursor.getCount() == 0) dbManager.insertSelDay(wid, retday);
|
||||||
|
else dbManager.update(wid, retday);
|
||||||
|
|
||||||
|
dbManager.close();
|
||||||
|
|
||||||
|
return retday;
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Boolean checkIsAfter(List<JSONArray> s, int retday) throws Exception {
|
||||||
|
retday = retDay(retday, s.size());
|
||||||
|
|
||||||
|
String vegIdopont = s.get(retday).getJSONObject(s.get(retday).length() - 1).getString("VegIdopont");
|
||||||
|
|
||||||
|
return new DateTime().isAfter(new DateTime(vegIdopont));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int retDay(int retday, int size) {
|
||||||
|
if (retday < 0) retday = size - 1;
|
||||||
|
else if (retday > size - 1) retday = 0;
|
||||||
|
|
||||||
|
return retday;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<JSONArray> genJsonDays(Context context) {
|
||||||
|
List<JSONArray> gen_days = new ArrayList<>();
|
||||||
|
|
||||||
|
DBManager dbManager = new DBManager(context.getApplicationContext());
|
||||||
|
try {
|
||||||
|
dbManager.open();
|
||||||
|
Cursor ct = dbManager.fetchTimetable();
|
||||||
|
dbManager.close();
|
||||||
|
|
||||||
|
if(ct.getCount() == 0) {
|
||||||
|
return gen_days;
|
||||||
|
}
|
||||||
|
|
||||||
|
JSONObject fecthtt = new JSONObject(ct.getString(0));
|
||||||
|
|
||||||
|
JSONArray dayArray = new JSONArray();
|
||||||
|
String currday = "";
|
||||||
|
|
||||||
|
String currweek = String.valueOf(Week.current().id());
|
||||||
|
|
||||||
|
JSONArray week = fecthtt.getJSONArray(currweek);
|
||||||
|
|
||||||
|
for (int i=0; i < week.length(); i++)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
if(i == 0) currday = week.getJSONObject(0).getString("Datum");
|
||||||
|
JSONObject oraObj = week.getJSONObject(i);
|
||||||
|
|
||||||
|
if(!currday.equals(oraObj.getString("Datum"))) {
|
||||||
|
gen_days.add(dayArray);
|
||||||
|
currday = week.getJSONObject(i).getString("Datum");
|
||||||
|
dayArray = new JSONArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
dayArray.put(oraObj);
|
||||||
|
if(i == week.length() - 1) {
|
||||||
|
gen_days.add(dayArray);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
Collections.sort(gen_days, new Comparator<JSONArray>() {
|
||||||
|
|
||||||
|
public int compare(JSONArray a, JSONArray b) {
|
||||||
|
long valA = 0;
|
||||||
|
long valB = 0;
|
||||||
|
|
||||||
|
try {
|
||||||
|
valA = (long) new DateTime( a.getJSONObject(0).getString("Datum")).getMillis();
|
||||||
|
valB = (long) new DateTime( b.getJSONObject(0).getString("Datum")).getMillis();
|
||||||
|
}
|
||||||
|
catch (JSONException ignored) {
|
||||||
|
}
|
||||||
|
|
||||||
|
return (int) (valA - valB);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return gen_days;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String zeroPad(int value, int padding){
|
||||||
|
StringBuilder b = new StringBuilder();
|
||||||
|
b.append(value);
|
||||||
|
while(b.length() < padding){
|
||||||
|
b.insert(0,"0");
|
||||||
|
}
|
||||||
|
return b.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Locale getLocale(Context context) {
|
||||||
|
DBManager dbManager = new DBManager(context.getApplicationContext());
|
||||||
|
|
||||||
|
try {
|
||||||
|
dbManager.open();
|
||||||
|
String loc = dbManager.fetchLocale().getString(0);
|
||||||
|
dbManager.close();
|
||||||
|
|
||||||
|
if(loc.equals("hu") || loc.equals("de")) {
|
||||||
|
return new Locale(loc, loc.toUpperCase());
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Locale("en", "GB");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean premiumEnabled(Context context) {
|
||||||
|
DBManager dbManager = new DBManager(context.getApplicationContext());
|
||||||
|
|
||||||
|
try {
|
||||||
|
dbManager.open();
|
||||||
|
String premium_token = dbManager.fetchPremiumToken().getString(0);
|
||||||
|
String premium_scopes_raw = dbManager.fetchPremiumScopes().getString(0);
|
||||||
|
dbManager.close();
|
||||||
|
|
||||||
|
JSONArray arr = new JSONArray(premium_scopes_raw);
|
||||||
|
List<String> premium_scopes = new ArrayList<>();
|
||||||
|
for(int i = 0; i < arr.length(); i++){
|
||||||
|
String scope = arr.getString(i);
|
||||||
|
premium_scopes.add(scope.substring(scope.lastIndexOf('.') + 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!premium_token.equals("") && (premium_scopes.contains("*") || premium_scopes.contains("TIMETALBE_WIDGET"))) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean userLoggedIn(Context context) {
|
||||||
|
return !lastUserId(context).equals("");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String lastUserId(Context context) {
|
||||||
|
DBManager dbManager = new DBManager(context.getApplicationContext());
|
||||||
|
try {
|
||||||
|
dbManager.open();
|
||||||
|
Cursor cursor = dbManager.fetchLastUser();
|
||||||
|
dbManager.close();
|
||||||
|
|
||||||
|
if(cursor != null && !cursor.getString(0).equals("")) {
|
||||||
|
String last_user = cursor.getString(0);
|
||||||
|
return last_user;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onEnabled(Context context) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDisabled(Context context) {
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,354 @@
|
|||||||
|
package hu.refilc.naplo.widget_timetable;
|
||||||
|
|
||||||
|
import android.appwidget.AppWidgetManager;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.database.Cursor;
|
||||||
|
import android.os.Build;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.RemoteViews;
|
||||||
|
import android.widget.RemoteViewsService;
|
||||||
|
|
||||||
|
import org.joda.time.DateTime;
|
||||||
|
import org.json.JSONArray;
|
||||||
|
import org.json.JSONException;
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import hu.refilc.naplo.database.DBManager;
|
||||||
|
import hu.refilc.naplo.R;
|
||||||
|
|
||||||
|
public class WidgetTimetableDataProvider implements RemoteViewsService.RemoteViewsFactory {
|
||||||
|
|
||||||
|
private Context context;
|
||||||
|
private int appWidgetId;
|
||||||
|
|
||||||
|
private int rday = 0;
|
||||||
|
|
||||||
|
private int theme;
|
||||||
|
|
||||||
|
private Integer[] colorValues;
|
||||||
|
|
||||||
|
List<Lesson> day_subjects = new ArrayList<>();
|
||||||
|
List<Integer> lessonIndexes = new ArrayList<>();
|
||||||
|
|
||||||
|
Item witem;
|
||||||
|
|
||||||
|
/* Default values */
|
||||||
|
|
||||||
|
static class Item {
|
||||||
|
int Layout;
|
||||||
|
|
||||||
|
int NumVisibility;
|
||||||
|
int NameVisibility;
|
||||||
|
int NameNodescVisibility;
|
||||||
|
int DescVisibility;
|
||||||
|
int RoomVisibility;
|
||||||
|
int TimeVisibility;
|
||||||
|
|
||||||
|
int NumColor;
|
||||||
|
int NameColor;
|
||||||
|
int NameNodescColor;
|
||||||
|
int DescColor;
|
||||||
|
|
||||||
|
Integer[] NameNodescPadding = {0, 0, 0, 0};
|
||||||
|
|
||||||
|
public Item(int Layout, int NumVisibility,int NameVisibility,int NameNodescVisibility,int DescVisibility,int RoomVisibility,int TimeVisibility,int NumColor,int NameColor,int NameNodescColor,int DescColor) {
|
||||||
|
this.Layout = Layout;
|
||||||
|
this.NumVisibility = NumVisibility;
|
||||||
|
this.NameVisibility = NameVisibility;
|
||||||
|
this.NameNodescVisibility = NameNodescVisibility;
|
||||||
|
this.DescVisibility = DescVisibility;
|
||||||
|
this.RoomVisibility = RoomVisibility;
|
||||||
|
this.TimeVisibility = TimeVisibility;
|
||||||
|
|
||||||
|
this.NumColor = NumColor;
|
||||||
|
this.NameColor = NameColor;
|
||||||
|
this.NameNodescColor = NameNodescColor;
|
||||||
|
this.DescColor = DescColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static class Lesson {
|
||||||
|
String status;
|
||||||
|
String lessonIndex;
|
||||||
|
String lessonName;
|
||||||
|
String lessonTopic;
|
||||||
|
String lessonRoom;
|
||||||
|
long lessonStart;
|
||||||
|
long lessonEnd;
|
||||||
|
String substituteTeacher;
|
||||||
|
|
||||||
|
public Lesson(String status, String lessonIndex,String lessonName,String lessonTopic, String lessonRoom,long lessonStart,long lessonEnd,String substituteTeacher) {
|
||||||
|
this.status = status;
|
||||||
|
this.lessonIndex = lessonIndex;
|
||||||
|
this.lessonName = lessonName;
|
||||||
|
this.lessonTopic = lessonTopic;
|
||||||
|
this.lessonRoom = lessonRoom;
|
||||||
|
this.lessonStart = lessonStart;
|
||||||
|
this.lessonEnd = lessonEnd;
|
||||||
|
this.substituteTeacher = substituteTeacher;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Integer[] itemNameNodescPadding = {0, 0, 0, 0};
|
||||||
|
|
||||||
|
public WidgetTimetableDataProvider(Context context, Intent intent) {
|
||||||
|
this.context = context;
|
||||||
|
this.appWidgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID);
|
||||||
|
|
||||||
|
this.theme = getThemeAccent(context);
|
||||||
|
|
||||||
|
this.colorValues = new Integer[]{R.color.filc,
|
||||||
|
R.color.blue_shade300,
|
||||||
|
R.color.green_shade300,
|
||||||
|
R.color.lime_shade300,
|
||||||
|
R.color.yellow_shade300,
|
||||||
|
R.color.orange_shade300,
|
||||||
|
R.color.red_shade300,
|
||||||
|
R.color.pink_shade300,
|
||||||
|
R.color.purple_shade300};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate() {
|
||||||
|
initData();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDataSetChanged() {
|
||||||
|
initData();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroy() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getCount() {
|
||||||
|
|
||||||
|
return day_subjects.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLayout(final RemoteViews view) {
|
||||||
|
/* Visibilities */
|
||||||
|
view.setViewVisibility(R.id.tt_item_num, witem.NumVisibility);
|
||||||
|
view.setViewVisibility(R.id.tt_item_name, witem.NameVisibility);
|
||||||
|
view.setViewVisibility(R.id.tt_item_name_nodesc, witem.NameNodescVisibility);
|
||||||
|
view.setViewVisibility(R.id.tt_item_desc, witem.DescVisibility);
|
||||||
|
view.setViewVisibility(R.id.tt_item_room, witem.RoomVisibility);
|
||||||
|
view.setViewVisibility(R.id.tt_item_time, witem.TimeVisibility);
|
||||||
|
|
||||||
|
/* backgroundResources */
|
||||||
|
view.setInt(R.id.main_lay, "setBackgroundResource", witem.Layout);
|
||||||
|
|
||||||
|
/* Paddings */
|
||||||
|
view.setViewPadding(R.id.tt_item_name_nodesc, witem.NameNodescPadding[0], witem.NameNodescPadding[1], witem.NameNodescPadding[2], witem.NameNodescPadding[3]);
|
||||||
|
|
||||||
|
/* Text Colors */
|
||||||
|
view.setInt(R.id.tt_item_num, "setTextColor", getColor(context, witem.NumColor));
|
||||||
|
view.setInt(R.id.tt_item_name, "setTextColor", getColor(context, witem.NameColor));
|
||||||
|
view.setInt(R.id.tt_item_name_nodesc, "setTextColor", getColor(context, witem.NameNodescColor));
|
||||||
|
view.setInt(R.id.tt_item_desc, "setTextColor", getColor(context, witem.DescColor));
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getColor(Context context, int color) {
|
||||||
|
return context.getResources().getColor(color);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RemoteViews getViewAt(int position) {
|
||||||
|
RemoteViews view = new RemoteViews(context.getPackageName(), R.layout.timetable_item);
|
||||||
|
|
||||||
|
witem = defaultItem(theme);
|
||||||
|
|
||||||
|
Lesson curr_subject = day_subjects.get(position);
|
||||||
|
|
||||||
|
if (curr_subject.status.equals("empty")) {
|
||||||
|
witem.NumColor = R.color.text_miss_num;
|
||||||
|
|
||||||
|
witem.TimeVisibility = View.GONE;
|
||||||
|
witem.RoomVisibility = View.GONE;
|
||||||
|
|
||||||
|
witem.NameNodescColor = R.color.text_miss;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!curr_subject.substituteTeacher.equals("null")) {
|
||||||
|
witem.NumColor = R.color.yellow;
|
||||||
|
witem.Layout = R.drawable.card_layout_tile_helyetesitett;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (curr_subject.status.equals("Elmaradt")) {
|
||||||
|
witem.NumColor = R.color.red;
|
||||||
|
witem.Layout = R.drawable.card_layout_tile_elmarad;
|
||||||
|
} else if (curr_subject.status.equals("TanevRendjeEsemeny")) {
|
||||||
|
witem.NumVisibility = View.GONE;
|
||||||
|
witem.TimeVisibility = View.GONE;
|
||||||
|
witem.RoomVisibility = View.GONE;
|
||||||
|
|
||||||
|
witem.NameNodescPadding[0] = 50;
|
||||||
|
witem.NameNodescPadding[2] = 50;
|
||||||
|
|
||||||
|
witem.NameNodescColor = R.color.text_miss;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (curr_subject.lessonTopic.equals("null")) {
|
||||||
|
witem.DescVisibility = View.GONE;
|
||||||
|
witem.NameVisibility = View.GONE;
|
||||||
|
|
||||||
|
witem.NameNodescVisibility = View.VISIBLE;
|
||||||
|
}
|
||||||
|
|
||||||
|
setLayout(view);
|
||||||
|
|
||||||
|
String lessonIndexTrailing = curr_subject.lessonIndex.equals("+") ? "" : ".";
|
||||||
|
|
||||||
|
view.setTextViewText(R.id.tt_item_num, curr_subject.lessonIndex + lessonIndexTrailing);
|
||||||
|
view.setTextViewText(R.id.tt_item_name, curr_subject.lessonName);
|
||||||
|
view.setTextViewText(R.id.tt_item_name_nodesc, curr_subject.lessonName);
|
||||||
|
view.setTextViewText(R.id.tt_item_desc, curr_subject.lessonTopic);
|
||||||
|
view.setTextViewText(R.id.tt_item_room, curr_subject.lessonRoom);
|
||||||
|
if(curr_subject.lessonStart != 0 && curr_subject.lessonEnd != 0)
|
||||||
|
view.setTextViewText(R.id.tt_item_time, WidgetTimetable.zeroPad(new DateTime(curr_subject.lessonStart).getHourOfDay(), 2) + ":" + WidgetTimetable.zeroPad(new DateTime(curr_subject.lessonStart).getMinuteOfHour(), 2) +
|
||||||
|
"\n" + WidgetTimetable.zeroPad(new DateTime(curr_subject.lessonEnd).getHourOfDay(), 2) + ":" + WidgetTimetable.zeroPad(new DateTime(curr_subject.lessonEnd).getMinuteOfHour(),2));
|
||||||
|
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RemoteViews getLoadingView() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getViewTypeCount() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getItemId(int position) {
|
||||||
|
return position;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasStableIds() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initData() {
|
||||||
|
|
||||||
|
theme = getThemeAccent(context);
|
||||||
|
|
||||||
|
rday = WidgetTimetable.selectDay(context, appWidgetId, 0, false);
|
||||||
|
|
||||||
|
day_subjects.clear();
|
||||||
|
lessonIndexes.clear();
|
||||||
|
|
||||||
|
try {
|
||||||
|
List<JSONArray> arr = WidgetTimetable.genJsonDays(context);
|
||||||
|
|
||||||
|
if(arr.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
JSONArray arr_lessons = WidgetTimetable.genJsonDays(context).get(rday);
|
||||||
|
|
||||||
|
for (int i = 0; i < arr_lessons.length(); i++) {
|
||||||
|
JSONObject obj_lessons = arr_lessons.getJSONObject(i);
|
||||||
|
|
||||||
|
day_subjects.add(jsonToLesson(obj_lessons));
|
||||||
|
}
|
||||||
|
} catch (JSONException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(day_subjects.size() > 0) {
|
||||||
|
Collections.sort(day_subjects, new Comparator<Lesson>() {
|
||||||
|
public int compare(Lesson o1, Lesson o2) {
|
||||||
|
return new DateTime(o1.lessonStart).compareTo(new DateTime(o2.lessonStart));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
for (int i = 0; i < day_subjects.size(); i++) {
|
||||||
|
if(!day_subjects.get(i).lessonIndex.equals("+")) {
|
||||||
|
lessonIndexes.add(Integer.valueOf(day_subjects.get(i).lessonIndex));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(lessonIndexes.size() > 0) {
|
||||||
|
|
||||||
|
int lessonsChecked = Collections.min(lessonIndexes);
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
|
while(lessonsChecked < Collections.max(lessonIndexes)) {
|
||||||
|
if(!lessonIndexes.contains(lessonsChecked)) {
|
||||||
|
day_subjects.add(i, emptyLesson(lessonsChecked));
|
||||||
|
}
|
||||||
|
lessonsChecked++;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Integer getThemeAccent(Context context) {
|
||||||
|
DBManager dbManager = new DBManager(context.getApplicationContext());
|
||||||
|
|
||||||
|
try {
|
||||||
|
dbManager.open();
|
||||||
|
Cursor cursor = dbManager.fetchTheme();
|
||||||
|
dbManager.close();
|
||||||
|
|
||||||
|
return cursor.getInt(1);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Item defaultItem(int theme) {
|
||||||
|
return new Item(
|
||||||
|
R.drawable.card_layout_tile,
|
||||||
|
View.VISIBLE,
|
||||||
|
View.VISIBLE,
|
||||||
|
View.INVISIBLE,
|
||||||
|
View.VISIBLE,
|
||||||
|
View.VISIBLE,
|
||||||
|
View.VISIBLE,
|
||||||
|
colorValues[theme >= colorValues.length ? 0 : theme],
|
||||||
|
R.color.text,
|
||||||
|
R.color.text,
|
||||||
|
R.color.text_desc
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Lesson emptyLesson(int lessonIndex) {
|
||||||
|
return new Lesson("empty", String.valueOf(lessonIndex), "Lyukasóra", "null", "null", 0, 0, "null");
|
||||||
|
}
|
||||||
|
|
||||||
|
public Lesson jsonToLesson(JSONObject json) {
|
||||||
|
try {
|
||||||
|
return new Lesson(
|
||||||
|
json.getJSONObject("Allapot").getString("Nev"),
|
||||||
|
!json.getString("Oraszam").equals("null") ? json.getString("Oraszam") : "+",
|
||||||
|
json.getString("Nev"),
|
||||||
|
json.getString("Tema"),
|
||||||
|
json.getString("TeremNeve"),
|
||||||
|
new DateTime(json.getString("KezdetIdopont")).getMillis(),
|
||||||
|
new DateTime(json.getString("VegIdopont")).getMillis(),
|
||||||
|
json.getString("HelyettesTanarNeve")
|
||||||
|
);
|
||||||
|
}catch (Exception e) {
|
||||||
|
Log.d("Filc", "exception: " + e);
|
||||||
|
};
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package hu.refilc.naplo.widget_timetable;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Build;
|
||||||
|
import android.widget.RemoteViewsService;
|
||||||
|
|
||||||
|
public class WidgetTimetableService extends RemoteViewsService {
|
||||||
|
@Override
|
||||||
|
public RemoteViewsFactory onGetViewFactory(Intent intent) {
|
||||||
|
return new WidgetTimetableDataProvider(getApplicationContext(), intent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 8.3 KiB |
|
After Width: | Height: | Size: 11 KiB |
BIN
filcnaplo/android/app/src/main/res/drawable-hdpi/splash.png
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
BIN
filcnaplo/android/app/src/main/res/drawable-mdpi/splash.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 8.3 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 18 KiB |
BIN
filcnaplo/android/app/src/main/res/drawable-v21/background.png
Normal file
|
After Width: | Height: | Size: 69 B |
@@ -1,7 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:drawable="@drawable/launch_gradient_background" />
|
|
||||||
<item>
|
<item>
|
||||||
<bitmap android:gravity="center" android:src="@mipmap/ic_splash"/>
|
<bitmap android:gravity="fill" android:src="@drawable/background"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<bitmap android:gravity="center" android:src="@drawable/splash"/>
|
||||||
</item>
|
</item>
|
||||||
</layer-list>
|
</layer-list>
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<item>
|
|
||||||
<shape>
|
|
||||||
<gradient
|
|
||||||
android:startColor="#123323"
|
|
||||||
android:endColor="#20AC9B"
|
|
||||||
android:angle="135" />
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
</selector>
|
|
||||||
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 20 KiB |
@@ -1,7 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<item android:drawable="@drawable/launch_gradient_background" />
|
|
||||||
<item>
|
|
||||||
<bitmap android:gravity="center" android:src="@mipmap/ic_splash"/>
|
|
||||||
</item>
|
|
||||||
</layer-list>
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<item>
|
|
||||||
<shape>
|
|
||||||
<gradient
|
|
||||||
android:startColor="#123323"
|
|
||||||
android:endColor="#20AC9B"
|
|
||||||
android:angle="135" />
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
</selector>
|
|
||||||
BIN
filcnaplo/android/app/src/main/res/drawable-xhdpi/splash.png
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 47 KiB |
BIN
filcnaplo/android/app/src/main/res/drawable-xxhdpi/splash.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 103 KiB |
BIN
filcnaplo/android/app/src/main/res/drawable-xxxhdpi/splash.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
filcnaplo/android/app/src/main/res/drawable/background.png
Normal file
|
After Width: | Height: | Size: 69 B |
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.2 KiB |
BIN
filcnaplo/android/app/src/main/res/drawable/ic_notification.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.3 KiB |
@@ -1,7 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:drawable="@drawable/launch_gradient_background" />
|
|
||||||
<item>
|
<item>
|
||||||
<bitmap android:gravity="center" android:src="@mipmap/ic_splash"/>
|
<bitmap android:gravity="fill" android:src="@drawable/background"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<bitmap android:gravity="center" android:src="@drawable/splash"/>
|
||||||
</item>
|
</item>
|
||||||
</layer-list>
|
</layer-list>
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<item>
|
|
||||||
<shape>
|
|
||||||
<gradient
|
|
||||||
android:startColor="#123323"
|
|
||||||
android:endColor="#20AC9B"
|
|
||||||
android:angle="135" />
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
</selector>
|
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:id="@+id/main_lay"
|
android:id="@+id/main_lay"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
@@ -15,12 +16,14 @@
|
|||||||
android:id="@+id/tt_item_num"
|
android:id="@+id/tt_item_num"
|
||||||
android:layout_width="50dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:fontFamily="@font/montserrat_medium"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="1."
|
||||||
|
android:textColor="@color/filc"
|
||||||
|
android:textColorLink="#ff3D7BF4"
|
||||||
android:textSize="30sp"
|
android:textSize="30sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:fontFamily="@font/montserrat_medium"
|
tools:ignore="HardcodedText" />
|
||||||
android:text="1."
|
|
||||||
android:gravity="center"
|
|
||||||
android:textColor="@color/filc"></TextView>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tt_item_name"
|
android:id="@+id/tt_item_name"
|
||||||
@@ -33,10 +36,11 @@
|
|||||||
android:text="Óra neve"
|
android:text="Óra neve"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:layout_toLeftOf="@id/tt_item_room"
|
android:layout_toStartOf="@id/tt_item_room"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:layout_toRightOf="@id/tt_item_num"
|
android:layout_toEndOf="@id/tt_item_num"
|
||||||
android:textColor="@color/text"></TextView>
|
android:textColor="@color/text"
|
||||||
|
tools:ignore="HardcodedText" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tt_item_name_nodesc"
|
android:id="@+id/tt_item_name_nodesc"
|
||||||
@@ -47,13 +51,14 @@
|
|||||||
android:fontFamily="@font/montserrat_medium"
|
android:fontFamily="@font/montserrat_medium"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:layout_marginTop="2.5dp"
|
android:layout_marginTop="2.5dp"
|
||||||
android:layout_toLeftOf="@id/tt_item_room"
|
android:layout_toStartOf="@id/tt_item_room"
|
||||||
android:text="Óra neve"
|
android:text="Óra neve"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:layout_toRightOf="@id/tt_item_num"
|
android:layout_toEndOf="@id/tt_item_num"
|
||||||
android:textColor="@color/text"></TextView>
|
android:textColor="@color/text"
|
||||||
|
tools:ignore="HardcodedText" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tt_item_desc"
|
android:id="@+id/tt_item_desc"
|
||||||
@@ -67,10 +72,11 @@
|
|||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:layout_toRightOf="@id/tt_item_num"
|
android:layout_toEndOf="@id/tt_item_num"
|
||||||
android:layout_toLeftOf="@id/tt_item_room"
|
android:layout_toStartOf="@id/tt_item_room"
|
||||||
android:layout_below="@id/tt_item_name"
|
android:layout_below="@id/tt_item_name"
|
||||||
android:textColor="@color/text_desc"></TextView>
|
android:textColor="@color/text_desc"
|
||||||
|
tools:ignore="HardcodedText" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tt_item_room"
|
android:id="@+id/tt_item_room"
|
||||||
@@ -84,8 +90,9 @@
|
|||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="2"
|
android:maxLines="2"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:layout_toLeftOf="@id/tt_item_time"
|
android:layout_toStartOf="@id/tt_item_time"
|
||||||
android:textColor="@color/text_desc"></TextView>
|
android:textColor="@color/text_desc"
|
||||||
|
tools:ignore="HardcodedText" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tt_item_time"
|
android:id="@+id/tt_item_time"
|
||||||
@@ -95,11 +102,12 @@
|
|||||||
android:textFontWeight="500"
|
android:textFontWeight="500"
|
||||||
android:fontFamily="@font/montserrat_medium"
|
android:fontFamily="@font/montserrat_medium"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:layout_marginLeft="2dp"
|
android:layout_marginStart="2dp"
|
||||||
android:layout_marginTop="-2dp"
|
android:layout_marginTop="-2dp"
|
||||||
android:text="8:30\n9:10"
|
android:text="8:30\n9:10"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:textColor="@color/white"></TextView>
|
android:textColor="@color/white"
|
||||||
|
tools:ignore="HardcodedText" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@@ -19,10 +19,12 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="Empty"
|
android:text="Üres / Empty"
|
||||||
|
android:background="@drawable/widget_card_bottom_dark"
|
||||||
android:textColor="@color/text"
|
android:textColor="@color/text"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold"
|
||||||
|
tools:ignore="HardcodedText" />
|
||||||
|
|
||||||
<ListView
|
<ListView
|
||||||
android:id="@+id/widget_list"
|
android:id="@+id/widget_list"
|
||||||
@@ -43,57 +45,63 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="45dp"
|
android:layout_height="45dp"
|
||||||
android:background="@drawable/widget_card_top_dark">
|
android:background="@drawable/widget_card_top_dark">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/nav_refresh"
|
android:id="@+id/nav_refresh"
|
||||||
android:layout_width="40dp"
|
android:layout_width="40dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:layout_toStartOf="@id/nav_to_left"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:foreground="?android:attr/selectableItemBackground"
|
android:foreground="?android:attr/selectableItemBackground"
|
||||||
|
android:padding="10dp"
|
||||||
android:src="@drawable/ic_refresh_cw"
|
android:src="@drawable/ic_refresh_cw"
|
||||||
android:layout_toLeftOf="@id/nav_to_left"
|
|
||||||
android:tint="@color/text_desc"
|
android:tint="@color/text_desc"
|
||||||
tools:ignore="UseAppTint"
|
tools:ignore="UseAppTint"
|
||||||
android:padding="10dp" />
|
android:focusable="true" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/nav_to_left"
|
android:id="@+id/nav_to_left"
|
||||||
android:layout_width="50dp"
|
android:layout_width="45dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:layout_toStartOf="@id/nav_to_right"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:foreground="?android:attr/selectableItemBackground"
|
android:foreground="?android:attr/selectableItemBackground"
|
||||||
|
android:padding="10dp"
|
||||||
android:src="@drawable/ic_chevron_left"
|
android:src="@drawable/ic_chevron_left"
|
||||||
android:layout_toLeftOf="@id/nav_to_right"
|
|
||||||
android:tint="@color/text_desc"
|
android:tint="@color/text_desc"
|
||||||
tools:ignore="UseAppTint"
|
tools:ignore="UseAppTint"
|
||||||
android:padding="10dp" />
|
android:focusable="true" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/nav_to_right"
|
android:id="@+id/nav_to_right"
|
||||||
android:layout_width="50dp"
|
android:layout_width="45dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginEnd="5dp"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:foreground="?android:attr/selectableItemBackground"
|
android:foreground="?android:attr/selectableItemBackground"
|
||||||
|
android:padding="10dp"
|
||||||
android:src="@drawable/ic_chevron_right"
|
android:src="@drawable/ic_chevron_right"
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:layout_marginRight="5dp"
|
|
||||||
android:tint="@color/text_desc"
|
android:tint="@color/text_desc"
|
||||||
tools:ignore="UseAppTint"
|
tools:ignore="UseAppTint"
|
||||||
android:padding="10dp" />
|
android:focusable="true" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/nav_current"
|
android:id="@+id/nav_current"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentStart="true"
|
||||||
android:layout_marginLeft="20sp"
|
android:layout_marginStart="15sp"
|
||||||
android:layout_toLeftOf="@id/nav_refresh"
|
android:layout_marginTop="2sp"
|
||||||
|
android:layout_toStartOf="@id/nav_refresh"
|
||||||
android:fontFamily="@font/montserrat_medium"
|
android:fontFamily="@font/montserrat_medium"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:text="Timetable"
|
android:text="Órarend"
|
||||||
android:textColor="@color/text"
|
android:textColor="@color/text"
|
||||||
android:textSize="24sp"
|
android:textSize="22sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold"
|
||||||
|
tools:ignore="HardcodedText" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
@@ -131,8 +139,9 @@
|
|||||||
android:text="A widget használatához, bejelentkezés szükséges."
|
android:text="A widget használatához, bejelentkezés szükséges."
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:paddingTop="10dp"
|
android:paddingTop="10dp"
|
||||||
android:textSize="17dp"
|
android:textSize="17sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold"
|
||||||
|
tools:ignore="HardcodedText" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/open_login"
|
android:id="@+id/open_login"
|
||||||
@@ -145,8 +154,9 @@
|
|||||||
android:layout_margin="10dp"
|
android:layout_margin="10dp"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:fontFamily="@font/montserrat_medium"
|
android:fontFamily="@font/montserrat_medium"
|
||||||
android:textSize="16dp"
|
android:textSize="16sp"
|
||||||
android:textStyle="bold"/>
|
android:textStyle="bold"
|
||||||
|
tools:ignore="HardcodedText" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
@@ -185,8 +195,9 @@
|
|||||||
android:text="Órák a kezdőképernyőd kényelméből."
|
android:text="Órák a kezdőképernyőd kényelméből."
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:paddingTop="10dp"
|
android:paddingTop="10dp"
|
||||||
android:textSize="16dp"
|
android:textSize="16sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold"
|
||||||
|
tools:ignore="HardcodedText" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -197,7 +208,8 @@
|
|||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:layout_marginTop="0dp"
|
android:layout_marginTop="0dp"
|
||||||
android:layout_marginHorizontal="15dp"
|
android:layout_marginHorizontal="15dp"
|
||||||
android:textSize="14dp" />
|
android:textSize="14sp"
|
||||||
|
tools:ignore="HardcodedText" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/buy_premium"
|
android:id="@+id/buy_premium"
|
||||||
@@ -211,8 +223,9 @@
|
|||||||
android:layout_margin="10dp"
|
android:layout_margin="10dp"
|
||||||
android:textColor="#ff691A9B"
|
android:textColor="#ff691A9B"
|
||||||
android:fontFamily="@font/montserrat_medium"
|
android:fontFamily="@font/montserrat_medium"
|
||||||
android:textSize="16dp"
|
android:textSize="16sp"
|
||||||
android:textStyle="bold"/>
|
android:textStyle="bold"
|
||||||
|
tools:ignore="HardcodedText" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<background android:drawable="@mipmap/ic_launcher_background"/>
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||||
|
<monochrome android:drawable="@mipmap/ic_launcher_monochrome" />
|
||||||
</adaptive-icon>
|
</adaptive-icon>
|
||||||
@@ -2,4 +2,5 @@
|
|||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<background android:drawable="@mipmap/ic_launcher_background"/>
|
<background android:drawable="@mipmap/ic_launcher_background"/>
|
||||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||||
|
<monochrome android:drawable="@mipmap/ic_launcher_monochrome" />
|
||||||
</adaptive-icon>
|
</adaptive-icon>
|
||||||
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 844 B |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 450 B |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 576 B |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 155 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 11 KiB |
@@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
||||||
|
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||||
|
<item name="android:forceDarkAllowed">false</item>
|
||||||
|
<item name="android:windowFullscreen">false</item>
|
||||||
|
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
|
||||||
|
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
|
||||||
|
<item name="android:windowSplashScreenBackground">#3D7BF4</item>
|
||||||
|
<item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item>
|
||||||
|
</style>
|
||||||
|
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||||
|
This theme determines the color of the Android Window while your
|
||||||
|
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||||
|
running.
|
||||||
|
|
||||||
|
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||||
|
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||||
|
<item name="android:windowBackground">?android:colorBackground</item>
|
||||||
|
</style>
|
||||||
|
</resources>
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
<resources>
|
|
||||||
|
|
||||||
<style name="Widget.Android.AppWidget.Container" parent="android:Widget">
|
|
||||||
<item name="android:padding">?attr/appWidgetPadding</item>
|
|
||||||
<item name="android:background">@drawable/app_widget_background</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="Widget.Android.AppWidget.InnerView" parent="android:Widget">
|
|
||||||
<item name="android:padding">?attr/appWidgetPadding</item>
|
|
||||||
<item name="android:background">@drawable/app_widget_inner_view_background</item>
|
|
||||||
</style>
|
|
||||||
</resources>
|
|
||||||
@@ -1,14 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
||||||
<style name="Widget.Android.AppWidget.Container" parent="android:Widget">
|
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||||
<item name="android:padding">?attr/appWidgetPadding</item>
|
<item name="android:forceDarkAllowed">false</item>
|
||||||
<item name="android:background">@drawable/app_widget_background</item>
|
<item name="android:windowFullscreen">false</item>
|
||||||
<item name="android:clipToOutline">true</item>
|
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
|
||||||
|
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
|
||||||
|
<item name="android:windowSplashScreenBackground">#3D7BF4</item>
|
||||||
|
<item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item>
|
||||||
</style>
|
</style>
|
||||||
|
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||||
|
This theme determines the color of the Android Window while your
|
||||||
|
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||||
|
running.
|
||||||
|
|
||||||
<style name="Widget.Android.AppWidget.InnerView" parent="android:Widget">
|
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||||
<item name="android:padding">?attr/appWidgetPadding</item>
|
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||||
<item name="android:background">@drawable/app_widget_inner_view_background</item>
|
<item name="android:windowBackground">?android:colorBackground</item>
|
||||||
<item name="android:clipToOutline">true</item>
|
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||