diff --git a/.gitignore b/.gitignore index 0042435..c1011d6 100644 --- a/.gitignore +++ b/.gitignore @@ -3,11 +3,11 @@ refilc/.flutter-plugins refilc/.flutter-plugins-dependencies refilc/pubspec.lock refilc/.dart_tool/ -refilc/android/ -refilc/ios/ -refilc/windows/ -refilc/linux/ -refilc/macos/ +# refilc/android/ +# refilc/ios/ +# refilc/windows/ +# refilc/linux/ +# refilc/macos/ refilc/build/ refilc_desktop_ui/.flutter-plugins @@ -34,6 +34,14 @@ filcnaplo_premium/.dart_tool/ .github .idea .gitmodules +.gradle refilc/.DS_Store .DS_Store +refilc/linux/flutter/ +refilc/macos/flutter/ +.plugin_symlinks/ +refilc/ios/Flutter/flutter_export_environment.sh +refilc/ios/Flutter/Generated.xcconfig +refilc/ios/Runner/GeneratedPluginRegistrant.h +refilc/ios/Runner/GeneratedPluginRegistrant.m diff --git a/refilc/android/app/build.gradle b/refilc/android/app/build.gradle new file mode 100644 index 0000000..db5d6df --- /dev/null +++ b/refilc/android/app/build.gradle @@ -0,0 +1,112 @@ +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterRoot = localProperties.getProperty('flutter.sdk') +if (flutterRoot == null) { + throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + throw new GradleException("Undefined VersionCode") +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + throw new GradleException("Undefined VersionName") +} + +apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" + +def keystoreProperties = new Properties() +def keystorePropertiesFile = rootProject.file("key.properties") +keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) + +android { + ndkVersion "25.1.8937393" + + compileSdkVersion rootProject.ext.compileSdkVersion + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + lintOptions { + disable 'InvalidPackage' + disable "Instantiatable" + checkReleaseBuilds false + abortOnError false + } + + defaultConfig { + applicationId "hu.refilc.naplo" + minSdkVersion 21 + targetSdkVersion rootProject.ext.targetSdkVersion + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + 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 { + debug { + keyAlias "androiddebugkey" + keyPassword "Jelszo123" + storeFile file("C:/Users/kima/debugkeystore.jks") + storePassword "Jelszo123" + } + + release { + keyAlias keystoreProperties['keyAlias'] + keyPassword keystoreProperties['keyPassword'] + storeFile file(keystoreProperties['storeFile']) + storePassword keystoreProperties['storePassword'] + } + } + + buildTypes { + debug { + signingConfig signingConfigs.debug + } + + release { + signingConfig signingConfigs.release + shrinkResources false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + + buildFeatures { + viewBinding true + } +} + +flutter { + source '../..' +} + +dependencies { + implementation 'com.android.support:multidex:2.0.1' + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation 'joda-time:joda-time:2.9.4' + androidTestImplementation 'androidx.test:runner:1.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' +} diff --git a/refilc/android/app/google-services.json b/refilc/android/app/google-services.json new file mode 100644 index 0000000..09ea9d9 --- /dev/null +++ b/refilc/android/app/google-services.json @@ -0,0 +1,38 @@ +{ + "project_info": { + "project_number": "584481527599", + "project_id": "refilc-mobile-login", + "storage_bucket": "refilc-mobile-login.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:584481527599:android:cd0fef08720efc4de033da", + "android_client_info": { + "package_name": "hu.refilc.naplo" + } + }, + "oauth_client": [ + { + "client_id": "584481527599-2cpalmvit8kl489aoj3v6t28ujcbcd62.apps.googleusercontent.com", + "client_type": 1, + "android_info": { + "package_name": "hu.refilc.naplo", + "certificate_hash": "3c61db0984e5db01569cb084c83f9b3e058d94dc" + } + } + ], + "api_key": [ + { + "current_key": "AIzaSyAl8eWn7XVeWeA9dPMrWtzdRhhH4XOWOaY" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/refilc/android/app/proguard-rules.pro b/refilc/android/app/proguard-rules.pro new file mode 100644 index 0000000..2f9ff85 --- /dev/null +++ b/refilc/android/app/proguard-rules.pro @@ -0,0 +1,11 @@ +-keep class io.flutter.plugin.editing.** { *; } +-keep class androidx.lifecycle.DefaultLifecycleObserver +-keep class com.pauldemarco.flutter_blue.** { *; } +-keep class com.mr.flutter.plugin.filepicker.** { *; } +-keep class com.shockwave.** + +-dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivity$g +-dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivityStarter$Args +-dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivityStarter$Error +-dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivityStarter +-dontwarn com.stripe.android.pushProvisioning.PushProvisioningEphemeralKeyProvider \ No newline at end of file diff --git a/refilc/android/app/src/debug/AndroidManifest.xml b/refilc/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..fcc14fa --- /dev/null +++ b/refilc/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/refilc/android/app/src/main/AndroidManifest.xml b/refilc/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7914701 --- /dev/null +++ b/refilc/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/refilc/android/app/src/main/java/hu/refilc/naplo/MainActivity.java b/refilc/android/app/src/main/java/hu/refilc/naplo/MainActivity.java new file mode 100644 index 0000000..915d9ae --- /dev/null +++ b/refilc/android/app/src/main/java/hu/refilc/naplo/MainActivity.java @@ -0,0 +1,8 @@ +package hu.refilc.naplo; + +import io.flutter.embedding.android.FlutterActivity; +import io.flutter.embedding.android.FlutterFragmentActivity; + +public class MainActivity extends FlutterFragmentActivity { + +} diff --git a/refilc/android/app/src/main/java/hu/refilc/naplo/database/DBManager.java b/refilc/android/app/src/main/java/hu/refilc/naplo/database/DBManager.java new file mode 100644 index 0000000..b39409d --- /dev/null +++ b/refilc/android/app/src/main/java/hu/refilc/naplo/database/DBManager.java @@ -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 map) { + ContentValues con = new ContentValues(); + for(Map.Entry 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 map) { + ContentValues con = new ContentValues(); + for(Map.Entry 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); + } +} \ No newline at end of file diff --git a/refilc/android/app/src/main/java/hu/refilc/naplo/database/SQLiteHelper.java b/refilc/android/app/src/main/java/hu/refilc/naplo/database/SQLiteHelper.java new file mode 100644 index 0000000..5944408 --- /dev/null +++ b/refilc/android/app/src/main/java/hu/refilc/naplo/database/SQLiteHelper.java @@ -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); + } +} \ No newline at end of file diff --git a/refilc/android/app/src/main/java/hu/refilc/naplo/utils/Utils.java b/refilc/android/app/src/main/java/hu/refilc/naplo/utils/Utils.java new file mode 100644 index 0000000..30f2a62 --- /dev/null +++ b/refilc/android/app/src/main/java/hu/refilc/naplo/utils/Utils.java @@ -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(); + } +} \ No newline at end of file diff --git a/refilc/android/app/src/main/java/hu/refilc/naplo/utils/Week.java b/refilc/android/app/src/main/java/hu/refilc/naplo/utils/Week.java new file mode 100644 index 0000000..9f62c3e --- /dev/null +++ b/refilc/android/app/src/main/java/hu/refilc/naplo/utils/Week.java @@ -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(); + } +} \ No newline at end of file diff --git a/refilc/android/app/src/main/java/hu/refilc/naplo/widget_timetable/WidgetTimetable.java b/refilc/android/app/src/main/java/hu/refilc/naplo/widget_timetable/WidgetTimetable.java new file mode 100644 index 0000000..b433ec7 --- /dev/null +++ b/refilc/android/app/src/main/java/hu/refilc/naplo/widget_timetable/WidgetTimetable.java @@ -0,0 +1,392 @@ +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 java.util.Map; +import java.util.HashMap; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; + +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 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 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 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 genJsonDays(Context context) { + List genDays = new ArrayList<>(); + Map dayMap = new HashMap<>(); + + DBManager dbManager = new DBManager(context.getApplicationContext()); + + try { + dbManager.open(); + Cursor ct = dbManager.fetchTimetable(); + + if (ct.getCount() == 0) { + return genDays; + } + + JSONObject fetchedTimetable = new JSONObject(ct.getString(0)); + String currentWeek = String.valueOf(Week.current().id()); + JSONArray week = fetchedTimetable.getJSONArray(currentWeek); + + // Organize lessons into dates + for (int i = 0; i < week.length(); i++) { + try { + JSONObject entry = week.getJSONObject(i); + String date = entry.getString("Datum"); + dayMap.computeIfAbsent(date, k -> new JSONArray()).put(entry); + } catch (JSONException e) { + e.printStackTrace(); + } + } + + genDays.addAll(dayMap.values()); + + // Sort the 'genDays' list of JSON based on the start time of the first entry + genDays.sort((day1, day2) -> { + try { + // Extract the start time of the first entry in each day's JSON + String startTime1 = day1.getJSONObject(0).getString("KezdetIdopont"); + String startTime2 = day2.getJSONObject(0).getString("KezdetIdopont"); + // Compare the start times and return the result for sorting + return startTime1.compareTo(startTime2); + } catch (JSONException e) { + e.printStackTrace(); + return 0; + } + }); + + } catch (Exception e) { + e.printStackTrace(); + } finally { + dbManager.close(); + } + + return genDays; + } + + + + 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 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) { + } +} \ No newline at end of file diff --git a/refilc/android/app/src/main/java/hu/refilc/naplo/widget_timetable/WidgetTimetableDataProvider.java b/refilc/android/app/src/main/java/hu/refilc/naplo/widget_timetable/WidgetTimetableDataProvider.java new file mode 100644 index 0000000..55eaa98 --- /dev/null +++ b/refilc/android/app/src/main/java/hu/refilc/naplo/widget_timetable/WidgetTimetableDataProvider.java @@ -0,0 +1,356 @@ +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 day_subjects = new ArrayList<>(); + List 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 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() { + 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 { + String name = json.getString("Nev"); + name = name.substring(0, 1).toUpperCase() + name.substring(1); // Capitalize name + return new Lesson( + json.getJSONObject("Allapot").getString("Nev"), + !json.getString("Oraszam").equals("null") ? json.getString("Oraszam") : "+", + name, + 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; + } +} \ No newline at end of file diff --git a/refilc/android/app/src/main/java/hu/refilc/naplo/widget_timetable/WidgetTimetableService.java b/refilc/android/app/src/main/java/hu/refilc/naplo/widget_timetable/WidgetTimetableService.java new file mode 100644 index 0000000..1864174 --- /dev/null +++ b/refilc/android/app/src/main/java/hu/refilc/naplo/widget_timetable/WidgetTimetableService.java @@ -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); + } +} \ No newline at end of file diff --git a/refilc/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java b/refilc/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java new file mode 100644 index 0000000..90dcb8d --- /dev/null +++ b/refilc/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java @@ -0,0 +1,189 @@ +package io.flutter.plugins; + +import androidx.annotation.Keep; +import androidx.annotation.NonNull; +import io.flutter.Log; + +import io.flutter.embedding.engine.FlutterEngine; + +/** + * Generated file. Do not edit. + * This file is generated by the Flutter tool based on the + * plugins that support the Android platform. + */ +@Keep +public final class GeneratedPluginRegistrant { + private static final String TAG = "GeneratedPluginRegistrant"; + public static void registerWith(@NonNull FlutterEngine flutterEngine) { + try { + flutterEngine.getPlugins().add(new com.example.android_dynamic_icon.AndroidDynamicIconPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin android_dynamic_icon, com.example.android_dynamic_icon.AndroidDynamicIconPlugin", e); + } + try { + flutterEngine.getPlugins().add(new me.wolszon.app_group_directory.AppGroupDirectoryPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin app_group_directory, me.wolszon.app_group_directory.AppGroupDirectoryPlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.transistorsoft.flutter.backgroundfetch.BackgroundFetchPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin background_fetch, com.transistorsoft.flutter.backgroundfetch.BackgroundFetchPlugin", e); + } + try { + flutterEngine.getPlugins().add(new dev.fluttercommunity.plus.connectivity.ConnectivityPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin connectivity_plus, dev.fluttercommunity.plus.connectivity.ConnectivityPlugin", e); + } + try { + flutterEngine.getPlugins().add(new io.material.plugins.dynamic_color.DynamicColorPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin dynamic_color, io.material.plugins.dynamic_color.DynamicColorPlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.mr.flutter.plugin.filepicker.FilePickerPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin file_picker, com.mr.flutter.plugin.filepicker.FilePickerPlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.jordyhers.flutter_any_logo.FlutterAnyLogoPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin flutter_any_logo, com.jordyhers.flutter_any_logo.FlutterAnyLogoPlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.github.droibit.flutter.plugins.customtabs.CustomTabsPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin flutter_custom_tabs_android, com.github.droibit.flutter.plugins.customtabs.CustomTabsPlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.ajinasokan.flutterdisplaymode.DisplayModePlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin flutter_displaymode, com.ajinasokan.flutterdisplaymode.DisplayModePlugin", e); + } + try { + flutterEngine.getPlugins().add(new io.github.tastelessjolt.flutterdynamicicon.FlutterDynamicIconPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin flutter_dynamic_icon, io.github.tastelessjolt.flutterdynamicicon.FlutterDynamicIconPlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.fluttercandies.flutter_image_compress.ImageCompressPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin flutter_image_compress_common, com.fluttercandies.flutter_image_compress.ImageCompressPlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin flutter_local_notifications, com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.example.flutternativeimage.FlutterNativeImagePlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin flutter_native_image, com.example.flutternativeimage.FlutterNativeImagePlugin", e); + } + try { + flutterEngine.getPlugins().add(new net.jonhanson.flutter_native_splash.FlutterNativeSplashPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin flutter_native_splash, net.jonhanson.flutter_native_splash.FlutterNativeSplashPlugin", e); + } + try { + flutterEngine.getPlugins().add(new io.flutter.plugins.flutter_plugin_android_lifecycle.FlutterAndroidLifecyclePlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin flutter_plugin_android_lifecycle, io.flutter.plugins.flutter_plugin_android_lifecycle.FlutterAndroidLifecyclePlugin", e); + } + try { + flutterEngine.getPlugins().add(new io.flutter.plugins.googlesignin.GoogleSignInPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin google_sign_in_android, io.flutter.plugins.googlesignin.GoogleSignInPlugin", e); + } + try { + flutterEngine.getPlugins().add(new es.antonborri.home_widget.HomeWidgetPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin home_widget, es.antonborri.home_widget.HomeWidgetPlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.lykhonis.imagecrop.ImageCropPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin image_crop, com.lykhonis.imagecrop.ImageCropPlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.example.imagegallerysaver.ImageGallerySaverPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin image_gallery_saver, com.example.imagegallerysaver.ImageGallerySaverPlugin", e); + } + try { + flutterEngine.getPlugins().add(new io.flutter.plugins.imagepicker.ImagePickerPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin image_picker_android, io.flutter.plugins.imagepicker.ImagePickerPlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.flutter_live_activities.FlutterLiveActivitiesPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin live_activities, com.flutter_live_activities.FlutterLiveActivitiesPlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.example.maps_launcher.MapsLauncherPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin maps_launcher, com.example.maps_launcher.MapsLauncherPlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.crazecoder.openfile.OpenFilePlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin open_filex, com.crazecoder.openfile.OpenFilePlugin", e); + } + try { + flutterEngine.getPlugins().add(new dev.fluttercommunity.plus.packageinfo.PackageInfoPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin package_info_plus, dev.fluttercommunity.plus.packageinfo.PackageInfoPlugin", e); + } + try { + flutterEngine.getPlugins().add(new io.flutter.plugins.pathprovider.PathProviderPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin path_provider_android, io.flutter.plugins.pathprovider.PathProviderPlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.baseflow.permissionhandler.PermissionHandlerPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin permission_handler_android, com.baseflow.permissionhandler.PermissionHandlerPlugin", e); + } + try { + flutterEngine.getPlugins().add(new io.flutter.plugins.quickactions.QuickActionsPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin quick_actions_android, io.flutter.plugins.quickactions.QuickActionsPlugin", e); + } + try { + flutterEngine.getPlugins().add(new app.rive.rive.RivePlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin rive_common, app.rive.rive.RivePlugin", e); + } + try { + flutterEngine.getPlugins().add(new dev.fluttercommunity.plus.share.SharePlusPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin share_plus, dev.fluttercommunity.plus.share.SharePlusPlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.tekartik.sqflite.SqflitePlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin sqflite, com.tekartik.sqflite.SqflitePlugin", e); + } + try { + flutterEngine.getPlugins().add(new com.flutter.stripe.StripeAndroidPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin stripe_android, com.flutter.stripe.StripeAndroidPlugin", e); + } + try { + flutterEngine.getPlugins().add(new name.avioli.unilinks.UniLinksPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin uni_links, name.avioli.unilinks.UniLinksPlugin", e); + } + try { + flutterEngine.getPlugins().add(new io.flutter.plugins.urllauncher.UrlLauncherPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin url_launcher_android, io.flutter.plugins.urllauncher.UrlLauncherPlugin", e); + } + try { + flutterEngine.getPlugins().add(new dev.fluttercommunity.workmanager.WorkmanagerPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin workmanager, dev.fluttercommunity.workmanager.WorkmanagerPlugin", e); + } + } +} diff --git a/refilc/android/app/src/main/res/drawable-hdpi/android12splash.png b/refilc/android/app/src/main/res/drawable-hdpi/android12splash.png new file mode 100644 index 0000000..42f64fb Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-hdpi/android12splash.png differ diff --git a/refilc/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png b/refilc/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..314c878 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png differ diff --git a/refilc/android/app/src/main/res/drawable-hdpi/ic_stat_splash_logo.png b/refilc/android/app/src/main/res/drawable-hdpi/ic_stat_splash_logo.png new file mode 100644 index 0000000..f180cf9 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-hdpi/ic_stat_splash_logo.png differ diff --git a/refilc/android/app/src/main/res/drawable-hdpi/splash.png b/refilc/android/app/src/main/res/drawable-hdpi/splash.png new file mode 100644 index 0000000..42f64fb Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-hdpi/splash.png differ diff --git a/refilc/android/app/src/main/res/drawable-hdpi/tinta_image.png b/refilc/android/app/src/main/res/drawable-hdpi/tinta_image.png new file mode 100644 index 0000000..77f4ef2 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-hdpi/tinta_image.png differ diff --git a/refilc/android/app/src/main/res/drawable-mdpi/android12splash.png b/refilc/android/app/src/main/res/drawable-mdpi/android12splash.png new file mode 100644 index 0000000..65928ee Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-mdpi/android12splash.png differ diff --git a/refilc/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png b/refilc/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..aa13b85 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png differ diff --git a/refilc/android/app/src/main/res/drawable-mdpi/ic_stat_splash_logo.png b/refilc/android/app/src/main/res/drawable-mdpi/ic_stat_splash_logo.png new file mode 100644 index 0000000..b6b25d1 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-mdpi/ic_stat_splash_logo.png differ diff --git a/refilc/android/app/src/main/res/drawable-mdpi/splash.png b/refilc/android/app/src/main/res/drawable-mdpi/splash.png new file mode 100644 index 0000000..65928ee Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-mdpi/splash.png differ diff --git a/refilc/android/app/src/main/res/drawable-night-hdpi/android12splash.png b/refilc/android/app/src/main/res/drawable-night-hdpi/android12splash.png new file mode 100644 index 0000000..42f64fb Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-night-hdpi/android12splash.png differ diff --git a/refilc/android/app/src/main/res/drawable-night-mdpi/android12splash.png b/refilc/android/app/src/main/res/drawable-night-mdpi/android12splash.png new file mode 100644 index 0000000..65928ee Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-night-mdpi/android12splash.png differ diff --git a/refilc/android/app/src/main/res/drawable-night-xhdpi/android12splash.png b/refilc/android/app/src/main/res/drawable-night-xhdpi/android12splash.png new file mode 100644 index 0000000..8147fe6 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-night-xhdpi/android12splash.png differ diff --git a/refilc/android/app/src/main/res/drawable-night-xxhdpi/android12splash.png b/refilc/android/app/src/main/res/drawable-night-xxhdpi/android12splash.png new file mode 100644 index 0000000..80a42fb Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-night-xxhdpi/android12splash.png differ diff --git a/refilc/android/app/src/main/res/drawable-night-xxxhdpi/android12splash.png b/refilc/android/app/src/main/res/drawable-night-xxxhdpi/android12splash.png new file mode 100644 index 0000000..2148f7f Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-night-xxxhdpi/android12splash.png differ diff --git a/refilc/android/app/src/main/res/drawable-nodpi/ic_check.xml b/refilc/android/app/src/main/res/drawable-nodpi/ic_check.xml new file mode 100644 index 0000000..62d6723 --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-nodpi/ic_check.xml @@ -0,0 +1,13 @@ + + + diff --git a/refilc/android/app/src/main/res/drawable-nodpi/ic_chevron_left.xml b/refilc/android/app/src/main/res/drawable-nodpi/ic_chevron_left.xml new file mode 100644 index 0000000..01e9d40 --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-nodpi/ic_chevron_left.xml @@ -0,0 +1,13 @@ + + + diff --git a/refilc/android/app/src/main/res/drawable-nodpi/ic_chevron_right.xml b/refilc/android/app/src/main/res/drawable-nodpi/ic_chevron_right.xml new file mode 100644 index 0000000..c1e9015 --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-nodpi/ic_chevron_right.xml @@ -0,0 +1,13 @@ + + + diff --git a/refilc/android/app/src/main/res/drawable-nodpi/ic_droplet.xml b/refilc/android/app/src/main/res/drawable-nodpi/ic_droplet.xml new file mode 100644 index 0000000..cc3690b --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-nodpi/ic_droplet.xml @@ -0,0 +1,13 @@ + + + diff --git a/refilc/android/app/src/main/res/drawable-nodpi/ic_launcher_background.xml b/refilc/android/app/src/main/res/drawable-nodpi/ic_launcher_background.xml new file mode 100644 index 0000000..07d5da9 --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-nodpi/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/refilc/android/app/src/main/res/drawable-nodpi/ic_launcher_foreground.xml b/refilc/android/app/src/main/res/drawable-nodpi/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b068d1 --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-nodpi/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/refilc/android/app/src/main/res/drawable-nodpi/ic_navigation_2.xml b/refilc/android/app/src/main/res/drawable-nodpi/ic_navigation_2.xml new file mode 100644 index 0000000..273720c --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-nodpi/ic_navigation_2.xml @@ -0,0 +1,13 @@ + + + diff --git a/refilc/android/app/src/main/res/drawable-nodpi/ic_refresh_cw.xml b/refilc/android/app/src/main/res/drawable-nodpi/ic_refresh_cw.xml new file mode 100644 index 0000000..f2365a8 --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-nodpi/ic_refresh_cw.xml @@ -0,0 +1,27 @@ + + + + + diff --git a/refilc/android/app/src/main/res/drawable-v21/app_widget_background.xml b/refilc/android/app/src/main/res/drawable-v21/app_widget_background.xml new file mode 100644 index 0000000..785445c --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-v21/app_widget_background.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/refilc/android/app/src/main/res/drawable-v21/app_widget_inner_view_background.xml b/refilc/android/app/src/main/res/drawable-v21/app_widget_inner_view_background.xml new file mode 100644 index 0000000..007e287 --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-v21/app_widget_inner_view_background.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/refilc/android/app/src/main/res/drawable-v21/background.png b/refilc/android/app/src/main/res/drawable-v21/background.png new file mode 100644 index 0000000..d90316e Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-v21/background.png differ diff --git a/refilc/android/app/src/main/res/drawable-v21/launch_background.xml b/refilc/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000..3cc4948 --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/refilc/android/app/src/main/res/drawable-xhdpi/android12splash.png b/refilc/android/app/src/main/res/drawable-xhdpi/android12splash.png new file mode 100644 index 0000000..8147fe6 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-xhdpi/android12splash.png differ diff --git a/refilc/android/app/src/main/res/drawable-xhdpi/card_layout_bg.xml b/refilc/android/app/src/main/res/drawable-xhdpi/card_layout_bg.xml new file mode 100644 index 0000000..860b811 --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-xhdpi/card_layout_bg.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/refilc/android/app/src/main/res/drawable-xhdpi/card_layout_tile.xml b/refilc/android/app/src/main/res/drawable-xhdpi/card_layout_tile.xml new file mode 100644 index 0000000..6466eba --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-xhdpi/card_layout_tile.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/refilc/android/app/src/main/res/drawable-xhdpi/card_layout_tile_elmarad.xml b/refilc/android/app/src/main/res/drawable-xhdpi/card_layout_tile_elmarad.xml new file mode 100644 index 0000000..426d5c1 --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-xhdpi/card_layout_tile_elmarad.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/refilc/android/app/src/main/res/drawable-xhdpi/card_layout_tile_helyetesitett.xml b/refilc/android/app/src/main/res/drawable-xhdpi/card_layout_tile_helyetesitett.xml new file mode 100644 index 0000000..6e5cbff --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-xhdpi/card_layout_tile_helyetesitett.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/refilc/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png b/refilc/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..a83f396 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png differ diff --git a/refilc/android/app/src/main/res/drawable-xhdpi/ic_stat_splash_logo.png b/refilc/android/app/src/main/res/drawable-xhdpi/ic_stat_splash_logo.png new file mode 100644 index 0000000..7c96a2f Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-xhdpi/ic_stat_splash_logo.png differ diff --git a/refilc/android/app/src/main/res/drawable-xhdpi/splash.png b/refilc/android/app/src/main/res/drawable-xhdpi/splash.png new file mode 100644 index 0000000..8147fe6 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-xhdpi/splash.png differ diff --git a/refilc/android/app/src/main/res/drawable-xhdpi/timetable_widget_preview.png b/refilc/android/app/src/main/res/drawable-xhdpi/timetable_widget_preview.png new file mode 100644 index 0000000..7f61c65 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-xhdpi/timetable_widget_preview.png differ diff --git a/refilc/android/app/src/main/res/drawable-xhdpi/widget_card_bottom.xml b/refilc/android/app/src/main/res/drawable-xhdpi/widget_card_bottom.xml new file mode 100644 index 0000000..8a99162 --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-xhdpi/widget_card_bottom.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/refilc/android/app/src/main/res/drawable-xhdpi/widget_card_bottom_dark.xml b/refilc/android/app/src/main/res/drawable-xhdpi/widget_card_bottom_dark.xml new file mode 100644 index 0000000..2551ee3 --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-xhdpi/widget_card_bottom_dark.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/refilc/android/app/src/main/res/drawable-xhdpi/widget_card_top.xml b/refilc/android/app/src/main/res/drawable-xhdpi/widget_card_top.xml new file mode 100644 index 0000000..e0e9376 --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-xhdpi/widget_card_top.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/refilc/android/app/src/main/res/drawable-xhdpi/widget_card_top_dark.xml b/refilc/android/app/src/main/res/drawable-xhdpi/widget_card_top_dark.xml new file mode 100644 index 0000000..4bbd0bb --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-xhdpi/widget_card_top_dark.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/refilc/android/app/src/main/res/drawable-xhdpi/widget_scroll_style.xml b/refilc/android/app/src/main/res/drawable-xhdpi/widget_scroll_style.xml new file mode 100644 index 0000000..a8f281e --- /dev/null +++ b/refilc/android/app/src/main/res/drawable-xhdpi/widget_scroll_style.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/refilc/android/app/src/main/res/drawable-xxhdpi/android12splash.png b/refilc/android/app/src/main/res/drawable-xxhdpi/android12splash.png new file mode 100644 index 0000000..80a42fb Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-xxhdpi/android12splash.png differ diff --git a/refilc/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png b/refilc/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..1de7a46 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png differ diff --git a/refilc/android/app/src/main/res/drawable-xxhdpi/ic_stat_splash_logo.png b/refilc/android/app/src/main/res/drawable-xxhdpi/ic_stat_splash_logo.png new file mode 100644 index 0000000..b8b19e7 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-xxhdpi/ic_stat_splash_logo.png differ diff --git a/refilc/android/app/src/main/res/drawable-xxhdpi/splash.png b/refilc/android/app/src/main/res/drawable-xxhdpi/splash.png new file mode 100644 index 0000000..80a42fb Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-xxhdpi/splash.png differ diff --git a/refilc/android/app/src/main/res/drawable-xxxhdpi/android12splash.png b/refilc/android/app/src/main/res/drawable-xxxhdpi/android12splash.png new file mode 100644 index 0000000..2148f7f Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-xxxhdpi/android12splash.png differ diff --git a/refilc/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png b/refilc/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..beeae31 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png differ diff --git a/refilc/android/app/src/main/res/drawable-xxxhdpi/ic_stat_splash_logo.png b/refilc/android/app/src/main/res/drawable-xxxhdpi/ic_stat_splash_logo.png new file mode 100644 index 0000000..dd12562 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-xxxhdpi/ic_stat_splash_logo.png differ diff --git a/refilc/android/app/src/main/res/drawable-xxxhdpi/splash.png b/refilc/android/app/src/main/res/drawable-xxxhdpi/splash.png new file mode 100644 index 0000000..2148f7f Binary files /dev/null and b/refilc/android/app/src/main/res/drawable-xxxhdpi/splash.png differ diff --git a/refilc/android/app/src/main/res/drawable/background.png b/refilc/android/app/src/main/res/drawable/background.png new file mode 100644 index 0000000..d90316e Binary files /dev/null and b/refilc/android/app/src/main/res/drawable/background.png differ diff --git a/refilc/android/app/src/main/res/drawable/btn_shape.xml b/refilc/android/app/src/main/res/drawable/btn_shape.xml new file mode 100644 index 0000000..d91b3b2 --- /dev/null +++ b/refilc/android/app/src/main/res/drawable/btn_shape.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/refilc/android/app/src/main/res/drawable/btn_shape_login.xml b/refilc/android/app/src/main/res/drawable/btn_shape_login.xml new file mode 100644 index 0000000..22c1d8f --- /dev/null +++ b/refilc/android/app/src/main/res/drawable/btn_shape_login.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/refilc/android/app/src/main/res/drawable/ic_absences.png b/refilc/android/app/src/main/res/drawable/ic_absences.png new file mode 100644 index 0000000..97d6a2d Binary files /dev/null and b/refilc/android/app/src/main/res/drawable/ic_absences.png differ diff --git a/refilc/android/app/src/main/res/drawable/ic_grades.png b/refilc/android/app/src/main/res/drawable/ic_grades.png new file mode 100644 index 0000000..4528dd0 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable/ic_grades.png differ diff --git a/refilc/android/app/src/main/res/drawable/ic_home.png b/refilc/android/app/src/main/res/drawable/ic_home.png new file mode 100644 index 0000000..1321435 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable/ic_home.png differ diff --git a/refilc/android/app/src/main/res/drawable/ic_messages.png b/refilc/android/app/src/main/res/drawable/ic_messages.png new file mode 100644 index 0000000..e6b5178 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable/ic_messages.png differ diff --git a/refilc/android/app/src/main/res/drawable/ic_notification.png b/refilc/android/app/src/main/res/drawable/ic_notification.png new file mode 100644 index 0000000..67fd370 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable/ic_notification.png differ diff --git a/refilc/android/app/src/main/res/drawable/ic_timetable.png b/refilc/android/app/src/main/res/drawable/ic_timetable.png new file mode 100644 index 0000000..71a4621 Binary files /dev/null and b/refilc/android/app/src/main/res/drawable/ic_timetable.png differ diff --git a/refilc/android/app/src/main/res/drawable/launch_background.xml b/refilc/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000..3cc4948 --- /dev/null +++ b/refilc/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/refilc/android/app/src/main/res/font/montserrat_medium.ttf b/refilc/android/app/src/main/res/font/montserrat_medium.ttf new file mode 100644 index 0000000..6e079f6 Binary files /dev/null and b/refilc/android/app/src/main/res/font/montserrat_medium.ttf differ diff --git a/refilc/android/app/src/main/res/ic_launcher-web.png b/refilc/android/app/src/main/res/ic_launcher-web.png new file mode 100644 index 0000000..25ed396 Binary files /dev/null and b/refilc/android/app/src/main/res/ic_launcher-web.png differ diff --git a/refilc/android/app/src/main/res/layout/home_widget_test.xml b/refilc/android/app/src/main/res/layout/home_widget_test.xml new file mode 100644 index 0000000..f0a315a --- /dev/null +++ b/refilc/android/app/src/main/res/layout/home_widget_test.xml @@ -0,0 +1,26 @@ + + + + + + + \ No newline at end of file diff --git a/refilc/android/app/src/main/res/layout/timetable_item.xml b/refilc/android/app/src/main/res/layout/timetable_item.xml new file mode 100644 index 0000000..f057d2d --- /dev/null +++ b/refilc/android/app/src/main/res/layout/timetable_item.xml @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/refilc/android/app/src/main/res/layout/widget_timetable.xml b/refilc/android/app/src/main/res/layout/widget_timetable.xml new file mode 100644 index 0000000..5c34517 --- /dev/null +++ b/refilc/android/app/src/main/res/layout/widget_timetable.xml @@ -0,0 +1,232 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +