mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2025-01-18 12:56:45 -06:00
[Refactor] Remove unused classes and resources.
This commit is contained in:
parent
bf03601e83
commit
4469323fe0
@ -123,9 +123,6 @@
|
||||
android:configChanges="orientation|screenSize|keyboardHidden"
|
||||
android:process=":error_activity"
|
||||
android:theme="@style/DeadTheme" />
|
||||
<activity android:name=".ui.modules.base.CrashGtfoActivity"
|
||||
android:configChanges="orientation|screenSize|keyboardHidden"
|
||||
android:theme="@style/DeadTheme" />
|
||||
<activity android:name=".ui.modules.intro.ChangelogIntroActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:label="@string/app_name"
|
||||
@ -179,13 +176,6 @@
|
||||
____) | __/ | \ V /| | (_| __/\__ \
|
||||
|_____/ \___|_| \_/ |_|\___\___||___/
|
||||
-->
|
||||
<!--<service android:name=".sync.MyFirebaseMessagingService"
|
||||
android:exported="false">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
|
||||
<action android:name="com.google.firebase.MESSAGING_EVENT" />
|
||||
</intent-filter>
|
||||
</service>-->
|
||||
<service android:name=".data.api.ApiService" />
|
||||
<service android:name=".data.firebase.MyFirebaseService"
|
||||
android:exported="false">
|
||||
|
@ -1,27 +0,0 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIEkjCCA3qgAwIBAgIQCgFBQgAAAVOFc2oLheynCDANBgkqhkiG9w0BAQsFADA/
|
||||
MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
|
||||
DkRTVCBSb290IENBIFgzMB4XDTE2MDMxNzE2NDA0NloXDTIxMDMxNzE2NDA0Nlow
|
||||
SjELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUxldCdzIEVuY3J5cHQxIzAhBgNVBAMT
|
||||
GkxldCdzIEVuY3J5cHQgQXV0aG9yaXR5IFgzMIIBIjANBgkqhkiG9w0BAQEFAAOC
|
||||
AQ8AMIIBCgKCAQEAnNMM8FrlLke3cl03g7NoYzDq1zUmGSXhvb418XCSL7e4S0EF
|
||||
q6meNQhY7LEqxGiHC6PjdeTm86dicbp5gWAf15Gan/PQeGdxyGkOlZHP/uaZ6WA8
|
||||
SMx+yk13EiSdRxta67nsHjcAHJyse6cF6s5K671B5TaYucv9bTyWaN8jKkKQDIZ0
|
||||
Z8h/pZq4UmEUEz9l6YKHy9v6Dlb2honzhT+Xhq+w3Brvaw2VFn3EK6BlspkENnWA
|
||||
a6xK8xuQSXgvopZPKiAlKQTGdMDQMc2PMTiVFrqoM7hD8bEfwzB/onkxEz0tNvjj
|
||||
/PIzark5McWvxI0NHWQWM6r6hCm21AvA2H3DkwIDAQABo4IBfTCCAXkwEgYDVR0T
|
||||
AQH/BAgwBgEB/wIBADAOBgNVHQ8BAf8EBAMCAYYwfwYIKwYBBQUHAQEEczBxMDIG
|
||||
CCsGAQUFBzABhiZodHRwOi8vaXNyZy50cnVzdGlkLm9jc3AuaWRlbnRydXN0LmNv
|
||||
bTA7BggrBgEFBQcwAoYvaHR0cDovL2FwcHMuaWRlbnRydXN0LmNvbS9yb290cy9k
|
||||
c3Ryb290Y2F4My5wN2MwHwYDVR0jBBgwFoAUxKexpHsscfrb4UuQdf/EFWCFiRAw
|
||||
VAYDVR0gBE0wSzAIBgZngQwBAgEwPwYLKwYBBAGC3xMBAQEwMDAuBggrBgEFBQcC
|
||||
ARYiaHR0cDovL2Nwcy5yb290LXgxLmxldHNlbmNyeXB0Lm9yZzA8BgNVHR8ENTAz
|
||||
MDGgL6AthitodHRwOi8vY3JsLmlkZW50cnVzdC5jb20vRFNUUk9PVENBWDNDUkwu
|
||||
Y3JsMB0GA1UdDgQWBBSoSmpjBH3duubRObemRWXv86jsoTANBgkqhkiG9w0BAQsF
|
||||
AAOCAQEA3TPXEfNjWDjdGBX7CVW+dla5cEilaUcne8IkCJLxWh9KEik3JHRRHGJo
|
||||
uM2VcGfl96S8TihRzZvoroed6ti6WqEBmtzw3Wodatg+VyOeph4EYpr/1wXKtx8/
|
||||
wApIvJSwtmVi4MFU5aMqrSDE6ea73Mj2tcMyo5jMd6jmeWUHK8so/joWUoHOUgwu
|
||||
X4Po1QYz+3dszkDqMp4fklxBwXRsW10KXzPMTZ+sOPAveyxindmjkW8lGy+QsRlG
|
||||
PfZ+G6Z6h7mjem0Y+iWlkYcV4PIWL1iwBi8saCbGS5jN2p8M+X+Q7UNKEkROb3N6
|
||||
KOqkqm57TH2H3eDJAkSnh6/DNFu0Qg==
|
||||
-----END CERTIFICATE-----
|
@ -38,7 +38,6 @@ import pl.szczodrzynski.edziennik.data.api.events.ProfileListEmptyEvent
|
||||
import pl.szczodrzynski.edziennik.data.api.szkolny.interceptor.Signing
|
||||
import pl.szczodrzynski.edziennik.data.db.AppDb
|
||||
import pl.szczodrzynski.edziennik.data.db.entity.Profile
|
||||
import pl.szczodrzynski.edziennik.network.NetworkUtils
|
||||
import pl.szczodrzynski.edziennik.network.cookie.DumbCookieJar
|
||||
import pl.szczodrzynski.edziennik.sync.SyncWorker
|
||||
import pl.szczodrzynski.edziennik.sync.UpdateWorker
|
||||
@ -88,7 +87,6 @@ class App : MultiDexApplication(), Configuration.Provider, CoroutineScope {
|
||||
.build()
|
||||
|
||||
val permissionChecker by lazy { PermissionChecker(this) }
|
||||
val networkUtils by lazy { NetworkUtils(this) }
|
||||
val gson by lazy { Gson() }
|
||||
|
||||
/* _ _ _______ _______ _____
|
||||
|
@ -1,5 +0,0 @@
|
||||
package pl.szczodrzynski.edziennik;
|
||||
|
||||
import androidx.core.content.FileProvider;
|
||||
|
||||
public class GenericFileProvider extends FileProvider {}
|
@ -66,7 +66,6 @@ import pl.szczodrzynski.edziennik.ui.modules.debug.LabFragment
|
||||
import pl.szczodrzynski.edziennik.ui.modules.error.ErrorDetailsDialog
|
||||
import pl.szczodrzynski.edziennik.ui.modules.error.ErrorSnackbar
|
||||
import pl.szczodrzynski.edziennik.ui.modules.feedback.FeedbackFragment
|
||||
import pl.szczodrzynski.edziennik.ui.modules.feedback.HelpFragment
|
||||
import pl.szczodrzynski.edziennik.ui.modules.grades.GradesListFragment
|
||||
import pl.szczodrzynski.edziennik.ui.modules.grades.editor.GradesEditorFragment
|
||||
import pl.szczodrzynski.edziennik.ui.modules.home.HomeFragment
|
||||
@ -126,7 +125,6 @@ class MainActivity : AppCompatActivity(), CoroutineScope {
|
||||
const val DRAWER_ITEM_DEBUG = 102
|
||||
|
||||
const val TARGET_GRADES_EDITOR = 501
|
||||
const val TARGET_HELP = 502
|
||||
const val TARGET_FEEDBACK = 120
|
||||
const val TARGET_MESSAGES_DETAILS = 503
|
||||
const val TARGET_MESSAGES_COMPOSE = 504
|
||||
@ -224,7 +222,6 @@ class MainActivity : AppCompatActivity(), CoroutineScope {
|
||||
|
||||
// other target items, not directly navigated
|
||||
list += NavTarget(TARGET_GRADES_EDITOR, R.string.menu_grades_editor, GradesEditorFragment::class)
|
||||
list += NavTarget(TARGET_HELP, R.string.menu_help, HelpFragment::class)
|
||||
list += NavTarget(TARGET_FEEDBACK, R.string.menu_feedback, FeedbackFragment::class)
|
||||
list += NavTarget(TARGET_MESSAGES_DETAILS, R.string.menu_message, MessageFragment::class).withPopTo(DRAWER_ITEM_MESSAGES)
|
||||
list += NavTarget(TARGET_MESSAGES_COMPOSE, R.string.menu_message_compose, MessagesComposeFragment::class)
|
||||
|
@ -1,35 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Kuba Szczodrzyński 2020-1-11.
|
||||
*/
|
||||
|
||||
package pl.szczodrzynski.edziennik.data.firebase
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.util.Log
|
||||
import androidx.legacy.content.WakefulBroadcastReceiver
|
||||
import com.google.gson.JsonObject
|
||||
|
||||
class FirebaseBroadcastReceiver : WakefulBroadcastReceiver() {
|
||||
companion object {
|
||||
private const val TAG = "FirebaseBroadcast"
|
||||
}
|
||||
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
val extras = intent.extras
|
||||
val json = JsonObject()
|
||||
extras?.keySet()?.forEach { key ->
|
||||
extras.get(key)?.let {
|
||||
when (it) {
|
||||
is String -> json.addProperty(key, it)
|
||||
is Int -> json.addProperty(key, it)
|
||||
is Long -> json.addProperty(key, it)
|
||||
is Float -> json.addProperty(key, it)
|
||||
is Boolean -> json.addProperty(key, it)
|
||||
else -> json.addProperty(key, it.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
Log.d(TAG, "Intent(action=${intent?.action}, extras=$json)")
|
||||
}
|
||||
}
|
@ -1,222 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Kuba Szczodrzyński 2020-1-11.
|
||||
*/
|
||||
|
||||
package pl.szczodrzynski.edziennik.data.firebase;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.AsyncTask;
|
||||
|
||||
import com.google.firebase.messaging.FirebaseMessagingService;
|
||||
import com.google.firebase.messaging.RemoteMessage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import pl.szczodrzynski.edziennik.App;
|
||||
import pl.szczodrzynski.edziennik.data.api.edziennik.EdziennikTask;
|
||||
import pl.szczodrzynski.edziennik.data.db.entity.LoginStore;
|
||||
import pl.szczodrzynski.edziennik.data.db.entity.Profile;
|
||||
|
||||
import static pl.szczodrzynski.edziennik.utils.Utils.d;
|
||||
import static pl.szczodrzynski.edziennik.utils.Utils.strToInt;
|
||||
|
||||
public class MyFirebaseMessagingService extends FirebaseMessagingService {
|
||||
private static final String TAG = "FirebaseMessaging";
|
||||
|
||||
@Override
|
||||
public void onNewToken(String s) {
|
||||
super.onNewToken(s);
|
||||
|
||||
/* Log.d(TAG, "New token: "+s);
|
||||
App app = (App)getApplicationContext();
|
||||
if (app.config.getSync().getTokenApp() == null || !app.config.getSync().getTokenApp().equals(s)) {
|
||||
app.config.getSync().setTokenApp(s);
|
||||
}*/
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMessageReceived(RemoteMessage remoteMessage) {
|
||||
/*App app = ((App) getApplicationContext());
|
||||
// Not getting messages here? See why this may be: https://goo.gl/39bRNJ
|
||||
|
||||
String from = remoteMessage.getFrom();
|
||||
if (from != null) {
|
||||
switch (from) {
|
||||
case "640759989760":
|
||||
app.debugLog("Firebase got push from App "+remoteMessage.getData().toString());
|
||||
//processAppPush
|
||||
processAppPush(app, remoteMessage);
|
||||
break;
|
||||
case "747285019373":
|
||||
app.debugLog("Firebase got push from Mobidziennik "+remoteMessage.getData().toString());
|
||||
processMobidziennikPush(app, remoteMessage);
|
||||
break;
|
||||
case "513056078587":
|
||||
app.debugLog("Firebase got push from Librus "+remoteMessage.getData().toString());
|
||||
processLibrusPush(app, remoteMessage);
|
||||
break;
|
||||
case "987828170337":
|
||||
app.debugLog("Firebase got push from Vulcan "+remoteMessage.getData().toString());
|
||||
processVulcanPush(app, remoteMessage);
|
||||
break;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
private void processMobidziennikPush(App app, RemoteMessage remoteMessage) {
|
||||
SharedPreferences sharedPreferences = getSharedPreferences("pushtest_mobidziennik", Context.MODE_PRIVATE);
|
||||
sharedPreferences.edit().putString(Long.toString(System.currentTimeMillis()), remoteMessage.getData().toString()+"\n"+remoteMessage.toString()+"\n"+remoteMessage.getMessageType()).apply();
|
||||
String studentIdStr = remoteMessage.getData().get("id_ucznia");
|
||||
if (studentIdStr != null) {
|
||||
int studentId = strToInt(studentIdStr);
|
||||
AsyncTask.execute(() -> {
|
||||
List<Profile> profileList = app.db.profileDao().getAllNow();
|
||||
|
||||
Profile profile = null;
|
||||
|
||||
for (Profile profileFull: profileList) {
|
||||
if (profileFull.getLoginStoreType() == LoginStore.LOGIN_TYPE_MOBIDZIENNIK
|
||||
&& studentId == profileFull.getStudentData("studentId", -1)) {
|
||||
profile = profileFull;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (profile != null) {
|
||||
if (remoteMessage.getData().get("id_wiadomosci") != null) {
|
||||
|
||||
d(TAG, "Syncing profile " + profile.getId());
|
||||
EdziennikTask.Companion.syncProfile(profile.getId(), null, null, null).enqueue(app);
|
||||
} else {
|
||||
/*app.notifier.add(new Notification(app.getContext(), remoteMessage.getData().get("message"))
|
||||
.withProfileData(profile.id, profile.name)
|
||||
.withTitle(remoteMessage.getData().get("title"))
|
||||
.withType(Notification.TYPE_SERVER_MESSAGE)
|
||||
.withFragmentRedirect(MainActivity.DRAWER_ITEM_HOME)
|
||||
);
|
||||
app.notifier.postAll(profile);
|
||||
app.saveConfig("notifications");*/
|
||||
d(TAG, "Syncing profile " + profile.getId());
|
||||
EdziennikTask.Companion.syncProfile(profile.getId(), null, null, null).enqueue(app);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void processLibrusPush(App app, RemoteMessage remoteMessage) {
|
||||
SharedPreferences sharedPreferences = getSharedPreferences("pushtest_librus", Context.MODE_PRIVATE);
|
||||
sharedPreferences.edit().putString(Long.toString(System.currentTimeMillis()), remoteMessage.getData().toString()+"\n"+remoteMessage.toString()+"\n"+remoteMessage.getMessageType()).apply();
|
||||
}
|
||||
|
||||
private void processVulcanPush(App app, RemoteMessage remoteMessage) {
|
||||
SharedPreferences sharedPreferences = getSharedPreferences("pushtest_vulcan", Context.MODE_PRIVATE);
|
||||
sharedPreferences.edit().putString(Long.toString(System.currentTimeMillis()), remoteMessage.getData().toString()+"\n"+remoteMessage.toString()+"\n"+remoteMessage.getMessageType()).apply();
|
||||
}
|
||||
|
||||
private void processAppPush(App app, RemoteMessage remoteMessage) {
|
||||
// Check if message contains a data payload.
|
||||
/*String type = remoteMessage.getData().get("type");
|
||||
if (remoteMessage.getData().size() > 0
|
||||
&& type != null) {
|
||||
//Log.d(TAG, "Message data payload: " + remoteMessage.sync());
|
||||
switch (type) {
|
||||
case "app_update":
|
||||
int versionCode = Integer.parseInt(remoteMessage.getData().get("update_version_code"));
|
||||
if (BuildConfig.VERSION_CODE < versionCode) {
|
||||
String updateVersion = remoteMessage.getData().get("update_version");
|
||||
String updateUrl = remoteMessage.getData().get("update_url");
|
||||
String updateFilename = remoteMessage.getData().get("update_filename");
|
||||
boolean updateMandatory = Boolean.parseBoolean(remoteMessage.getData().get("update_mandatory"));
|
||||
boolean updateDirect = Boolean.parseBoolean(remoteMessage.getData().get("update_direct"));
|
||||
|
||||
if (app.appConfig.updateVersion == null || !app.appConfig.updateVersion.equals(updateVersion)) {
|
||||
app.appConfig.updateVersion = updateVersion;
|
||||
app.appConfig.updateUrl = updateUrl;
|
||||
app.appConfig.updateFilename = updateFilename;
|
||||
app.appConfig.updateMandatory = updateMandatory;
|
||||
app.appConfig.updateDirect = updateDirect;
|
||||
app.saveConfig("updateVersion", "updateUrl", "updateFilename", "updateMandatory");
|
||||
}
|
||||
if (!remoteMessage.getData().containsKey("update_silent")) {
|
||||
app.notifier.notificationUpdatesShow(
|
||||
updateVersion,
|
||||
updateUrl,
|
||||
updateFilename,
|
||||
updateDirect);
|
||||
}
|
||||
} else {
|
||||
if (app.appConfig.updateVersion == null || !app.appConfig.updateVersion.equals("")) {
|
||||
app.appConfig.updateVersion = "";
|
||||
app.appConfig.updateMandatory = false;
|
||||
app.saveConfig("updateVersion", "updateMandatory");
|
||||
}
|
||||
app.notifier.notificationUpdatesHide();
|
||||
}
|
||||
break;
|
||||
case "message":
|
||||
app.notifier.add(new Notification(app.getContext(), remoteMessage.getData().get("message"))
|
||||
.withTitle(remoteMessage.getData().get("title"))
|
||||
.withType(pl.szczodrzynski.edziennik.data.db.entity.Notification.TYPE_SERVER_MESSAGE)
|
||||
.withFragmentRedirect(MainActivity.DRAWER_ITEM_NOTIFICATIONS)
|
||||
);
|
||||
app.notifier.postAll();
|
||||
app.saveConfig("notifications");
|
||||
break;
|
||||
case "feedback_message_from_dev":
|
||||
AsyncTask.execute(() -> {
|
||||
FeedbackMessage feedbackMessage = new FeedbackMessage(true, remoteMessage.getData().get("message"));
|
||||
if (feedbackMessage.text.startsWith("test")) {
|
||||
// todo
|
||||
}
|
||||
else {
|
||||
feedbackMessage.sentTime = Long.parseLong(remoteMessage.getData().get("sent_time"));
|
||||
if (feedbackMessage.text.startsWith("devmode")) {
|
||||
app.config.setDevModePassword(feedbackMessage.text.replace("devmode", ""));
|
||||
app.checkDevModePassword();
|
||||
feedbackMessage.text = "devmode "+(App.devMode ? "allowed" : "disallowed");
|
||||
}
|
||||
Intent intent = new Intent("pl.szczodrzynski.edziennik.ui.modules.base.FeedbackActivity");
|
||||
intent.putExtra("type", "user_chat");
|
||||
intent.putExtra("message", app.gson.toJson(feedbackMessage));
|
||||
app.sendBroadcast(intent);
|
||||
app.db.feedbackMessageDao().add(feedbackMessage);
|
||||
|
||||
app.notifier.add(new Notification(app.getContext(), feedbackMessage.text)
|
||||
.withTitle(remoteMessage.getData().get("title"))
|
||||
.withType(pl.szczodrzynski.edziennik.data.db.entity.Notification.TYPE_FEEDBACK_MESSAGE)
|
||||
.withFragmentRedirect(MainActivity.TARGET_FEEDBACK)
|
||||
);
|
||||
app.notifier.postAll();
|
||||
app.saveConfig("notifications");
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "feedback_message_from_user":
|
||||
AsyncTask.execute(() -> {
|
||||
FeedbackMessage feedbackMessage = new FeedbackMessage(true, remoteMessage.getData().get("message"));
|
||||
feedbackMessage.fromUser = remoteMessage.getData().get("from_user");
|
||||
feedbackMessage.fromUserName = remoteMessage.getData().get("from_user_name");
|
||||
feedbackMessage.sentTime = Long.parseLong(remoteMessage.getData().get("sent_time"));
|
||||
Intent intent = new Intent("pl.szczodrzynski.edziennik.ui.modules.base.FeedbackActivity");
|
||||
intent.putExtra("type", "user_chat");
|
||||
intent.putExtra("message", app.gson.toJson(feedbackMessage));
|
||||
app.sendBroadcast(intent);
|
||||
app.db.feedbackMessageDao().add(feedbackMessage);
|
||||
});
|
||||
app.notifier.add(new Notification(app.getContext(), remoteMessage.getData().get("message"))
|
||||
.withTitle(remoteMessage.getData().get("title"))
|
||||
.withType(pl.szczodrzynski.edziennik.data.db.entity.Notification.TYPE_FEEDBACK_MESSAGE)
|
||||
.withFragmentRedirect(MainActivity.TARGET_FEEDBACK)
|
||||
);
|
||||
app.notifier.postAll();
|
||||
app.saveConfig("notifications");
|
||||
break;
|
||||
case "ping":
|
||||
// just a ping
|
||||
break
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
@ -1,142 +0,0 @@
|
||||
package pl.szczodrzynski.edziennik.network;
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
import android.os.Build;
|
||||
|
||||
import pl.szczodrzynski.edziennik.App;
|
||||
|
||||
import static android.net.ConnectivityManager.RESTRICT_BACKGROUND_STATUS_DISABLED;
|
||||
import static android.net.ConnectivityManager.RESTRICT_BACKGROUND_STATUS_ENABLED;
|
||||
import static android.net.ConnectivityManager.RESTRICT_BACKGROUND_STATUS_WHITELISTED;
|
||||
|
||||
public class NetworkUtils {
|
||||
private App app;
|
||||
|
||||
public NetworkUtils(App _app)
|
||||
{
|
||||
this.app = _app;
|
||||
}
|
||||
|
||||
public boolean isOnline() {
|
||||
assert app != null;
|
||||
ConnectivityManager cm =
|
||||
(ConnectivityManager) app.getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
assert cm != null;
|
||||
NetworkInfo netInfo = cm.getActiveNetworkInfo();
|
||||
return netInfo != null && netInfo.isConnectedOrConnecting();
|
||||
}
|
||||
|
||||
public int checkBackgroundDataRestricted() {
|
||||
|
||||
ConnectivityManager connMgr = (ConnectivityManager) app.getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
assert connMgr != null;
|
||||
switch (connMgr.getRestrictBackgroundStatus()) {
|
||||
case RESTRICT_BACKGROUND_STATUS_ENABLED:
|
||||
return 2;
|
||||
|
||||
case RESTRICT_BACKGROUND_STATUS_WHITELISTED:
|
||||
return 1;
|
||||
|
||||
case RESTRICT_BACKGROUND_STATUS_DISABLED:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*public void setSelfSignedSSL(Context mContext, @Nullable String instanceName){
|
||||
try {
|
||||
CertificateFactory cf = CertificateFactory.getInstance("X.509");
|
||||
// cert file stored in \app\src\main\assets
|
||||
Log.d("ION", "certificate: before");
|
||||
AssetManager am = mContext.getAssets();
|
||||
InputStream caInput = new BufferedInputStream(am.open("certificate.cer"));
|
||||
Log.d("ION", "certificate: after");
|
||||
|
||||
Certificate ca = cf.generateCertificate(caInput);
|
||||
caInput.close();
|
||||
|
||||
KeyStore keyStore = KeyStore.getInstance("BKS");
|
||||
keyStore.load(null, null);
|
||||
keyStore.setCertificateEntry("ca", ca);
|
||||
|
||||
String tmfAlgorithm = TrustManagerFactory.getDefaultAlgorithm();
|
||||
TrustManagerFactory tmf = TrustManagerFactory.getInstance(tmfAlgorithm);
|
||||
tmf.init(keyStore);
|
||||
|
||||
TrustManager[] wrappedTrustManagers = getWrappedTrustManagers(tmf.getTrustManagers());
|
||||
|
||||
SSLContext sslContext = SSLContext.getInstance("TLS");
|
||||
sslContext.init(null, wrappedTrustManagers, null);
|
||||
|
||||
AsyncSSLSocketMiddleware sslMiddleWare;
|
||||
if(TextUtils.isEmpty(instanceName)){
|
||||
sslMiddleWare = Ion.getDefault(mContext).getHttpClient().getSSLSocketMiddleware();
|
||||
}else {
|
||||
sslMiddleWare = Ion
|
||||
.getInstance(mContext, instanceName)
|
||||
.getHttpClient().getSSLSocketMiddleware();
|
||||
}
|
||||
sslMiddleWare.setTrustManagers(wrappedTrustManagers);
|
||||
sslMiddleWare.setHostnameVerifier(getHostnameVerifier());
|
||||
sslMiddleWare.setSSLContext(sslContext);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private HostnameVerifier getHostnameVerifier() {
|
||||
return new HostnameVerifier() {
|
||||
@Override
|
||||
public boolean verify(String hostname, SSLSession session) {
|
||||
return true;
|
||||
// or the following:
|
||||
// HostnameVerifier hv = HttpsURLConnection.getDefaultHostnameVerifier();
|
||||
// return hv.verify("www.yourserver.com", session);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public TrustManager[] getWrappedTrustManagers(TrustManager[] trustManagers) {
|
||||
final X509TrustManager originalTrustManager = (X509TrustManager) trustManagers[0];
|
||||
return new TrustManager[]{
|
||||
new X509TrustManager() {
|
||||
public X509Certificate[] getAcceptedIssuers() {
|
||||
return originalTrustManager.getAcceptedIssuers();
|
||||
}
|
||||
|
||||
public void checkClientTrusted(X509Certificate[] certs, String authType) {
|
||||
try {
|
||||
if (certs != null && certs.length > 0){
|
||||
certs[0].checkValidity();
|
||||
} else {
|
||||
originalTrustManager.checkClientTrusted(certs, authType);
|
||||
}
|
||||
} catch (CertificateException e) {
|
||||
Log.w("checkClientTrusted", e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
public void checkServerTrusted(X509Certificate[] certs, String authType) {
|
||||
try {
|
||||
if (certs != null && certs.length > 0){
|
||||
certs[0].checkValidity();
|
||||
} else {
|
||||
originalTrustManager.checkServerTrusted(certs, authType);
|
||||
}
|
||||
} catch (CertificateException e) {
|
||||
Log.w("checkServerTrusted", e.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}*/
|
||||
}
|
@ -1,421 +0,0 @@
|
||||
package pl.szczodrzynski.edziennik.network;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.InetAddress;
|
||||
import java.net.Socket;
|
||||
import java.net.SocketAddress;
|
||||
import java.net.SocketException;
|
||||
import java.net.UnknownHostException;
|
||||
import java.nio.channels.SocketChannel;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import javax.net.ssl.HandshakeCompletedListener;
|
||||
import javax.net.ssl.SSLSession;
|
||||
import javax.net.ssl.SSLSocket;
|
||||
import javax.net.ssl.SSLSocketFactory;
|
||||
|
||||
/**
|
||||
* Enables TLS v1.2 when creating SSLSockets.
|
||||
* <p/>
|
||||
* For some reason, android supports TLS v1.2 from API 16, but enables it by
|
||||
* default only from API 20.
|
||||
* @link https://developer.android.com/reference/javax/net/ssl/SSLSocket.html
|
||||
* @see SSLSocketFactory
|
||||
*/
|
||||
public class TLSSocketFactory extends SSLSocketFactory {
|
||||
private static final String[] TLS_V12 = {"TLSv1.2"};
|
||||
private static final String[] TLS_V11_V12 = {"TLSv1.1", "TLSv1.2"};
|
||||
private static final String[] TLS_V10_V11_V12 = {"TLSv1", "TLSv1.1", "TLSv1.2"};
|
||||
|
||||
private final SSLSocketFactory delegate;
|
||||
|
||||
public TLSSocketFactory(SSLSocketFactory base) {
|
||||
this.delegate = base;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getDefaultCipherSuites() {
|
||||
return delegate.getDefaultCipherSuites();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getSupportedCipherSuites() {
|
||||
return delegate.getSupportedCipherSuites();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Socket createSocket(Socket s, String host, int port, boolean autoClose) throws IOException {
|
||||
return patch(delegate.createSocket(s, host, port, autoClose));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Socket createSocket(String host, int port) throws IOException, UnknownHostException {
|
||||
return patch(delegate.createSocket(host, port));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException, UnknownHostException {
|
||||
return patch(delegate.createSocket(host, port, localHost, localPort));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Socket createSocket(InetAddress host, int port) throws IOException {
|
||||
return patch(delegate.createSocket(host, port));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException {
|
||||
return patch(delegate.createSocket(address, port, localAddress, localPort));
|
||||
}
|
||||
|
||||
private Socket patch(Socket socket) {
|
||||
if (socket instanceof SSLSocket) {
|
||||
((SSLSocket) socket).setEnabledProtocols(TLS_V10_V11_V12);
|
||||
//socket = new NoSSLv3SSLSocket((SSLSocket) socket);
|
||||
}
|
||||
return socket;
|
||||
}
|
||||
|
||||
|
||||
public class DelegateSSLSocket extends SSLSocket {
|
||||
|
||||
protected final SSLSocket delegate;
|
||||
|
||||
DelegateSSLSocket(SSLSocket delegate) {
|
||||
this.delegate = delegate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getSupportedCipherSuites() {
|
||||
return delegate.getSupportedCipherSuites();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getEnabledCipherSuites() {
|
||||
return delegate.getEnabledCipherSuites();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEnabledCipherSuites(String[] suites) {
|
||||
delegate.setEnabledCipherSuites(suites);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getSupportedProtocols() {
|
||||
return delegate.getSupportedProtocols();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getEnabledProtocols() {
|
||||
return delegate.getEnabledProtocols();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEnabledProtocols(String[] protocols) {
|
||||
delegate.setEnabledProtocols(protocols);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SSLSession getSession() {
|
||||
return delegate.getSession();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addHandshakeCompletedListener(HandshakeCompletedListener listener) {
|
||||
delegate.addHandshakeCompletedListener(listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeHandshakeCompletedListener(HandshakeCompletedListener listener) {
|
||||
delegate.removeHandshakeCompletedListener(listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startHandshake() throws IOException {
|
||||
delegate.startHandshake();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setUseClientMode(boolean mode) {
|
||||
delegate.setUseClientMode(mode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getUseClientMode() {
|
||||
return delegate.getUseClientMode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNeedClientAuth(boolean need) {
|
||||
delegate.setNeedClientAuth(need);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWantClientAuth(boolean want) {
|
||||
delegate.setWantClientAuth(want);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getNeedClientAuth() {
|
||||
return delegate.getNeedClientAuth();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getWantClientAuth() {
|
||||
return delegate.getWantClientAuth();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEnableSessionCreation(boolean flag) {
|
||||
delegate.setEnableSessionCreation(flag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getEnableSessionCreation() {
|
||||
return delegate.getEnableSessionCreation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bind(SocketAddress localAddr) throws IOException {
|
||||
delegate.bind(localAddr);
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void close() throws IOException {
|
||||
delegate.close();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void connect(SocketAddress remoteAddr) throws IOException {
|
||||
delegate.connect(remoteAddr);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void connect(SocketAddress remoteAddr, int timeout) throws IOException {
|
||||
delegate.connect(remoteAddr, timeout);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SocketChannel getChannel() {
|
||||
return delegate.getChannel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public InetAddress getInetAddress() {
|
||||
return delegate.getInetAddress();
|
||||
}
|
||||
|
||||
@Override
|
||||
public InputStream getInputStream() throws IOException {
|
||||
return delegate.getInputStream();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getKeepAlive() throws SocketException {
|
||||
return delegate.getKeepAlive();
|
||||
}
|
||||
|
||||
@Override
|
||||
public InetAddress getLocalAddress() {
|
||||
return delegate.getLocalAddress();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLocalPort() {
|
||||
return delegate.getLocalPort();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SocketAddress getLocalSocketAddress() {
|
||||
return delegate.getLocalSocketAddress();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getOOBInline() throws SocketException {
|
||||
return delegate.getOOBInline();
|
||||
}
|
||||
|
||||
@Override
|
||||
public OutputStream getOutputStream() throws IOException {
|
||||
return delegate.getOutputStream();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPort() {
|
||||
return delegate.getPort();
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized int getReceiveBufferSize() throws SocketException {
|
||||
return delegate.getReceiveBufferSize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SocketAddress getRemoteSocketAddress() {
|
||||
return delegate.getRemoteSocketAddress();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getReuseAddress() throws SocketException {
|
||||
return delegate.getReuseAddress();
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized int getSendBufferSize() throws SocketException {
|
||||
return delegate.getSendBufferSize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSoLinger() throws SocketException {
|
||||
return delegate.getSoLinger();
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized int getSoTimeout() throws SocketException {
|
||||
return delegate.getSoTimeout();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getTcpNoDelay() throws SocketException {
|
||||
return delegate.getTcpNoDelay();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTrafficClass() throws SocketException {
|
||||
return delegate.getTrafficClass();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBound() {
|
||||
return delegate.isBound();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isClosed() {
|
||||
return delegate.isClosed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isConnected() {
|
||||
return delegate.isConnected();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInputShutdown() {
|
||||
return delegate.isInputShutdown();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOutputShutdown() {
|
||||
return delegate.isOutputShutdown();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendUrgentData(int value) throws IOException {
|
||||
delegate.sendUrgentData(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setKeepAlive(boolean keepAlive) throws SocketException {
|
||||
delegate.setKeepAlive(keepAlive);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOOBInline(boolean oobinline) throws SocketException {
|
||||
delegate.setOOBInline(oobinline);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPerformancePreferences(int connectionTime, int latency, int bandwidth) {
|
||||
delegate.setPerformancePreferences(connectionTime, latency, bandwidth);
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void setReceiveBufferSize(int size) throws SocketException {
|
||||
delegate.setReceiveBufferSize(size);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setReuseAddress(boolean reuse) throws SocketException {
|
||||
delegate.setReuseAddress(reuse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void setSendBufferSize(int size) throws SocketException {
|
||||
delegate.setSendBufferSize(size);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSoLinger(boolean on, int timeout) throws SocketException {
|
||||
delegate.setSoLinger(on, timeout);
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void setSoTimeout(int timeout) throws SocketException {
|
||||
delegate.setSoTimeout(timeout);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTcpNoDelay(boolean on) throws SocketException {
|
||||
delegate.setTcpNoDelay(on);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTrafficClass(int value) throws SocketException {
|
||||
delegate.setTrafficClass(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shutdownInput() throws IOException {
|
||||
delegate.shutdownInput();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shutdownOutput() throws IOException {
|
||||
delegate.shutdownOutput();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return delegate.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return delegate.equals(o);
|
||||
}
|
||||
}
|
||||
|
||||
private class NoSSLv3SSLSocket extends DelegateSSLSocket {
|
||||
|
||||
private NoSSLv3SSLSocket(SSLSocket delegate) {
|
||||
super(delegate);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEnabledProtocols(String[] protocols) {
|
||||
if (protocols != null && protocols.length == 1 && "SSLv3".equals(protocols[0])) {
|
||||
|
||||
List<String> enabledProtocols = new ArrayList<>(Arrays.asList(delegate.getEnabledProtocols()));
|
||||
if (enabledProtocols.size() > 1) {
|
||||
if (enabledProtocols.remove("SSLv3")) {
|
||||
System.out.println("Removed SSLv3 from enabled protocols");
|
||||
}
|
||||
else {
|
||||
System.out.println("SSLv3 was not an enabled protocol");
|
||||
}
|
||||
} else {
|
||||
System.out.println("SSL stuck with protocol available for " + String.valueOf(enabledProtocols));
|
||||
}
|
||||
protocols = enabledProtocols.toArray(new String[enabledProtocols.size()]);
|
||||
}
|
||||
|
||||
super.setEnabledProtocols(protocols);
|
||||
}
|
||||
}
|
||||
}
|
@ -120,7 +120,7 @@ public class AnnouncementsFragment extends Fragment {
|
||||
return;
|
||||
}*/
|
||||
AnnouncementsAdapter announcementsAdapter = new AnnouncementsAdapter(activity, announcements, (v, announcement) -> {
|
||||
if (announcement.getText() == null || (app.getProfile().getLoginStoreType() == LOGIN_TYPE_LIBRUS && !announcement.getSeen() && app.getNetworkUtils().isOnline())) {
|
||||
if (announcement.getText() == null || (app.getProfile().getLoginStoreType() == LOGIN_TYPE_LIBRUS && !announcement.getSeen())) {
|
||||
EdziennikTask.Companion.announcementGet(App.Companion.getProfileId(), announcement).enqueue(requireContext());
|
||||
} else {
|
||||
showAnnouncementDetailsDialog(announcement);
|
||||
|
@ -1,361 +0,0 @@
|
||||
package pl.szczodrzynski.edziennik.ui.modules.attendance;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.util.LongSparseArray;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.animation.AccelerateDecelerateInterpolator;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.animation.Transformation;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.PopupMenu;
|
||||
import androidx.core.graphics.ColorUtils;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import antonkozyriatskyi.circularprogressindicator.CircularProgressIndicator;
|
||||
import pl.szczodrzynski.edziennik.App;
|
||||
import pl.szczodrzynski.edziennik.MainActivity;
|
||||
import pl.szczodrzynski.edziennik.R;
|
||||
import pl.szczodrzynski.edziennik.data.db.entity.Subject;
|
||||
import pl.szczodrzynski.edziennik.data.db.full.AttendanceFull;
|
||||
import pl.szczodrzynski.edziennik.databinding.FragmentAttendanceBinding;
|
||||
import pl.szczodrzynski.edziennik.utils.SimpleDividerItemDecoration;
|
||||
import pl.szczodrzynski.edziennik.utils.Themes;
|
||||
import pl.szczodrzynski.navlib.bottomsheet.items.BottomSheetPrimaryItem;
|
||||
|
||||
import static androidx.recyclerview.widget.RecyclerView.SCROLL_STATE_IDLE;
|
||||
import static pl.szczodrzynski.edziennik.data.db.entity.Attendance.TYPE_ABSENT;
|
||||
import static pl.szczodrzynski.edziennik.data.db.entity.Attendance.TYPE_ABSENT_EXCUSED;
|
||||
import static pl.szczodrzynski.edziennik.data.db.entity.Attendance.TYPE_BELATED;
|
||||
import static pl.szczodrzynski.edziennik.data.db.entity.Attendance.TYPE_BELATED_EXCUSED;
|
||||
import static pl.szczodrzynski.edziennik.data.db.entity.Attendance.TYPE_PRESENT;
|
||||
import static pl.szczodrzynski.edziennik.data.db.entity.Attendance.TYPE_RELEASED;
|
||||
import static pl.szczodrzynski.edziennik.data.db.entity.LoginStore.LOGIN_TYPE_VULCAN;
|
||||
import static pl.szczodrzynski.edziennik.data.db.entity.Metadata.TYPE_ATTENDANCE;
|
||||
|
||||
public class AttendanceFragment_ extends Fragment {
|
||||
|
||||
private App app = null;
|
||||
private MainActivity activity = null;
|
||||
private FragmentAttendanceBinding b = null;
|
||||
|
||||
private int displayMode = MODE_YEAR;
|
||||
private static final int MODE_YEAR = 0;
|
||||
private static final int MODE_SEMESTER_1 = 1;
|
||||
private static final int MODE_SEMESTER_2 = 2;
|
||||
private long subjectIdFilter = -1;
|
||||
private LongSparseArray<int[]> subjectTotalCount;
|
||||
private LongSparseArray<int[]> subjectAbsentCount;
|
||||
private LongSparseArray<Float> subjectAttendancePercentage;
|
||||
|
||||
private List<AttendanceFull> attendanceList = null;
|
||||
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
activity = (MainActivity) getActivity();
|
||||
if (getActivity() == null || getContext() == null)
|
||||
return null;
|
||||
app = (App) activity.getApplication();
|
||||
getContext().getTheme().applyStyle(Themes.INSTANCE.getAppTheme(), true);
|
||||
// activity, context and profile is valid
|
||||
b = DataBindingUtil.inflate(inflater, R.layout.fragment_attendance, container, false);
|
||||
b.refreshLayout.setParent(activity.getSwipeRefreshLayout());
|
||||
return b.getRoot();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
if (app == null || activity == null || b == null || !isAdded())
|
||||
return;
|
||||
|
||||
activity.getBottomSheet().prependItems(
|
||||
new BottomSheetPrimaryItem(true)
|
||||
.withTitle(R.string.menu_mark_as_read)
|
||||
.withIcon(CommunityMaterial.Icon.cmd_eye_check_outline)
|
||||
.withOnClickListener(v3 -> {
|
||||
activity.getBottomSheet().close();
|
||||
AsyncTask.execute(() -> App.db.metadataDao().setAllSeen(App.Companion.getProfileId(), TYPE_ATTENDANCE, true));
|
||||
Toast.makeText(activity, R.string.main_menu_mark_as_read_success, Toast.LENGTH_SHORT).show();
|
||||
})
|
||||
);
|
||||
|
||||
/*b.refreshLayout.setOnRefreshListener(() -> {
|
||||
activity.syncCurrentFeature(MainActivity.DRAWER_ITEM_ATTENDANCE, b.refreshLayout);
|
||||
});*/
|
||||
|
||||
b.attendancePercentage.setProgressTextAdapter(PERCENTAGE_ADAPTER);
|
||||
b.attendancePercentage.setMaxProgress(100.0f);
|
||||
|
||||
b.attendanceSummaryTitle.setOnClickListener((v -> {
|
||||
PopupMenu popupMenu = new PopupMenu(activity, b.attendanceSummaryTitle, Gravity.END);
|
||||
popupMenu.getMenu().add(0, 0, 0, R.string.summary_mode_year);
|
||||
popupMenu.getMenu().add(0, 1, 1, R.string.summary_mode_semester_1);
|
||||
popupMenu.getMenu().add(0, 2, 2, R.string.summary_mode_semester_2);
|
||||
popupMenu.setOnMenuItemClickListener((item -> {
|
||||
displayMode = item.getItemId();
|
||||
updateList();
|
||||
return true;
|
||||
}));
|
||||
popupMenu.show();
|
||||
}));
|
||||
|
||||
/*if (app.profile.getLoginStoreType() == LOGIN_TYPE_MOBIDZIENNIK) {
|
||||
long attendanceLastSync = app.profile.getStudentData("attendanceLastSync", (long)0);
|
||||
if (attendanceLastSync == 0) {
|
||||
attendanceLastSync = app.profile.getSemesterStart(1).getInMillis();
|
||||
}
|
||||
Date lastSyncDate = Date.fromMillis(attendanceLastSync);
|
||||
if (lastSyncDate.getValue() < Week.getWeekStart().getValue()) {
|
||||
CafeBar.builder(activity)
|
||||
.to(activity.getNavView().getCoordinator())
|
||||
.content(R.string.sync_old_data_info)
|
||||
.icon(new IconicsDrawable(activity).icon(CommunityMaterial.Icon.cmd_download_outline).size(IconicsSize.dp(20)).color(IconicsColor.colorInt(Themes.INSTANCE.getPrimaryTextColor(activity))))
|
||||
.positiveText(R.string.refresh)
|
||||
.positiveColor(0xff4caf50)
|
||||
.negativeText(R.string.ok)
|
||||
.negativeColor(0x66ffffff)
|
||||
.onPositive((cafeBar -> {
|
||||
if (!activity.getSwipeRefreshLayout().isRefreshing()) {
|
||||
cafeBar.dismiss();
|
||||
activity.syncCurrentFeature();
|
||||
}
|
||||
else {
|
||||
Toast.makeText(app, R.string.please_wait, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}))
|
||||
.onNegative(CafeBar::dismiss)
|
||||
.autoDismiss(false)
|
||||
.swipeToDismiss(true)
|
||||
.floating(true)
|
||||
.show();
|
||||
}
|
||||
}*/
|
||||
|
||||
b.attendanceSummarySubject.setOnClickListener((v -> {
|
||||
AsyncTask.execute(() -> {
|
||||
List<Subject> subjectList = App.db.subjectDao().getAllNow(App.Companion.getProfileId());
|
||||
PopupMenu popupMenu = new PopupMenu(activity, b.attendanceSummarySubject, Gravity.END);
|
||||
popupMenu.getMenu().add(0, -1, 0, R.string.subject_filter_disabled);
|
||||
int index = 0;
|
||||
DecimalFormat format = new DecimalFormat("0.00");
|
||||
for (Subject subject: subjectList) {
|
||||
int total = subjectTotalCount.get(subject.id, new int[3])[displayMode];
|
||||
int absent = subjectAbsentCount.get(subject.id, new int[3])[displayMode];
|
||||
if (total == 0)
|
||||
continue;
|
||||
int present = total - absent;
|
||||
float percentage = (float)present / (float)total * 100.0f;
|
||||
String percentageStr = format.format(percentage);
|
||||
popupMenu.getMenu().add(0, (int)subject.id, index++, getString(R.string.subject_filter_format, subject.longName, percentageStr));
|
||||
}
|
||||
popupMenu.setOnMenuItemClickListener((item -> {
|
||||
subjectIdFilter = item.getItemId();
|
||||
b.attendanceSummarySubject.setText(item.getTitle().toString().replaceAll("\\s-\\s[0-9]{1,2}\\.[0-9]{1,2}%", ""));
|
||||
updateList();
|
||||
return true;
|
||||
}));
|
||||
new Handler(activity.getMainLooper()).post(popupMenu::show);
|
||||
});
|
||||
|
||||
}));
|
||||
|
||||
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext());
|
||||
|
||||
b.attendanceView.setHasFixedSize(true);
|
||||
b.attendanceView.setLayoutManager(linearLayoutManager);
|
||||
b.attendanceView.addItemDecoration(new SimpleDividerItemDecoration(getContext()));
|
||||
|
||||
b.attendanceView.addOnScrollListener(new RecyclerView.OnScrollListener() {
|
||||
@Override
|
||||
public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {
|
||||
if (recyclerView.canScrollVertically(-1)) {
|
||||
b.refreshLayout.setEnabled(false);
|
||||
}
|
||||
if (!recyclerView.canScrollVertically(-1) && newState == SCROLL_STATE_IDLE) {
|
||||
b.refreshLayout.setEnabled(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
App.db.attendanceDao().getAll(App.Companion.getProfileId()).observe(this, attendance -> {
|
||||
if (app == null || activity == null || b == null || !isAdded())
|
||||
return;
|
||||
|
||||
if (attendance == null) {
|
||||
b.attendanceView.setVisibility(View.GONE);
|
||||
b.attendanceNoData.setVisibility(View.VISIBLE);
|
||||
return;
|
||||
}
|
||||
|
||||
attendanceList = attendance;
|
||||
|
||||
countSubjectStats();
|
||||
|
||||
updateList();
|
||||
});
|
||||
}
|
||||
|
||||
private void countSubjectStats() {
|
||||
subjectTotalCount = new LongSparseArray<>();
|
||||
subjectAbsentCount = new LongSparseArray<>();
|
||||
for (AttendanceFull attendance: attendanceList) {
|
||||
if (app.getProfile().getLoginStoreType() == LOGIN_TYPE_VULCAN && attendance.getBaseType() == TYPE_RELEASED)
|
||||
continue;
|
||||
int[] subjectTotal = subjectTotalCount.get(attendance.getSubjectId(), new int[3]);
|
||||
int[] subjectAbsent = subjectAbsentCount.get(attendance.getSubjectId(), new int[3]);
|
||||
|
||||
subjectTotal[0]++;
|
||||
subjectTotal[attendance.getSemester()]++;
|
||||
|
||||
if (attendance.getBaseType() == TYPE_ABSENT || attendance.getBaseType() == TYPE_ABSENT_EXCUSED) {
|
||||
subjectAbsent[0]++;
|
||||
subjectAbsent[attendance.getSemester()]++;
|
||||
}
|
||||
|
||||
subjectTotalCount.put(attendance.getSubjectId(), subjectTotal);
|
||||
subjectAbsentCount.put(attendance.getSubjectId(), subjectAbsent);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateList() {
|
||||
if (app == null || activity == null || b == null || !isAdded())
|
||||
return;
|
||||
|
||||
int presentCount = 0;
|
||||
int absentCount = 0;
|
||||
int absentUnexcusedCount = 0;
|
||||
int belatedCount = 0;
|
||||
int releasedCount = 0;
|
||||
|
||||
List<AttendanceFull> filteredList = new ArrayList<>();
|
||||
for (AttendanceFull attendance: attendanceList) {
|
||||
if (displayMode != MODE_YEAR && attendance.getSemester() != displayMode)
|
||||
continue;
|
||||
if (subjectIdFilter != -1 && attendance.getSubjectId() != subjectIdFilter)
|
||||
continue;
|
||||
if (attendance.getBaseType() != TYPE_PRESENT)
|
||||
filteredList.add(attendance);
|
||||
switch (attendance.getBaseType()) {
|
||||
case TYPE_PRESENT:
|
||||
presentCount++;
|
||||
break;
|
||||
case TYPE_ABSENT:
|
||||
absentCount++;
|
||||
absentUnexcusedCount++;
|
||||
break;
|
||||
case TYPE_ABSENT_EXCUSED:
|
||||
absentCount++;
|
||||
break;
|
||||
case TYPE_BELATED_EXCUSED:
|
||||
case TYPE_BELATED:
|
||||
belatedCount++;
|
||||
break;
|
||||
case TYPE_RELEASED:
|
||||
releasedCount++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (filteredList.size() > 0) {
|
||||
AttendanceAdapter adapter;
|
||||
b.attendanceView.setVisibility(View.VISIBLE);
|
||||
b.attendanceNoData.setVisibility(View.GONE);
|
||||
if ((adapter = (AttendanceAdapter) b.attendanceView.getAdapter()) != null) {
|
||||
//adapter.setItems(filteredList);
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
else {
|
||||
//adapter = new AttendanceAdapter(activity, true, null);
|
||||
//adapter.setItems(filteredList);
|
||||
b.attendanceView.setAdapter(adapter);
|
||||
}
|
||||
}
|
||||
else {
|
||||
b.attendanceView.setVisibility(View.GONE);
|
||||
b.attendanceNoData.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
// SUMMARY
|
||||
if (displayMode == MODE_YEAR) {
|
||||
b.attendanceSummaryTitle.setText(getString(R.string.attendance_summary_title_year));
|
||||
}
|
||||
else {
|
||||
b.attendanceSummaryTitle.setText(getString(R.string.attendance_summary_title_semester_format, displayMode));
|
||||
}
|
||||
b.presentCountContainer.setVisibility(presentCount == 0 ? View.GONE : View.VISIBLE);
|
||||
b.presentCount.setText(String.format(Locale.getDefault(), "%d", presentCount));
|
||||
b.absentCount.setText(String.format(Locale.getDefault(), "%d", absentCount));
|
||||
b.absentUnexcusedCount.setText(String.format(Locale.getDefault(), "%d", absentUnexcusedCount));
|
||||
b.belatedCount.setText(String.format(Locale.getDefault(), "%d", belatedCount));
|
||||
b.releasedCount.setText(String.format(Locale.getDefault(), "%d", releasedCount));
|
||||
if (absentUnexcusedCount >= 5) {
|
||||
b.absentUnexcusedCount.setTextColor(Color.RED);
|
||||
}
|
||||
else {
|
||||
b.absentUnexcusedCount.setTextColor(Themes.INSTANCE.getPrimaryTextColor(activity));
|
||||
}
|
||||
|
||||
float attendancePercentage;
|
||||
|
||||
// in Mobidziennik there are no TYPE_PRESENT records so we cannot calculate the percentage
|
||||
if (app.getProfile().getLoginStoreType() == LOGIN_TYPE_VULCAN) {
|
||||
float allCount = presentCount + absentCount + belatedCount; // do not count releases
|
||||
float present = allCount - absentCount;
|
||||
attendancePercentage = present / allCount * 100.0f;
|
||||
}
|
||||
else {
|
||||
float allCount = presentCount + absentCount + belatedCount + releasedCount;
|
||||
float present = allCount - absentCount;
|
||||
attendancePercentage = present / allCount * 100.0f;
|
||||
}
|
||||
// if it's still 0%, hide the indicator
|
||||
if (attendancePercentage <= 0.0f) {
|
||||
b.attendancePercentage.setVisibility(View.GONE);
|
||||
return;
|
||||
}
|
||||
animatePercentageIndicator(attendancePercentage);
|
||||
}
|
||||
|
||||
private void animatePercentageIndicator(float percentage) {
|
||||
Animation a = new Animation() {
|
||||
protected void applyTransformation(float interpolatedTime, Transformation t) {
|
||||
float progress = percentage *interpolatedTime;
|
||||
if (interpolatedTime == 1.0f) {
|
||||
progress = percentage;
|
||||
}
|
||||
int color = ColorUtils.blendARGB(Color.RED, Color.GREEN, progress/100.0f);
|
||||
b.attendancePercentage.setTextColor(color);
|
||||
b.attendancePercentage.setProgressColor(color);
|
||||
b.attendancePercentage.setCurrentProgress(progress);
|
||||
}
|
||||
public boolean willChangeBounds() {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
a.setDuration(1300);
|
||||
a.setInterpolator(new AccelerateDecelerateInterpolator());
|
||||
b.attendancePercentage.postDelayed(() -> b.attendancePercentage.startAnimation(a), 500);
|
||||
}
|
||||
|
||||
private static final CircularProgressIndicator.ProgressTextAdapter PERCENTAGE_ADAPTER = value -> {
|
||||
DecimalFormat df = new DecimalFormat("0.##");
|
||||
return df.format(value)+"%";
|
||||
};
|
||||
}
|
@ -69,34 +69,20 @@ class CrashActivity : AppCompatActivity(), CoroutineScope {
|
||||
val restartButton = findViewById<Button>(R.id.crash_restart_btn)
|
||||
restartButton.setOnClickListener { CustomActivityOnCrash.restartApplication(this@CrashActivity, config) }
|
||||
|
||||
val devMessageButton = findViewById<Button>(R.id.crash_dev_message_btn)
|
||||
devMessageButton.setOnClickListener {
|
||||
val i = Intent(this@CrashActivity, CrashGtfoActivity::class.java)
|
||||
startActivity(i)
|
||||
}
|
||||
|
||||
val reportButton = findViewById<Button>(R.id.crash_report_btn)
|
||||
reportButton.setOnClickListener {
|
||||
if (!app.networkUtils.isOnline) {
|
||||
MaterialDialog.Builder(this@CrashActivity)
|
||||
.title(R.string.network_you_are_offline_title)
|
||||
.content(R.string.network_you_are_offline_text)
|
||||
.positiveText(R.string.ok)
|
||||
.show()
|
||||
} else {
|
||||
launch {
|
||||
api.runCatching({
|
||||
withContext(Dispatchers.Default) {
|
||||
errorReport(listOf(getReportableError(intent)))
|
||||
}
|
||||
}, {
|
||||
Toast.makeText(app, getString(R.string.crash_report_cannot_send) + it, Toast.LENGTH_LONG).show()
|
||||
}) ?: return@launch
|
||||
launch {
|
||||
api.runCatching({
|
||||
withContext(Dispatchers.Default) {
|
||||
errorReport(listOf(getReportableError(intent)))
|
||||
}
|
||||
}, {
|
||||
Toast.makeText(app, getString(R.string.crash_report_cannot_send) + it, Toast.LENGTH_LONG).show()
|
||||
}) ?: return@launch
|
||||
|
||||
Toast.makeText(app, getString(R.string.crash_report_sent), Toast.LENGTH_SHORT).show()
|
||||
reportButton.isEnabled = false
|
||||
reportButton.setTextColor(resources.getColor(android.R.color.darker_gray))
|
||||
}
|
||||
Toast.makeText(app, getString(R.string.crash_report_sent), Toast.LENGTH_SHORT).show()
|
||||
reportButton.isEnabled = false
|
||||
reportButton.setTextColor(resources.getColor(android.R.color.darker_gray))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,20 +0,0 @@
|
||||
package pl.szczodrzynski.edziennik.ui.modules.base;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import pl.szczodrzynski.edziennik.R;
|
||||
|
||||
public class CrashGtfoActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setTheme((getApplication()
|
||||
.getSharedPreferences(getString(R.string.preference_file_global), Context.MODE_PRIVATE)
|
||||
.getBoolean("dark_theme", false) ? R.style.AppTheme_Dark : R.style.AppTheme));
|
||||
setContentView(R.layout.activity_gtfo);
|
||||
}
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
package pl.szczodrzynski.edziennik.ui.modules.base
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.Fragment
|
||||
import pl.szczodrzynski.edziennik.databinding.FragmentLoadingBinding
|
||||
import pl.szczodrzynski.edziennik.utils.Themes
|
||||
|
||||
class LoadingFragment : Fragment() {
|
||||
|
||||
private lateinit var b: FragmentLoadingBinding
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||
if (context == null)
|
||||
return null
|
||||
context!!.theme.applyStyle(Themes.appTheme, true)
|
||||
// activity, context and profile is valid
|
||||
b = FragmentLoadingBinding.inflate(inflater)
|
||||
return b.root
|
||||
}
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
package pl.szczodrzynski.edziennik.ui.modules.feedback
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.Fragment
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import pl.szczodrzynski.edziennik.App
|
||||
import pl.szczodrzynski.edziennik.R
|
||||
import pl.szczodrzynski.edziennik.MainActivity
|
||||
import pl.szczodrzynski.edziennik.databinding.FragmentHelpBinding
|
||||
import pl.szczodrzynski.edziennik.utils.Themes
|
||||
|
||||
class HelpFragment : Fragment() {
|
||||
|
||||
private lateinit var app: App
|
||||
private lateinit var activity: MainActivity
|
||||
private lateinit var b: FragmentHelpBinding
|
||||
/*
|
||||
private val navController: NavController by lazy { Navigation.findNavController(b.root) }
|
||||
*/
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||
activity = (getActivity() as MainActivity?) ?: return null
|
||||
if (context == null)
|
||||
return null
|
||||
app = activity.application as App
|
||||
context!!.theme.applyStyle(Themes.appTheme, true)
|
||||
if (app.profile == null)
|
||||
return inflater.inflate(R.layout.fragment_loading, container, false)
|
||||
// activity, context and profile is valid
|
||||
b = FragmentHelpBinding.inflate(inflater)
|
||||
return b.root
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
// TODO check if app, activity, b can be null
|
||||
if (app.profile == null || !isAdded)
|
||||
return
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -1,120 +0,0 @@
|
||||
package pl.szczodrzynski.edziennik.ui.modules.homework;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.PorterDuffColorFilter;
|
||||
import android.os.AsyncTask;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import pl.szczodrzynski.edziennik.App;
|
||||
import pl.szczodrzynski.edziennik.MainActivity;
|
||||
import pl.szczodrzynski.edziennik.R;
|
||||
import pl.szczodrzynski.edziennik.data.db.full.EventFull;
|
||||
import pl.szczodrzynski.edziennik.ui.dialogs.event.EventManualDialog;
|
||||
import pl.szczodrzynski.edziennik.utils.models.Date;
|
||||
|
||||
import static pl.szczodrzynski.edziennik.utils.Utils.bs;
|
||||
|
||||
public class HomeworkAdapter extends RecyclerView.Adapter<HomeworkAdapter.ViewHolder> {
|
||||
private Context context;
|
||||
private List<EventFull> homeworkList;
|
||||
|
||||
//getting the context and product list with constructor
|
||||
public HomeworkAdapter(Context mCtx, List<EventFull> homeworkList) {
|
||||
this.context = mCtx;
|
||||
this.homeworkList = homeworkList;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
//inflating and returning our view holder
|
||||
LayoutInflater inflater = LayoutInflater.from(context);
|
||||
View view = inflater.inflate(R.layout.row_homework_item, parent, false);
|
||||
return new ViewHolder(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||
App app = (App) context.getApplicationContext();
|
||||
|
||||
EventFull homework = homeworkList.get(position);
|
||||
|
||||
int diffDays = Date.diffDays(homework.getDate(), Date.getToday());
|
||||
|
||||
holder.homeworkItemHomeworkDate.setText(app.getString(R.string.date_relative_format, homework.getDate().getFormattedString(), Date.dayDiffString(context, diffDays)));
|
||||
holder.homeworkItemTopic.setText(homework.getTopic());
|
||||
holder.homeworkItemSubjectTeacher.setText(context.getString(R.string.homework_subject_teacher_format, bs(homework.getSubjectLongName()), bs(homework.getTeacherName())));
|
||||
holder.homeworkItemTeamDate.setText(context.getString(R.string.homework_team_date_format, bs(homework.getTeamName()), Date.fromMillis(homework.getAddedDate()).getFormattedStringShort()));
|
||||
|
||||
if (!homework.getSeen()) {
|
||||
holder.homeworkItemTopic.setBackground(context.getResources().getDrawable(R.drawable.bg_rounded_8dp));
|
||||
holder.homeworkItemTopic.getBackground().setColorFilter(new PorterDuffColorFilter(0x692196f3, PorterDuff.Mode.MULTIPLY));
|
||||
homework.setSeen(true);
|
||||
AsyncTask.execute(() -> {
|
||||
App.db.metadataDao().setSeen(App.Companion.getProfileId(), homework, true);
|
||||
});
|
||||
}
|
||||
else {
|
||||
holder.homeworkItemTopic.setBackground(null);
|
||||
}
|
||||
|
||||
holder.homeworkItemEdit.setVisibility((homework.getAddedManually() ? View.VISIBLE : View.GONE));
|
||||
holder.homeworkItemEdit.setOnClickListener(v -> {
|
||||
new EventManualDialog(
|
||||
(MainActivity) context,
|
||||
homework.getProfileId(),
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
homework,
|
||||
null,
|
||||
null);
|
||||
});
|
||||
|
||||
if (homework.getSharedBy() == null) {
|
||||
holder.homeworkItemSharedBy.setVisibility(View.GONE);
|
||||
}
|
||||
else if (homework.getSharedByName() != null) {
|
||||
holder.homeworkItemSharedBy.setText(app.getString(R.string.event_shared_by_format, (homework.getSharedBy().equals("self") ? app.getString(R.string.event_shared_by_self) : homework.getSharedByName())));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return homeworkList.size();
|
||||
}
|
||||
|
||||
class ViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
CardView homeworkItemCard;
|
||||
TextView homeworkItemTopic;
|
||||
TextView homeworkItemHomeworkDate;
|
||||
TextView homeworkItemSharedBy;
|
||||
TextView homeworkItemSubjectTeacher;
|
||||
TextView homeworkItemTeamDate;
|
||||
Button homeworkItemEdit;
|
||||
|
||||
ViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
homeworkItemCard = itemView.findViewById(R.id.homeworkItemCard);
|
||||
homeworkItemTopic = itemView.findViewById(R.id.homeworkItemTopic);
|
||||
homeworkItemHomeworkDate = itemView.findViewById(R.id.homeworkItemHomeworkDate);
|
||||
homeworkItemSharedBy = itemView.findViewById(R.id.homeworkItemSharedBy);
|
||||
homeworkItemSubjectTeacher = itemView.findViewById(R.id.homeworkItemSubjectTeacher);
|
||||
homeworkItemTeamDate = itemView.findViewById(R.id.homeworkItemTeamDate);
|
||||
homeworkItemEdit = itemView.findViewById(R.id.homeworkItemEdit);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,295 +0,0 @@
|
||||
package pl.szczodrzynski.edziennik.ui.modules.messages;
|
||||
|
||||
|
||||
import android.graphics.Rect;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.animation.Interpolator;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.interpolator.view.animation.FastOutSlowInInterpolator;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import pl.szczodrzynski.edziennik.App;
|
||||
import pl.szczodrzynski.edziennik.MainActivity;
|
||||
import pl.szczodrzynski.edziennik.R;
|
||||
import pl.szczodrzynski.edziennik.data.db.entity.Message;
|
||||
import pl.szczodrzynski.edziennik.data.db.full.MessageFull;
|
||||
import pl.szczodrzynski.edziennik.data.db.full.MessageRecipientFull;
|
||||
import pl.szczodrzynski.edziennik.databinding.MessagesListBinding;
|
||||
import pl.szczodrzynski.edziennik.ui.modules.base.lazypager.LazyFragment;
|
||||
import pl.szczodrzynski.edziennik.utils.SimpleDividerItemDecoration;
|
||||
import pl.szczodrzynski.edziennik.utils.Themes;
|
||||
|
||||
import static androidx.recyclerview.widget.RecyclerView.NO_POSITION;
|
||||
import static androidx.recyclerview.widget.RecyclerView.SCROLL_STATE_IDLE;
|
||||
import static pl.szczodrzynski.edziennik.utils.Utils.d;
|
||||
|
||||
public class MessagesListFragmentOld extends LazyFragment {
|
||||
|
||||
private App app = null;
|
||||
private MainActivity activity = null;
|
||||
private MessagesListBinding b = null;
|
||||
|
||||
private Rect viewRect = new Rect();
|
||||
private MessagesAdapter messagesAdapter = null;
|
||||
private ViewGroup viewParent = null;
|
||||
|
||||
static final Interpolator transitionInterpolator = new FastOutSlowInInterpolator();
|
||||
static final long TRANSITION_DURATION = 300L;
|
||||
static final String TAP_POSITION = "tap_position";
|
||||
|
||||
public static int[] tapPositions = {NO_POSITION, NO_POSITION};
|
||||
public static int[] topPositions = {NO_POSITION, NO_POSITION};
|
||||
public static int[] bottomPositions = {NO_POSITION, NO_POSITION};
|
||||
|
||||
private int messageType = Message.TYPE_RECEIVED;
|
||||
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
activity = (MainActivity) getActivity();
|
||||
if (getActivity() == null || getContext() == null)
|
||||
return null;
|
||||
app = (App) activity.getApplication();
|
||||
getContext().getTheme().applyStyle(Themes.INSTANCE.getAppTheme(), true);
|
||||
// activity, context and profile is valid
|
||||
b = DataBindingUtil.inflate(inflater, R.layout.messages_list, container, false);
|
||||
return b.getRoot();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPageCreated() {
|
||||
if (app == null || activity == null || b == null || !isAdded())
|
||||
return false;
|
||||
|
||||
long messageId = -1;
|
||||
if (getArguments() != null) {
|
||||
messageId = getArguments().getLong("messageId", -1);
|
||||
}
|
||||
if (messageId != -1) {
|
||||
Bundle args = new Bundle();
|
||||
args.putLong("messageId", messageId);
|
||||
getArguments().remove("messageId");
|
||||
activity.loadTarget(MainActivity.TARGET_MESSAGES_DETAILS, args);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (getArguments() != null) {
|
||||
messageType = getArguments().getInt("messageType", Message.TYPE_RECEIVED);
|
||||
}
|
||||
|
||||
/*b.refreshLayout.setOnRefreshListener(() -> {
|
||||
activity.syncCurrentFeature(messageType, b.refreshLayout);
|
||||
});*/
|
||||
|
||||
/*messagesAdapter = new MessagesAdapter(app, ((parent, view1, position, id) -> {
|
||||
// TODO ANIMATION
|
||||
tapPositions[messageType] = position;
|
||||
topPositions[messageType] = ((LinearLayoutManager) b.emailList.getLayoutManager()).findFirstCompletelyVisibleItemPosition();
|
||||
bottomPositions[messageType] = ((LinearLayoutManager) b.emailList.getLayoutManager()).findLastCompletelyVisibleItemPosition();
|
||||
|
||||
*//*view1.getGlobalVisibleRect(viewRect);
|
||||
((Transition) MessagesListFragment.this.getExitTransition()).setEpicenterCallback(new Transition.EpicenterCallback() {
|
||||
@Override
|
||||
public Rect onGetEpicenter(@NonNull Transition transition) {
|
||||
return viewRect;
|
||||
}
|
||||
});*//*
|
||||
|
||||
Bundle args = new Bundle();
|
||||
args.putLong("messageId", messagesAdapter.getMessageList().get(position).id);
|
||||
activity.loadTarget(MainActivity.TARGET_MESSAGES_DETAILS, args);
|
||||
|
||||
// KOD W WERSJI 2.7
|
||||
// TODO ANIMATION
|
||||
*//*TransitionSet sharedElementTransition = new TransitionSet()
|
||||
.addTransition(new Fade())
|
||||
.addTransition(new ChangeBounds())
|
||||
.addTransition(new ChangeTransform())
|
||||
.addTransition(new ChangeImageTransform())
|
||||
.setDuration(TRANSITION_DURATION)
|
||||
.setInterpolator(transitionInterpolator);
|
||||
|
||||
MessagesDetailsFragment fragment = new MessagesDetailsFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putLong("messageId", messagesAdapter.messageList.get(position).id);
|
||||
fragment.setArguments(args);
|
||||
fragment.setSharedElementEnterTransition(sharedElementTransition);
|
||||
fragment.setSharedElementReturnTransition(sharedElementTransition);*//*
|
||||
|
||||
// JAKIS STARSZY KOD
|
||||
*//*Intent intent = new Intent(activity, MessagesDetailsActivity.class);
|
||||
intent.putExtra("item_id", 1);
|
||||
intent.putExtra("transition_name", ViewCompat.getTransitionName(view1));
|
||||
|
||||
|
||||
ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(
|
||||
activity,
|
||||
view1,
|
||||
getString(R.string.transition_name)
|
||||
);
|
||||
|
||||
TransitionManager.beginDelayedTransition((ViewGroup) view1, sharedElementTransition);
|
||||
setEnterTransition(sharedElementTransition);
|
||||
setReturnTransition(sharedElementTransition);
|
||||
setExitTransition(sharedElementTransition);
|
||||
setSharedElementEnterTransition(sharedElementTransition);
|
||||
setSharedElementReturnTransition(sharedElementTransition);
|
||||
startActivity(intent, options.toBundle());*//*
|
||||
|
||||
*//*activity.getSupportFragmentManager()
|
||||
.beginTransaction()
|
||||
.setReorderingAllowed(true)
|
||||
.replace(R.id.fragment_container, fragment)
|
||||
.addToBackStack(null)
|
||||
.addSharedElement(view1, getString(R.string.transition_name))
|
||||
.commit();*//*
|
||||
|
||||
}));*/
|
||||
|
||||
|
||||
//tapPosition = savedInstanceState != null ? savedInstanceState.getInt(TAP_POSITION, tapPosition) : tapPosition;
|
||||
|
||||
// May not be the best place to postpone transition. Just an example to demo how reenter transition works.
|
||||
// TODO ANIMATION
|
||||
//postponeEnterTransition();
|
||||
|
||||
viewParent = (ViewGroup) getView().getParent();
|
||||
|
||||
b.emailList.setLayoutManager(new LinearLayoutManager(getView().getContext()));
|
||||
b.emailList.addItemDecoration(new SimpleDividerItemDecoration(getView().getContext()));
|
||||
b.emailList.setAdapter(messagesAdapter);
|
||||
b.emailList.addOnScrollListener(new RecyclerView.OnScrollListener() {
|
||||
@Override
|
||||
public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {
|
||||
if (b.emailList.canScrollVertically(-1)) {
|
||||
setSwipeToRefresh(false);
|
||||
}
|
||||
if (!b.emailList.canScrollVertically(-1) && newState == SCROLL_STATE_IDLE) {
|
||||
setSwipeToRefresh(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (messageType == Message.TYPE_RECEIVED) {
|
||||
App.db.messageDao().getReceived(App.Companion.getProfileId()).observe(this, messageFulls -> {
|
||||
createMessageList(messageFulls);
|
||||
});
|
||||
}
|
||||
else if (messageType == Message.TYPE_DELETED) {
|
||||
App.db.messageDao().getDeleted(App.Companion.getProfileId()).observe(this, messageFulls -> {
|
||||
createMessageList(messageFulls);
|
||||
});
|
||||
}
|
||||
else if (messageType == Message.TYPE_SENT) {
|
||||
App.db.messageDao().getSent(App.Companion.getProfileId()).observe(this, messageFulls -> {
|
||||
AsyncTask.execute(() -> {
|
||||
List<MessageRecipientFull> messageRecipients = App.db.messageRecipientDao().getAll(App.Companion.getProfileId());
|
||||
List<Long> messageIds = new ArrayList<>();
|
||||
for (MessageFull messageFull: messageFulls) {
|
||||
messageIds.add(messageFull.getId());
|
||||
}
|
||||
for (MessageRecipientFull messageRecipientFull: messageRecipients) {
|
||||
if (messageRecipientFull.id == -1)
|
||||
continue;
|
||||
|
||||
int index = -1;
|
||||
|
||||
int i = -1;
|
||||
for (long id: messageIds) {
|
||||
//index++;
|
||||
i++;
|
||||
if (id == messageRecipientFull.messageId) {
|
||||
index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (index >= 0) {
|
||||
MessageFull messageFull = messageFulls.get(index);
|
||||
if (messageFull != null) {
|
||||
messageFull.addRecipient(messageRecipientFull);
|
||||
}
|
||||
}
|
||||
}
|
||||
activity.runOnUiThread(() -> {
|
||||
createMessageList(messageFulls);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void createMessageList(List<MessageFull> messageFulls) {
|
||||
b.progressBar.setVisibility(View.GONE);
|
||||
b.emailList.setVisibility(View.VISIBLE);
|
||||
//messagesAdapter.setData(messageFulls);
|
||||
|
||||
LinearLayoutManager layoutManager = (LinearLayoutManager) b.emailList.getLayoutManager();
|
||||
if (tapPositions[messageType] != NO_POSITION && layoutManager != null) {
|
||||
//d("MessageList", "Scrolling");
|
||||
|
||||
if (topPositions[messageType] > layoutManager.findLastCompletelyVisibleItemPosition()) {
|
||||
b.emailList.scrollToPosition(topPositions[messageType]);
|
||||
}
|
||||
else if (bottomPositions[messageType] < layoutManager.findFirstCompletelyVisibleItemPosition()) {
|
||||
b.emailList.scrollToPosition(bottomPositions[messageType]);
|
||||
}
|
||||
else {
|
||||
b.emailList.scrollToPosition(tapPositions[messageType]);
|
||||
}
|
||||
|
||||
//tapPositions[messageType] = NO_POSITION;
|
||||
//topPositions[messageType] = NO_POSITION;
|
||||
//bottomPositions[messageType] = NO_POSITION;
|
||||
}
|
||||
// TODO ANIMATION
|
||||
/*final ViewTreeObserver observer = viewParent.getViewTreeObserver();
|
||||
observer.addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
|
||||
@Override
|
||||
public boolean onPreDraw() {
|
||||
|
||||
*//*viewParent.getViewTreeObserver().removeOnPreDrawListener(this);
|
||||
if (getExitTransition() == null) {
|
||||
setExitTransition(new SlideExplode().setDuration(TRANSITION_DURATION).setInterpolator(transitionInterpolator));
|
||||
}
|
||||
|
||||
View view2 = layoutManager != null ? layoutManager.findViewByPosition(tapPosition) : null;
|
||||
if (view2 != null) {
|
||||
view2.getGlobalVisibleRect(viewRect);
|
||||
((Transition) getExitTransition()).setEpicenterCallback(new Transition.EpicenterCallback() {
|
||||
@Override
|
||||
public Rect onGetEpicenter(@NonNull Transition transition) {
|
||||
return viewRect;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
d("MessagesList", "topPosition "+topPosition);
|
||||
d("MessagesList", "tapPosition "+tapPosition);
|
||||
d("MessagesList", "bottomPosition "+bottomPosition);*//*
|
||||
|
||||
|
||||
startPostponedEnterTransition();
|
||||
return true;
|
||||
}
|
||||
});*/
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSaveInstanceState(@NonNull Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
d("MessagesList", "onSaveInstanceState position "+tapPositions[messageType]);
|
||||
outState.putInt(TAP_POSITION, tapPositions[messageType]);
|
||||
}
|
||||
}
|
@ -1,12 +1,11 @@
|
||||
package pl.szczodrzynski.edziennik.ui.modules.settings
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.Fragment
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.Fragment
|
||||
import pl.szczodrzynski.edziennik.App
|
||||
import pl.szczodrzynski.edziennik.R
|
||||
import pl.szczodrzynski.edziennik.MainActivity
|
||||
import pl.szczodrzynski.edziennik.databinding.FragmentProfileManagerBinding
|
||||
import pl.szczodrzynski.edziennik.utils.Themes
|
||||
@ -26,8 +25,6 @@ class ProfileManagerFragment : Fragment() {
|
||||
return null
|
||||
app = activity.application as App
|
||||
context!!.theme.applyStyle(Themes.appTheme, true)
|
||||
if (app.profile == null)
|
||||
return inflater.inflate(R.layout.fragment_loading, container, false)
|
||||
// activity, context and profile is valid
|
||||
b = FragmentProfileManagerBinding.inflate(inflater)
|
||||
b.refreshLayout.setParent(activity.swipeRefreshLayout)
|
||||
|
@ -1,114 +0,0 @@
|
||||
package pl.szczodrzynski.edziennik.utils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.ColorFilter;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.util.TypedValue;
|
||||
|
||||
public class BadgeDrawable extends Drawable {
|
||||
|
||||
private float mTextSize;
|
||||
private Paint mBadgePaint;
|
||||
private Paint mTextPaint;
|
||||
private Rect mTxtRect = new Rect();
|
||||
|
||||
private String mCount = "";
|
||||
private boolean mTextEnabled = true;
|
||||
private boolean mWillDraw = false;
|
||||
|
||||
|
||||
public BadgeDrawable(Context context) {
|
||||
mTextSize = dpToPx(context, 11); //text size
|
||||
mBadgePaint = new Paint();
|
||||
mBadgePaint.setColor(Color.RED);
|
||||
mBadgePaint.setAntiAlias(true);
|
||||
mBadgePaint.setStyle(Paint.Style.FILL);
|
||||
|
||||
mTextPaint = new Paint();
|
||||
mTextPaint.setColor(Color.WHITE);
|
||||
mTextPaint.setTypeface(Typeface.DEFAULT);
|
||||
mTextPaint.setTextSize(mTextSize);
|
||||
mTextPaint.setAntiAlias(true);
|
||||
mTextPaint.setTextAlign(Paint.Align.CENTER);
|
||||
}
|
||||
|
||||
private float dpToPx(Context context, float value) {
|
||||
Resources r = context.getResources();
|
||||
float px = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, value, r.getDisplayMetrics());
|
||||
return px;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void draw(Canvas canvas) {
|
||||
if (!mWillDraw) {
|
||||
return;
|
||||
}
|
||||
Rect bounds = getBounds();
|
||||
float width = bounds.right - bounds.left;
|
||||
float height = bounds.bottom - bounds.top;
|
||||
// Position the badge in the top-right quadrant of the icon.
|
||||
|
||||
/*Using Math.max rather than Math.min */
|
||||
// float radius = ((Math.max(width, height) / 2)) / 2;
|
||||
float radius = width * 0.15f;
|
||||
float centerX = (width - radius - 1) +10;
|
||||
float centerY = radius -5;
|
||||
if (mTextEnabled) {
|
||||
if(mCount.length() <= 2){
|
||||
// Draw badge circle.
|
||||
canvas.drawCircle(centerX, centerY, radius+13, mBadgePaint);
|
||||
}
|
||||
else{
|
||||
canvas.drawCircle(centerX, centerY, radius+16, mBadgePaint);
|
||||
}
|
||||
// Draw badge count text inside the circle.
|
||||
mTextPaint.getTextBounds(mCount, 0, mCount.length(), mTxtRect);
|
||||
float textHeight = mTxtRect.bottom - mTxtRect.top;
|
||||
float textY = centerY + (textHeight / 2f);
|
||||
if (mCount.length() > 2)
|
||||
canvas.drawText("99+", centerX, textY, mTextPaint);
|
||||
else
|
||||
canvas.drawText(mCount, centerX, textY, mTextPaint);
|
||||
}
|
||||
else {
|
||||
canvas.drawCircle(centerX, centerY, radius+5, mBadgePaint);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Sets the count (i.e notifications) to display.
|
||||
*/
|
||||
public void setCount(String count) {
|
||||
mCount = count;
|
||||
// Only draw a badge if there are notifications.
|
||||
mWillDraw = !count.equalsIgnoreCase("0");
|
||||
invalidateSelf();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAlpha(int alpha) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
public void setTextEnabled(boolean mTextEnabled) {
|
||||
this.mTextEnabled = mTextEnabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setColorFilter(ColorFilter cf) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOpacity() {
|
||||
return PixelFormat.UNKNOWN;
|
||||
}
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
package pl.szczodrzynski.edziennik.utils;
|
||||
|
||||
import android.text.Editable;
|
||||
import android.text.Html;
|
||||
import android.text.Spannable;
|
||||
import android.text.style.StrikethroughSpan;
|
||||
|
||||
import org.xml.sax.XMLReader;
|
||||
|
||||
public class SpannableHtmlTagHandler implements Html.TagHandler {
|
||||
|
||||
public void handleTag(boolean opening, String tag, Editable output,
|
||||
XMLReader xmlReader) {
|
||||
if(tag.equalsIgnoreCase("strike") || tag.equals("s") || tag.equals("del")) {
|
||||
processStrike(opening, output);
|
||||
}
|
||||
}
|
||||
|
||||
private void processStrike(boolean opening, Editable output) {
|
||||
int len = output.length();
|
||||
if(opening) {
|
||||
output.setSpan(new StrikethroughSpan(), len, len, Spannable.SPAN_MARK_MARK);
|
||||
} else {
|
||||
Object obj = getLast(output, StrikethroughSpan.class);
|
||||
int where = output.getSpanStart(obj);
|
||||
|
||||
output.removeSpan(obj);
|
||||
|
||||
if (where != len) {
|
||||
output.setSpan(new StrikethroughSpan(), where, len, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Object getLast(Editable text, Class kind) {
|
||||
Object[] objs = text.getSpans(0, text.length(), kind);
|
||||
|
||||
if (objs.length == 0) {
|
||||
return null;
|
||||
} else {
|
||||
for(int i = objs.length;i>0;i--) {
|
||||
if(text.getSpanFlags(objs[i-1]) == Spannable.SPAN_MARK_MARK) {
|
||||
return objs[i-1];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:shareInterpolator="@android:anim/decelerate_interpolator"
|
||||
tools:keep="@anim/down_from_top">
|
||||
<translate
|
||||
android:fromXDelta="0%" android:toXDelta="0%"
|
||||
android:fromYDelta="-100%" android:toYDelta="0%"
|
||||
android:duration="200" />
|
||||
</set>
|
@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2017 The Android Open Source Project
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License
|
||||
-->
|
||||
|
||||
<pathInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:pathData="M 0,0 C 0.05, 0, 0.133333, 0.06, 0.166666, 0.4 C 0.208333, 0.82, 0.25, 1, 1, 1"/>
|
@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2014 The Android Open Source Project
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License
|
||||
-->
|
||||
|
||||
<pathInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:controlX1="0.4"
|
||||
android:controlY1="0"
|
||||
android:controlX2="1"
|
||||
android:controlY2="1"/>
|
@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2014 The Android Open Source Project
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License
|
||||
-->
|
||||
|
||||
<pathInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:controlX1="0.4"
|
||||
android:controlY1="0"
|
||||
android:controlX2="0.2"
|
||||
android:controlY2="1"/>
|
@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/* //device/apps/common/res/anim/linear_interpolator.xml
|
||||
**
|
||||
** Copyright 2007, The Android Open Source Project
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
-->
|
||||
|
||||
<linearInterpolator />
|
@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:interpolator="@android:anim/linear_interpolator" android:duration="1000" android:fromDegrees="0" android:toDegrees="360" android:pivotX="50%" android:pivotY="50%"
|
||||
tools:keep="@anim/sync_rotate" />
|
@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:interpolator="@android:anim/linear_interpolator" android:duration="100" android:fromDegrees="0" android:toDegrees="180" android:pivotX="50%" android:pivotY="50%"
|
||||
tools:keep="@anim/sync_rotate_0_180" />
|
@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:interpolator="@android:anim/linear_interpolator" android:duration="100" android:fromDegrees="180" android:toDegrees="0" android:pivotX="50%" android:pivotY="50%"
|
||||
tools:keep="@anim/sync_rotate_180_0" />
|
@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:shareInterpolator="@android:anim/decelerate_interpolator"
|
||||
tools:keep="@anim/up_from_bottom">
|
||||
<translate
|
||||
android:fromXDelta="0%" android:toXDelta="0%"
|
||||
android:fromYDelta="100%" android:toYDelta="0%"
|
||||
android:duration="200" />
|
||||
</set>
|
@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="2dp" />
|
||||
<solid android:color="#DEDEDE" />
|
||||
<size
|
||||
android:width="32dp"
|
||||
android:height="4dp" />
|
||||
</shape>
|
Binary file not shown.
Before Width: | Height: | Size: 69 B |
@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@+id/ic_main_icon"
|
||||
android:drawable="@mipmap/ic_launcher_foreground"
|
||||
android:gravity="center" />
|
||||
|
||||
<!-- set a place holder Drawable so android:drawable isn't null -->
|
||||
<item android:id="@+id/ic_badge"
|
||||
android:drawable="@mipmap/ic_launcher_foreground" />
|
||||
</layer-list>
|
@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
** Copyright 2014, The Android Open Source Project
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
-->
|
||||
|
||||
<accelerateInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:factor="2.0" />
|
@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2017 The Android Open Source Project
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License
|
||||
-->
|
||||
|
||||
<pathInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:controlX1="0.2"
|
||||
android:controlY1="0"
|
||||
android:controlX2="0"
|
||||
android:controlY2="1"/>
|
@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
** Copyright 2014, The Android Open Source Project
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
-->
|
||||
|
||||
<decelerateInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:factor="2.0" />
|
@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
** Copyright 2010, The Android Open Source Project
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
-->
|
||||
|
||||
<decelerateInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:factor="2.5" />
|
@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2014 The Android Open Source Project
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License
|
||||
-->
|
||||
|
||||
<pathInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:controlX1="0.4"
|
||||
android:controlY1="0"
|
||||
android:controlX2="0.2"
|
||||
android:controlY2="1"/>
|
@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/* //device/apps/common/res/anim/linear_interpolator.xml
|
||||
**
|
||||
** Copyright 2007, The Android Open Source Project
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
-->
|
||||
|
||||
<linearInterpolator />
|
@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2014 The Android Open Source Project
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License
|
||||
-->
|
||||
|
||||
<pathInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:controlX1="0"
|
||||
android:controlY1="0"
|
||||
android:controlX2="0.2"
|
||||
android:controlY2="1"/>
|
@ -101,15 +101,6 @@
|
||||
android:text="@string/crash_details"
|
||||
android:textColor="@color/colorPrimary" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/crash_dev_message_btn"
|
||||
style="?borderlessButtonStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/crash_dev_message"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
|
@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/gtfo"
|
||||
android:contentDescription="TODO" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -1,86 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/cardUpdate"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
app:cardElevation="4dp"
|
||||
app:cardCornerRadius="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsTextView
|
||||
android:id="@+id/cardUpdateIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="{cmd-cloud-download}"
|
||||
android:textSize="20sp"
|
||||
app:fontFamily="sans-serif-condensed"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/card_update_title"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/cardUpdateIcon"
|
||||
app:layout_constraintStart_toEndOf="@+id/cardUpdateIcon"
|
||||
app:layout_constraintTop_toTopOf="@+id/cardUpdateIcon" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cardUpdateText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@string/card_update_text_format"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/cardUpdateIcon" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?android:textColorSecondary" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/cardUpdateButton"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?selectableItemBackground"
|
||||
android:gravity="center_vertical|start"
|
||||
android:minWidth="0dp"
|
||||
android:minHeight="0dp"
|
||||
android:padding="@dimen/card_button_padding"
|
||||
android:text="@string/card_update_button" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</LinearLayout>
|
||||
</layout>
|
@ -1,61 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/chatContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.github.bassaer.chatmessageview.view.MessageView
|
||||
android:id="@+id/messageView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:cacheColorHint="@android:color/transparent"
|
||||
android:listSelector="@android:color/transparent"/>
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?colorSurface"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/optionButtonContainer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/inputBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="3" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/sendButton"
|
||||
style="@style/Base.Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="@dimen/icon_normal"
|
||||
android:layout_height="@dimen/icon_normal"
|
||||
android:layout_gravity="center"
|
||||
android:contentDescription="@string/send"
|
||||
android:src="@drawable/ic_action_send" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@ -1,13 +0,0 @@
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingHorizontal="16dp"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<WebView
|
||||
android:id="@+id/webview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scrollbars="none" />
|
||||
|
||||
</FrameLayout>
|
@ -1,90 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/detailsLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include
|
||||
android:id="@+id/lessonChangeContainer"
|
||||
layout="@layout/row_lesson_change_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:layout_marginVertical="5dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<include
|
||||
android:id="@+id/teacherAbsenceContainer"
|
||||
layout="@layout/row_teacher_absence_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:layout_marginVertical="5dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/eventListLessonDetails"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventListLessonDate"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="21 października 2018, 9:05" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventListLessonChange"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="italic"
|
||||
tools:text="Lekcja odwołana" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventListTeacher"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="italic"
|
||||
tools:text="Jan Kowalski -> John Doe" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventListClassroom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="italic"
|
||||
tools:text="029 informatyczna -> 016 językowa" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textNoEvents"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_margin="32dp"
|
||||
android:text="@string/dialog_event_list_no_data"
|
||||
android:textStyle="italic"
|
||||
android:visibility="gone" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/eventListView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:clipToPadding="false"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="8dp"
|
||||
tools:listitem="@layout/row_dialog_event_list_item" />
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</layout>
|
@ -1,232 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/dialog_event_manual_date_header"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="?attr/colorAccent"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/section_underline_height"
|
||||
android:layout_marginTop="2dp"
|
||||
android:background="?attr/colorAccent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/registerEventManualDateLayout"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:hint="@string/dialog_event_manual_date"
|
||||
app:errorEnabled="true"
|
||||
app:hintAnimationEnabled="true"
|
||||
app:hintEnabled="true">
|
||||
|
||||
<pl.szczodrzynski.edziennik.utils.TextInputDropDown
|
||||
android:id="@+id/registerEventManualDate"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingEnd="6.0dip"
|
||||
android:paddingRight="6.0dip" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/registerEventManualLessonLayout"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/dialog_event_manual_lesson"
|
||||
app:errorEnabled="true"
|
||||
app:hintAnimationEnabled="true"
|
||||
app:hintEnabled="true">
|
||||
|
||||
<pl.szczodrzynski.edziennik.utils.TextInputDropDown
|
||||
android:id="@+id/registerEventManualLesson"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingEnd="6.0dip"
|
||||
android:paddingRight="6.0dip" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/registerEventManualTeamLayout"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/dialog_event_manual_team"
|
||||
app:errorEnabled="true"
|
||||
app:hintAnimationEnabled="true"
|
||||
app:hintEnabled="true">
|
||||
|
||||
<pl.szczodrzynski.edziennik.utils.TextInputDropDown
|
||||
android:id="@+id/registerEventManualTeam"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingEnd="6.0dip"
|
||||
android:paddingRight="6.0dip" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/registerEventManualShare"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:text="@string/dialog_event_manual_share_enabled" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/registerEventManualShareText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:text="@string/dialog_event_manual_share_first_notice"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/dialog_homework_manual_details_header"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="?attr/colorAccent"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/section_underline_height"
|
||||
android:layout_marginTop="2dp"
|
||||
android:background="?attr/colorAccent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/registerEventManualTypeLayout"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:hint="@string/dialog_event_manual_type"
|
||||
app:errorEnabled="true"
|
||||
app:hintAnimationEnabled="true"
|
||||
app:hintEnabled="true">
|
||||
|
||||
<pl.szczodrzynski.edziennik.utils.TextInputDropDown
|
||||
android:id="@+id/registerEventManualType"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingEnd="6.0dip"
|
||||
android:paddingRight="6.0dip" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0px"
|
||||
android:layout_height="0px"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/registerEventManualTopicLayout"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/dialog_event_manual_topic"
|
||||
app:errorEnabled="true"
|
||||
app:hintAnimationEnabled="true"
|
||||
app:hintEnabled="true">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/registerEventManualTopic"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:inputType="textMultiLine|textPersonName"
|
||||
android:maxLines="5"
|
||||
android:singleLine="false" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<View
|
||||
android:id="@+id/registerEventManualColorPreview"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/registerEventManualColorChoose"
|
||||
style="@style/Widget.MaterialComponents.Button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:text="@string/dialog_event_manual_change_color"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/registerEventManualColorPreview"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:hint="@string/dialog_event_manual_teacher"
|
||||
app:errorEnabled="true"
|
||||
app:hintAnimationEnabled="true"
|
||||
app:hintEnabled="true">
|
||||
|
||||
<pl.szczodrzynski.edziennik.utils.TextInputDropDown
|
||||
android:id="@+id/registerEventManualTeacher"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingEnd="6.0dip"
|
||||
android:paddingRight="6.0dip"
|
||||
android:text="@string/dialog_event_manual_no_teacher" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/dialog_event_manual_subject"
|
||||
app:errorEnabled="true"
|
||||
app:hintAnimationEnabled="true"
|
||||
app:hintEnabled="true">
|
||||
|
||||
<pl.szczodrzynski.edziennik.utils.TextInputDropDown
|
||||
android:id="@+id/registerEventManualSubject"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingEnd="6.0dip"
|
||||
android:paddingRight="6.0dip"
|
||||
android:text="@string/dialog_event_manual_no_subject" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
</LinearLayout>
|
@ -1,203 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<pl.szczodrzynski.edziennik.utils.SwipeRefreshLayoutNoIndicator
|
||||
android:id="@+id/refreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_weight="2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/attendanceSummaryTitle"
|
||||
style="@style/Widget.AppCompat.Spinner"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/attendances_summary_title_loading_format"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/attendanceSummarySubject"
|
||||
style="@style/Widget.AppCompat.Spinner"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/subject_filter_disabled"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/presentCountContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/attendances_present" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/presentCount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="5dp"
|
||||
android:textStyle="bold"
|
||||
tools:text="0" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/attendances_absent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/absentCount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="5dp"
|
||||
android:textStyle="bold"
|
||||
tools:text="0" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/attendances_absent_unexcused" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/absentUnexcusedCount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="5dp"
|
||||
android:textStyle="bold"
|
||||
tools:text="0" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/attendances_belated" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/belatedCount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="5dp"
|
||||
android:textStyle="bold"
|
||||
tools:text="0" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/attendances_releases" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/releasedCount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="5dp"
|
||||
android:textStyle="bold"
|
||||
tools:text="8" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<antonkozyriatskyi.circularprogressindicator.CircularProgressIndicator
|
||||
android:id="@+id/attendancePercentage"
|
||||
android:layout_width="160dp"
|
||||
android:layout_height="160dp"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:layout_weight="1"
|
||||
app:direction="clockwise"
|
||||
app:drawDot="false"
|
||||
app:progressBackgroundStrokeWidth="11dp"
|
||||
app:progressStrokeWidth="12dp"
|
||||
app:textSize="18sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/attendance_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="8dp"
|
||||
tools:listitem="@layout/row_attendance_item">
|
||||
|
||||
</androidx.recyclerview.widget.RecyclerView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/attendance_no_data"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="92dp"
|
||||
app:iiv_icon="cmd-calendar-check"
|
||||
app:iiv_color="?android:textColorPrimary"
|
||||
app:iiv_size="92dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center"
|
||||
android:text="@string/attendances_no_data"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="italic" />
|
||||
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
</pl.szczodrzynski.edziennik.utils.SwipeRefreshLayoutNoIndicator>
|
||||
</layout>
|
@ -1,48 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<pl.szczodrzynski.edziennik.utils.SwipeRefreshLayoutNoIndicator
|
||||
android:id="@+id/refreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<ListView
|
||||
android:id="@+id/gradesRecyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
</pl.szczodrzynski.edziennik.utils.SwipeRefreshLayoutNoIndicator>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/gradesNoData"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="92dp"
|
||||
app:iiv_icon="szf-numeric-0-box-multiple-outline-off"
|
||||
app:iiv_color="?android:textColorPrimary"
|
||||
app:iiv_size="92dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center"
|
||||
android:text="@string/grades_no_data"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="italic" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
</layout>
|
@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/hello_blank_fragment" />
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</layout>
|
@ -1,32 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<pl.szczodrzynski.edziennik.utils.SwipeRefreshLayoutNoIndicator
|
||||
android:id="@+id/refreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tabLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/colorSurface_6dp"
|
||||
app:tabIndicatorColor="?colorPrimary"
|
||||
app:tabMode="auto"
|
||||
app:tabSelectedTextColor="?colorPrimary"
|
||||
app:tabTextColor="?android:textColorPrimary"/>
|
||||
|
||||
<pl.szczodrzynski.edziennik.ui.modules.base.lazypager.LazyViewPager
|
||||
android:id="@+id/viewPager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
|
||||
</LinearLayout>
|
||||
|
||||
</pl.szczodrzynski.edziennik.utils.SwipeRefreshLayoutNoIndicator>
|
||||
</layout>
|
@ -1,31 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<WebView
|
||||
android:id="@+id/messagesWebView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</WebView>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/messagesWebProgressBar"
|
||||
style="?android:attr/progressBarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/messagesWebError"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="italic"
|
||||
android:visibility="gone"
|
||||
tools:text="Błąd" />
|
||||
</FrameLayout>
|
||||
</layout>
|
@ -1,40 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:id="@+id/main_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?colorSurface"
|
||||
style="@style/Widget.MaterialComponents.AppBarLayout.Surface">
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/result_tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/colorSurface_6dp"
|
||||
app:tabIndicatorColor="?colorPrimary"
|
||||
app:tabMode="scrollable"
|
||||
app:tabSelectedTextColor="?colorPrimary"
|
||||
app:tabTextColor="?android:textColorPrimary" />
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</layout>
|
@ -1,94 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<pl.szczodrzynski.edziennik.utils.SwipeRefreshLayoutNoIndicator
|
||||
android:id="@+id/refreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/timetableView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</pl.szczodrzynski.edziennik.utils.SwipeRefreshLayoutNoIndicator>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/timetableNoData"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
tools:visibility="gone">
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="92dp"
|
||||
app:iiv_color="?android:textColorPrimary"
|
||||
app:iiv_icon="cmd-timetable"
|
||||
app:iiv_size="92dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center"
|
||||
android:text="@string/timetable_no_data"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="italic" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?android:windowBackground"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
android:gravity="center"
|
||||
tools:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:srcCompat="@drawable/ic_sunbed" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView4"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:gravity="center"
|
||||
android:text="Dzień wolny"
|
||||
android:textSize="24sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView5"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="W tym dniu nie ma lekcji: \nFerie zimowe"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
style="@style/Widget.MaterialComponents.Button"
|
||||
android:layout_gravity="center"
|
||||
android:text="Pokaż plan lekcji" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
</layout>
|
@ -1,359 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:transitionName="@string/transition_name">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/messageToolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
android:orientation="horizontal"
|
||||
android:background="@color/colorSurface_6dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/messageClose"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:background="?android:attr/actionBarItemBackground"
|
||||
app:srcCompat="@android:drawable/ic_delete" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/messageSubject"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:animateLayoutChanges="true"
|
||||
android:background="?selectableItemBackground"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:padding="16dp"
|
||||
android:textAppearance="@style/NavView.TextView.Title"
|
||||
tools:ignore="HardcodedText"
|
||||
tools:text="mobiDziennik - raport dzienny." />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:background="@drawable/shadow_top"
|
||||
app:layout_constraintTop_toBottomOf="@+id/messageToolbar"
|
||||
tools:layout_editor_absoluteX="0dp" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress"
|
||||
style="?android:attr/progressBarStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/messageContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/view">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/messageProfileBackground"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:padding="12dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/bg_circle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/messageProfileName"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:fontFamily="sans-serif"
|
||||
android:gravity="center"
|
||||
android:padding="12dp"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="20sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="JP"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/messageProfileImage"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:padding="12dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:srcCompat="@tools:sample/avatars[0]" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/messageSender"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?selectableItemBackground"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="3"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingTop="12dp"
|
||||
android:textAppearance="@style/NavView.TextView.Subtitle"
|
||||
app:layout_constraintEnd_toStartOf="@+id/messageDate"
|
||||
app:layout_constraintStart_toEndOf="@+id/messageProfileBackground"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="Allegro - wysyłamy duużo wiadomości!!! Masz nowe oferty! Możesz kupić nowego laptopa! Ale super! Ehh, to jest nadawca a nie temat więc nwm czemu to tutaj wpisałem" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/messageDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:textAppearance="@style/NavView.TextView.Small"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="14:26" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/messageBody"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginVertical="8dp"
|
||||
android:autoLink="all"
|
||||
android:minHeight="250dp"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:textIsSelectable="true"
|
||||
tools:text="To jest treść wiadomości.\n\nZazwyczaj ma wiele linijek.\n\nTak" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="?colorControlHighlight" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="Odbiorcy wiadomości:"
|
||||
android:textAppearance="@style/NavView.TextView.Subtitle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/messageRecipients"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="16dp"
|
||||
tools:text=" - Jan Kowalski, przeczytano: nie\n - Adam Dodatkowy, przeczytano: 20 marca, 17:35" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/messageAttachmentsTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="Załączniki:"
|
||||
android:textAppearance="@style/NavView.TextView.Subtitle" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/messageAttachments"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/chip3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="middle"
|
||||
android:text="Testowy plik.pdf"
|
||||
android:visibility="visible"
|
||||
app:chipBackgroundColor="@color/mtrl_chip_background_color"
|
||||
app:chipIcon="@drawable/googleg_standard_color_18"
|
||||
app:chipMinHeight="36dp"
|
||||
app:chipSurfaceColor="@color/mtrl_chip_surface_color"
|
||||
app:closeIcon="@drawable/ic_error_outline"
|
||||
app:closeIconVisible="true" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar2"
|
||||
style="?android:attr/progressBarStyle"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:layout_marginHorizontal="8dp" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/chip4"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="middle"
|
||||
android:text="Wyniki sprawdzianu z matematyki.pdf"
|
||||
android:visibility="visible"
|
||||
app:chipIcon="@drawable/googleg_standard_color_18"
|
||||
app:chipMinHeight="36dp"
|
||||
app:closeIcon="@drawable/background_transparent"
|
||||
app:closeIconVisible="true"/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar3"
|
||||
style="?android:attr/progressBarStyle"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:layout_marginHorizontal="8dp" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/messageReplyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginHorizontal="4dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_rounded_ripple"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="4dp"
|
||||
android:paddingVertical="8dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="Odpowiedz"
|
||||
android:textAppearance="@style/NavView.TextView.Small" />
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:padding="4dp"
|
||||
app:iiv_color="?android:textColorSecondary"
|
||||
app:iiv_icon="cmd-reply"
|
||||
tools:srcCompat="@android:drawable/ic_menu_revert" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/messageForwardButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginHorizontal="4dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_rounded_ripple"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="4dp"
|
||||
android:paddingVertical="8dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="Przekaż dalej"
|
||||
android:textAllCaps="false"
|
||||
android:textAppearance="@style/NavView.TextView.Small" />
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:padding="4dp"
|
||||
app:iiv_color="?android:textColorSecondary"
|
||||
app:iiv_icon="cmd-share"
|
||||
tools:srcCompat="@android:drawable/ic_media_ff" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/messageRemoveButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginHorizontal="4dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_rounded_ripple"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="4dp"
|
||||
android:paddingVertical="8dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="Usuń"
|
||||
android:textAppearance="@style/NavView.TextView.Small" />
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:padding="4dp"
|
||||
app:iiv_color="?android:textColorSecondary"
|
||||
app:iiv_icon="cmd-delete"
|
||||
tools:srcCompat="@android:drawable/ic_menu_delete" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
@ -1,119 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/messageProfileBackground"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:padding="12dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/bg_circle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/messageProfileName"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:gravity="center"
|
||||
android:padding="12dp"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="24sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="JP"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<!--<ImageView
|
||||
android:id="@+id/messageProfileImage"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:padding="12dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:srcCompat="@tools:sample/avatars[13]" />-->
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsImageView
|
||||
android:id="@+id/messageAttachmentImage"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:paddingVertical="2dp"
|
||||
android:scaleType="fitCenter"
|
||||
app:iiv_icon="cmd-attachment"
|
||||
app:iiv_color="?android:textColorSecondary"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/messageDate"
|
||||
app:layout_constraintEnd_toStartOf="@+id/messageDate"
|
||||
app:layout_constraintTop_toTopOf="@+id/messageDate"
|
||||
tools:srcCompat="@tools:sample/avatars[4]" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/messageSubject"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:singleLine="true"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/messageProfileBackground"
|
||||
app:layout_constraintTop_toBottomOf="@+id/messageSender"
|
||||
tools:text="Nowe oferty w Twoich obserwowanych wyszukiwaniach" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/messageSender"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toStartOf="@+id/messageAttachmentImage"
|
||||
app:layout_constraintStart_toEndOf="@+id/messageProfileBackground"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="Allegro" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/messageBody"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/NavView.TextView.Helper"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/messageProfileBackground"
|
||||
app:layout_constraintTop_toBottomOf="@+id/messageSubject"
|
||||
tools:text="Znajdź produkty, których szukasz. Witaj Jan Kowalski (Client" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/messageDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="02:00" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:tools="http://schemas.android.com/tools">
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/emailList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipChildren="false"
|
||||
android:transitionGroup="false"
|
||||
tools:listitem="@layout/messages_item"
|
||||
tools:targetApi="lollipop" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"/>
|
||||
</FrameLayout>
|
||||
</layout>
|
@ -1,93 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/attendanceType"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:background="@drawable/bg_rounded_8dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="24sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="nb" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/attendanceLessonTopic"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:ellipsize="marquee"
|
||||
android:focusableInTouchMode="false"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:textIsSelectable="true"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/attendanceDate"
|
||||
app:layout_constraintStart_toStartOf="@+id/attendanceSubject"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="Podstawy języka C."
|
||||
android:layout_marginRight="8dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/attendanceSubject"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:singleLine="true"
|
||||
app:layout_constraintEnd_toStartOf="@+id/attendanceDate"
|
||||
app:layout_constraintStart_toEndOf="@+id/attendanceType"
|
||||
app:layout_constraintTop_toBottomOf="@+id/attendanceLessonTopic"
|
||||
tools:text="podstawy programowania" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/attendanceTeacher"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/NavView.TextView.Helper"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/attendanceDate"
|
||||
app:layout_constraintStart_toEndOf="@+id/attendanceType"
|
||||
app:layout_constraintTop_toBottomOf="@+id/attendanceSubject"
|
||||
tools:text="Piotr Matematyczny" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/attendanceTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginVertical="0dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:textAppearance="@style/NavView.TextView.Helper"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/attendanceLessonTopic"
|
||||
tools:text="11:05" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/attendanceDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
tools:text="19.11.2018"
|
||||
android:textAppearance="@style/NavView.TextView.Helper"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/attendanceLessonTopic"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/attendanceLessonTopic" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -1,159 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="4dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/eventListItemRoot"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_rounded_8dp_outline"
|
||||
android:padding="8dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsTextView
|
||||
android:id="@+id/eventListItemClock"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="{cmd-clock}"
|
||||
tools:text=" "
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/eventListItemTeamName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventListItemStartTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
app:layout_constraintStart_toEndOf="@+id/eventListItemClock"
|
||||
app:layout_constraintTop_toBottomOf="@+id/eventListItemTeamName"
|
||||
tools:text="startTime" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventListItemAddedDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/NavView.TextView.Helper"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView9"
|
||||
tools:text="TextView" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView9"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/event_added_time"
|
||||
android:textAppearance="@style/NavView.TextView.Helper"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/eventListItemClock" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventListItemTeamName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/NavView.TextView.Helper"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="TextView" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventListItemTeacherName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textAppearance="@style/NavView.TextView.Helper"
|
||||
app:layout_constraintEnd_toStartOf="@+id/eventListItemEdit"
|
||||
app:layout_constraintStart_toEndOf="@+id/eventListItemHomework"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="TextView\nTextView" />
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsImageView
|
||||
android:id="@+id/eventListItemEdit"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:visibility="visible"
|
||||
app:iiv_color="?android:textColorSecondary"
|
||||
app:iiv_icon="cmd-pencil"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:srcCompat="@android:drawable/ic_partial_secure" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventListItemType"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintStart_toEndOf="@+id/constraintLayout"
|
||||
app:layout_constraintTop_toBottomOf="@+id/eventListItemTeacherName"
|
||||
tools:text="zadanie domowe" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventListItemTopic"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:textAppearance="@style/NavView.TextView.Medium"
|
||||
android:textIsSelectable="true"
|
||||
android:autoLink="all"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/constraintLayout"
|
||||
app:layout_constraintTop_toBottomOf="@+id/eventListItemType"
|
||||
tools:text="TextView" />
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsTextView
|
||||
android:id="@+id/eventListItemSharedBy"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
tools:text="{cmd-share-variant} przez Jan Kowalski"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/constraintLayout"
|
||||
app:layout_constraintTop_toBottomOf="@+id/eventListItemTopic" />
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsImageView
|
||||
android:id="@+id/eventListItemHomework"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:visibility="gone"
|
||||
app:iiv_color="?android:textColorSecondary"
|
||||
app:iiv_icon="cmd-home"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/eventListItemTeacherName"
|
||||
app:layout_constraintStart_toEndOf="@+id/constraintLayout"
|
||||
app:layout_constraintTop_toTopOf="@+id/eventListItemTeacherName"
|
||||
tools:src="@android:drawable/star_big_on" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</LinearLayout>
|
||||
</layout>
|
@ -1,111 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/homeworkItemCard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
app:cardElevation="4dp"
|
||||
app:cardCornerRadius="5dp"
|
||||
android:background="?selectableItemBackground"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="3dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/homeworkItemHomeworkDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="16dp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textSize="16sp"
|
||||
tools:text="homeworkDate"
|
||||
android:layout_marginEnd="16dp" />
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsTextView
|
||||
android:id="@+id/homeworkItemSharedBy"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="end"
|
||||
android:maxLines="1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/constraintLayout"
|
||||
app:layout_constraintTop_toBottomOf="@+id/eventListItemTopic"
|
||||
tools:text="{cmd-share-variant} przez" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/homeworkItemTopic"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingBottom="4dp"
|
||||
android:textSize="18sp"
|
||||
android:textIsSelectable="true"
|
||||
android:autoLink="all"
|
||||
tools:text="topic???" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/homeworkItemEdit"
|
||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
android:minHeight="0dp"
|
||||
android:text="@string/homework_edit"
|
||||
android:visibility="visible" /><!--android:minWidth="0dp"
|
||||
android:minHeight="0dp"-->
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/homeworkItemSubjectTeacher"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
tools:text="subjectName, teacherName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/homeworkItemTeamDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
tools:text="teamName addedDate" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
@ -1,71 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:gravity="center_vertical"
|
||||
android:focusable="true">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkBox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginVertical="8dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:textSize="16sp"
|
||||
tools:text="Jan Kowalski" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/accountType"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:textAppearance="@style/NavView.TextView.Helper"
|
||||
tools:text="(rodzic)" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textDetails"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:textAppearance="@style/NavView.TextView.Helper"
|
||||
tools:text="2B3T - 2019/2020" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/registerIcon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
tools:srcCompat="@drawable/login_mode_mobidziennik_web" />
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
@ -1,155 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/timetableItemCard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:layout_marginVertical="4dp"
|
||||
android:background="?selectableItemBackground"
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardElevation="4dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/timetableItemLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_rounded_8dp_outline"
|
||||
android:padding="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="12sp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/noticesItemTeacherName"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/noticesItemTeacherName">
|
||||
|
||||
<View
|
||||
android:id="@+id/timetableItemEvent3"
|
||||
android:layout_width="12sp"
|
||||
android:layout_height="12sp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:background="@color/accent"
|
||||
android:visibility="gone" />
|
||||
|
||||
<View
|
||||
android:id="@+id/timetableItemEvent2"
|
||||
android:layout_width="12sp"
|
||||
android:layout_height="12sp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:background="@color/accent"
|
||||
android:visibility="gone" />
|
||||
|
||||
<View
|
||||
android:id="@+id/timetableItemEvent1"
|
||||
android:layout_width="12sp"
|
||||
android:layout_height="12sp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:background="@color/accent"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/timetableItemClassroomName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/timetableItemSubjectName"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Small"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintStart_toEndOf="@+id/timetableItemEndTime"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="classroomName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/timetableItemTeamName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/timetableItemSubjectName"
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintBottom_toTopOf="@+id/timetableItemSubjectName"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:text="teamName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/timetableItemSubjectChange"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toStartOf="@+id/timetableItemTeamName"
|
||||
app:layout_constraintStart_toEndOf="@+id/timetableItemEndTime"
|
||||
app:layout_constraintTop_toBottomOf="@+id/timetableItemClassroomName"
|
||||
tools:text="subjectChange" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/timetableItemSubjectName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/timetableItemEndTime"
|
||||
app:layout_constraintTop_toBottomOf="@+id/timetableItemSubjectChange"
|
||||
tools:text="pracownia urządzeń techniki komputerowej" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/noticesItemTeacherName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/timetableItemSubjectName"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Small"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintStart_toEndOf="@+id/timetableItemEndTime"
|
||||
app:layout_constraintTop_toBottomOf="@+id/timetableItemSubjectName"
|
||||
tools:text="teacherName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/timetableItemEndTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:text="endTime" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/timetableItemStartTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="@+id/timetableItemEndTime"
|
||||
app:layout_constraintStart_toStartOf="@+id/timetableItemEndTime"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="startTime" />
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginVertical="8dp"
|
||||
android:text="{cmd-clock}"
|
||||
app:layout_constraintBottom_toTopOf="@+id/timetableItemEndTime"
|
||||
app:layout_constraintEnd_toEndOf="@+id/timetableItemEndTime"
|
||||
app:layout_constraintStart_toStartOf="@+id/timetableItemEndTime"
|
||||
app:layout_constraintTop_toBottomOf="@+id/timetableItemStartTime" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
@ -1,30 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<item
|
||||
android:id="@+id/action_send"
|
||||
android:orderInCategory="1000"
|
||||
android:title="@string/messages_compose_menu_send"
|
||||
android:visible="true"
|
||||
app:showAsAction="always"/>
|
||||
<item
|
||||
android:id="@+id/action_attachment"
|
||||
android:orderInCategory="900"
|
||||
android:title="@string/messages_compose_menu_attachment"
|
||||
android:visible="false"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/action_save_draft"
|
||||
android:orderInCategory="800"
|
||||
android:title="@string/messages_compose_menu_save_draft"
|
||||
android:visible="false"
|
||||
app:showAsAction="never"/>
|
||||
<item
|
||||
android:id="@+id/action_discard"
|
||||
android:orderInCategory="700"
|
||||
android:title="@string/messages_compose_menu_discard"
|
||||
android:visible="false"
|
||||
app:showAsAction="never"/>
|
||||
</menu>
|
@ -1,64 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<item
|
||||
android:id="@+id/action_refresh"
|
||||
android:orderInCategory="1000"
|
||||
android:title="@string/menu_sync"
|
||||
android:visible="false"
|
||||
app:showAsAction="always"/>
|
||||
<item
|
||||
android:id="@+id/action_mark_as_read"
|
||||
android:orderInCategory="950"
|
||||
android:title="@string/menu_mark_as_read"
|
||||
android:visible="false"
|
||||
app:showAsAction="ifRoom"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_add"
|
||||
android:orderInCategory="900"
|
||||
android:title="@string/main_menu_add"
|
||||
android:visible="false"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/action_agenda_view_type"
|
||||
android:orderInCategory="800"
|
||||
android:title="@string/main_menu_agenda_view_type"
|
||||
android:visible="false"
|
||||
app:showAsAction="ifRoom"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_sort"
|
||||
android:orderInCategory="710"
|
||||
android:title="@string/main_menu_sort_by"
|
||||
android:visible="false"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/action_grades_color_mode"
|
||||
android:orderInCategory="700"
|
||||
android:title="@string/main_menu_grades_color_mode"
|
||||
android:visible="false"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/action_grades_average"
|
||||
android:orderInCategory="680"
|
||||
android:title="@string/main_menu_grades_average"
|
||||
android:visible="false"
|
||||
app:showAsAction="ifRoom"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_reload"
|
||||
android:orderInCategory="600"
|
||||
android:title="@string/main_menu_reload"
|
||||
android:visible="false"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/action_block_timetable"
|
||||
android:orderInCategory="500"
|
||||
android:title="@string/main_menu_block_timetable"
|
||||
android:visible="false"
|
||||
app:showAsAction="never"/>
|
||||
|
||||
</menu>
|
@ -1,12 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<attr name="colorSection" format="color" />
|
||||
<attr name="cardBackgroundDimmed" format="color" />
|
||||
<attr name="cardBackgroundHighlight" format="color" />
|
||||
<attr name="timetable_lesson_bg" format="reference" />
|
||||
<attr name="timetable_lesson_cancelled_color" format="color" />
|
||||
<attr name="timetable_lesson_change_color" format="color" />
|
||||
<attr name="timetable_lesson_shifted_source_color" format="color" />
|
||||
<attr name="timetable_lesson_shifted_target_color" format="color" />
|
||||
<attr name="colorIcon" format="color" />
|
||||
</resources>
|
||||
</resources>
|
||||
|
@ -4,7 +4,6 @@
|
||||
<color name="colorPrimaryDark">#1976D2</color>
|
||||
<color name="colorPrimaryLight">#6EC6FF</color>
|
||||
<color name="colorAccent">#4caf50</color>
|
||||
<color name="colorSection">#4CAF50</color>
|
||||
|
||||
<color name="primaryTextLight">#ff101010</color>
|
||||
<color name="primaryTextDark">#fff3f3f3</color>
|
||||
|
@ -98,7 +98,6 @@
|
||||
<item name="colorPrimaryDark">#1976d2</item>
|
||||
<item name="colorPrimaryVariant">#2196f3</item>
|
||||
<item name="colorAccent">#ff3d00</item>
|
||||
<item name="colorSection">@color/colorSection</item>
|
||||
|
||||
<item name="colorFab">#4CAF50</item>
|
||||
<item name="colorFabIcon">#c8e6c9</item>
|
||||
@ -131,7 +130,6 @@
|
||||
<item name="colorPrimaryDark">#1976d2</item>
|
||||
<item name="colorPrimaryVariant">#2196f3</item>
|
||||
<item name="colorAccent">#ffb300</item>
|
||||
<item name="colorSection">@color/colorSection</item>
|
||||
|
||||
<item name="colorFab">#4CAF50</item>
|
||||
<item name="colorFabIcon">#c8e6c9</item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user