mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2025-03-25 18:30:00 +01:00
[UI] Reformat layout XMLs, cleanup NavLib code (#207)
* Remove Themes and getColorFromAttr() usage * Reformat all layout XML files * Remove <layout> from non-data binding XMLs * Cleanup unused NavLib code * Migrate NavBottomSheet to view binding, remove unused components * Add IIcon.toDrawable() extension * Make BottomSheet scrim opacity linear * Support touch events on BottomSheet scrim
This commit is contained in:
parent
10043cc62c
commit
09f0c986e0
@ -113,6 +113,7 @@ android {
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
freeCompilerArgs += "-Xcontext-receivers"
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
|
@ -24,53 +24,85 @@ import com.danimahardhika.cafebar.CafeBar
|
||||
import com.danimahardhika.cafebar.CafeBarTheme
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.jetradarmobile.snowfall.SnowfallView
|
||||
import com.mikepenz.iconics.IconicsDrawable
|
||||
import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial
|
||||
import com.mikepenz.iconics.utils.colorInt
|
||||
import com.mikepenz.iconics.utils.sizeDp
|
||||
import com.mikepenz.materialdrawer.model.*
|
||||
import com.mikepenz.materialdrawer.model.interfaces.*
|
||||
import com.mikepenz.materialdrawer.model.DividerDrawerItem
|
||||
import com.mikepenz.materialdrawer.model.ExpandableDrawerItem
|
||||
import com.mikepenz.materialdrawer.model.ProfileDrawerItem
|
||||
import com.mikepenz.materialdrawer.model.ProfileSettingDrawerItem
|
||||
import com.mikepenz.materialdrawer.model.SecondaryDrawerItem
|
||||
import com.mikepenz.materialdrawer.model.interfaces.IDrawerItem
|
||||
import com.mikepenz.materialdrawer.model.interfaces.descriptionRes
|
||||
import com.mikepenz.materialdrawer.model.interfaces.nameRes
|
||||
import com.mikepenz.materialdrawer.model.utils.hiddenInMiniDrawer
|
||||
import kotlinx.coroutines.*
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import org.greenrobot.eventbus.Subscribe
|
||||
import org.greenrobot.eventbus.ThreadMode
|
||||
import pl.droidsonroids.gif.GifDrawable
|
||||
import pl.szczodrzynski.edziennik.core.manager.AvailabilityManager.Error.Type
|
||||
import pl.szczodrzynski.edziennik.core.manager.UserActionManager
|
||||
import pl.szczodrzynski.edziennik.core.work.AppManagerDetectedEvent
|
||||
import pl.szczodrzynski.edziennik.core.work.SyncWorker
|
||||
import pl.szczodrzynski.edziennik.core.work.UpdateStateEvent
|
||||
import pl.szczodrzynski.edziennik.core.work.UpdateWorker
|
||||
import pl.szczodrzynski.edziennik.data.api.ERROR_VULCAN_API_DEPRECATED
|
||||
import pl.szczodrzynski.edziennik.data.api.edziennik.EdziennikTask
|
||||
import pl.szczodrzynski.edziennik.data.api.events.*
|
||||
import pl.szczodrzynski.edziennik.data.api.events.ApiTaskAllFinishedEvent
|
||||
import pl.szczodrzynski.edziennik.data.api.events.ApiTaskErrorEvent
|
||||
import pl.szczodrzynski.edziennik.data.api.events.ApiTaskFinishedEvent
|
||||
import pl.szczodrzynski.edziennik.data.api.events.ApiTaskProgressEvent
|
||||
import pl.szczodrzynski.edziennik.data.api.events.ApiTaskStartedEvent
|
||||
import pl.szczodrzynski.edziennik.data.api.events.ProfileListEmptyEvent
|
||||
import pl.szczodrzynski.edziennik.data.api.events.RegisterAvailabilityEvent
|
||||
import pl.szczodrzynski.edziennik.data.api.events.UserActionRequiredEvent
|
||||
import pl.szczodrzynski.edziennik.data.api.models.ApiError
|
||||
import pl.szczodrzynski.edziennik.data.api.szkolny.response.Update
|
||||
import pl.szczodrzynski.edziennik.data.db.entity.Message
|
||||
import pl.szczodrzynski.edziennik.data.db.entity.Profile
|
||||
import pl.szczodrzynski.edziennik.data.enums.FeatureType
|
||||
import pl.szczodrzynski.edziennik.databinding.ActivitySzkolnyBinding
|
||||
import pl.szczodrzynski.edziennik.ext.*
|
||||
import pl.szczodrzynski.edziennik.core.work.AppManagerDetectedEvent
|
||||
import pl.szczodrzynski.edziennik.core.work.SyncWorker
|
||||
import pl.szczodrzynski.edziennik.core.work.UpdateStateEvent
|
||||
import pl.szczodrzynski.edziennik.core.work.UpdateWorker
|
||||
import pl.szczodrzynski.edziennik.ui.main.MainSnackbar
|
||||
import pl.szczodrzynski.edziennik.data.enums.NavTarget
|
||||
import pl.szczodrzynski.edziennik.data.enums.NavTargetLocation
|
||||
import pl.szczodrzynski.edziennik.databinding.ActivitySzkolnyBinding
|
||||
import pl.szczodrzynski.edziennik.ext.JsonObject
|
||||
import pl.szczodrzynski.edziennik.ext.getAppData
|
||||
import pl.szczodrzynski.edziennik.ext.getEnum
|
||||
import pl.szczodrzynski.edziennik.ext.getIntOrNull
|
||||
import pl.szczodrzynski.edziennik.ext.hasUIFeature
|
||||
import pl.szczodrzynski.edziennik.ext.isBeforeYear
|
||||
import pl.szczodrzynski.edziennik.ext.keys
|
||||
import pl.szczodrzynski.edziennik.ext.putExtras
|
||||
import pl.szczodrzynski.edziennik.ext.resolveAttr
|
||||
import pl.szczodrzynski.edziennik.ext.resolveString
|
||||
import pl.szczodrzynski.edziennik.ext.setMessage
|
||||
import pl.szczodrzynski.edziennik.ext.setTintColor
|
||||
import pl.szczodrzynski.edziennik.ext.shouldArchive
|
||||
import pl.szczodrzynski.edziennik.ext.takePositive
|
||||
import pl.szczodrzynski.edziennik.ext.toDrawable
|
||||
import pl.szczodrzynski.edziennik.ext.toImageHolder
|
||||
import pl.szczodrzynski.edziennik.ui.dialogs.ChangelogDialog
|
||||
import pl.szczodrzynski.edziennik.ui.dialogs.ErrorDetailsDialog
|
||||
import pl.szczodrzynski.edziennik.ui.dialogs.settings.ProfileConfigDialog
|
||||
import pl.szczodrzynski.edziennik.ui.dialogs.sync.RegisterUnavailableDialog
|
||||
import pl.szczodrzynski.edziennik.ui.dialogs.sync.ServerMessageDialog
|
||||
import pl.szczodrzynski.edziennik.ui.dialogs.sync.SyncViewListDialog
|
||||
import pl.szczodrzynski.edziennik.ui.dialogs.sync.UpdateAvailableDialog
|
||||
import pl.szczodrzynski.edziennik.ui.dialogs.sync.UpdateProgressDialog
|
||||
import pl.szczodrzynski.edziennik.ui.dialogs.ErrorDetailsDialog
|
||||
import pl.szczodrzynski.edziennik.ui.main.ErrorSnackbar
|
||||
import pl.szczodrzynski.edziennik.ui.event.EventManualDialog
|
||||
import pl.szczodrzynski.edziennik.ui.login.LoginActivity
|
||||
import pl.szczodrzynski.edziennik.ui.main.ErrorSnackbar
|
||||
import pl.szczodrzynski.edziennik.ui.main.MainSnackbar
|
||||
import pl.szczodrzynski.edziennik.ui.messages.list.MessagesFragment
|
||||
import pl.szczodrzynski.edziennik.ui.timetable.TimetableFragment
|
||||
import pl.szczodrzynski.edziennik.utils.*
|
||||
import pl.szczodrzynski.edziennik.core.manager.AvailabilityManager.Error.Type
|
||||
import pl.szczodrzynski.edziennik.core.manager.UserActionManager
|
||||
import pl.szczodrzynski.edziennik.utils.BigNightUtil
|
||||
import pl.szczodrzynski.edziennik.utils.PausedNavigationData
|
||||
import pl.szczodrzynski.edziennik.utils.Utils
|
||||
import pl.szczodrzynski.edziennik.utils.appManagerIntentList
|
||||
import pl.szczodrzynski.edziennik.utils.models.Date
|
||||
import pl.szczodrzynski.navlib.*
|
||||
import pl.szczodrzynski.navlib.NavView
|
||||
import pl.szczodrzynski.navlib.bottomsheet.NavBottomSheet
|
||||
import pl.szczodrzynski.navlib.bottomsheet.items.BottomSheetPrimaryItem
|
||||
import pl.szczodrzynski.navlib.bottomsheet.items.BottomSheetSeparatorItem
|
||||
@ -154,7 +186,7 @@ class MainActivity : AppCompatActivity(), CoroutineScope {
|
||||
b.navView.apply {
|
||||
drawer.init(this@MainActivity)
|
||||
|
||||
val statusBarColor = getColorFromAttr(context, android.R.attr.colorBackground)
|
||||
val statusBarColor = android.R.attr.colorBackground.resolveAttr(context)
|
||||
// fix for setting status bar color to window color, outside of navlib
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
window.statusBarColor = statusBarColor
|
||||
@ -176,15 +208,12 @@ class MainActivity : AppCompatActivity(), CoroutineScope {
|
||||
enable = false
|
||||
enableMenuControls = false
|
||||
fabEnable = false
|
||||
fabExtendable = true
|
||||
fabExtended = false
|
||||
fabGravity = Gravity.END
|
||||
}
|
||||
|
||||
bottomSheet.apply {
|
||||
removeAllItems()
|
||||
toggleGroupEnabled = false
|
||||
textInputEnabled = false
|
||||
onCloseListener = {
|
||||
if (!app.config.ui.bottomSheetOpened)
|
||||
app.config.ui.bottomSheetOpened = true
|
||||
@ -332,13 +361,9 @@ class MainActivity : AppCompatActivity(), CoroutineScope {
|
||||
if (app.config.appRateSnackbarTime != 0L && app.config.appRateSnackbarTime <= System.currentTimeMillis()) {
|
||||
navView.coordinator.postDelayed({
|
||||
CafeBar.builder(this)
|
||||
.theme(CafeBarTheme.Custom(getColorFromAttr(this, R.attr.colorSurfaceInverse)))
|
||||
.theme(CafeBarTheme.Custom(R.attr.colorSurfaceInverse.resolveAttr(this)))
|
||||
.content(R.string.rate_snackbar_text)
|
||||
.icon(IconicsDrawable(this).apply {
|
||||
icon = CommunityMaterial.Icon3.cmd_star_outline
|
||||
sizeDp = 24
|
||||
colorInt = Themes.getPrimaryTextColor(this@MainActivity)
|
||||
})
|
||||
.icon(CommunityMaterial.Icon3.cmd_star_outline.toDrawable())
|
||||
.positiveText(R.string.rate_snackbar_positive)
|
||||
.positiveColor(-0xb350b0)
|
||||
.negativeText(R.string.rate_snackbar_negative)
|
||||
@ -941,7 +966,6 @@ class MainActivity : AppCompatActivity(), CoroutineScope {
|
||||
swipeRefreshLayout.isEnabled = false
|
||||
bottomSheet.close()
|
||||
bottomSheet.removeAllContextual()
|
||||
bottomSheet.toggleGroupEnabled = false
|
||||
drawer.close()
|
||||
if (drawer.getSelection() != navTarget.id)
|
||||
drawer.setSelection(navTarget.id, fireOnClick = false)
|
||||
@ -1029,7 +1053,7 @@ class MainActivity : AppCompatActivity(), CoroutineScope {
|
||||
else
|
||||
getString(R.string.app_task_format, getString(navTarget.nameRes)),
|
||||
bm,
|
||||
getColorFromAttr(this, R.attr.colorPrimary)
|
||||
R.attr.colorPrimary.resolveAttr(this)
|
||||
)
|
||||
setTaskDescription(taskDesc)
|
||||
}
|
||||
|
@ -6,10 +6,7 @@ package pl.szczodrzynski.edziennik.core.manager
|
||||
|
||||
import android.widget.TextView
|
||||
import androidx.core.view.isVisible
|
||||
import com.mikepenz.iconics.IconicsDrawable
|
||||
import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial
|
||||
import com.mikepenz.iconics.utils.colorInt
|
||||
import com.mikepenz.iconics.utils.sizeDp
|
||||
import com.mikepenz.iconics.view.IconicsTextView
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
@ -21,6 +18,7 @@ import pl.szczodrzynski.edziennik.ext.concat
|
||||
import pl.szczodrzynski.edziennik.ext.join
|
||||
import pl.szczodrzynski.edziennik.ext.resolveColor
|
||||
import pl.szczodrzynski.edziennik.ext.startCoroutineTimer
|
||||
import pl.szczodrzynski.edziennik.ext.toDrawable
|
||||
import kotlin.coroutines.CoroutineContext
|
||||
|
||||
class EventManager(val app: App) : CoroutineScope {
|
||||
@ -68,11 +66,12 @@ class EventManager(val app: App) : CoroutineScope {
|
||||
title.setCompoundDrawables(
|
||||
null,
|
||||
null,
|
||||
if (event.isDone) IconicsDrawable(title.context).apply {
|
||||
icon = CommunityMaterial.Icon.cmd_check
|
||||
colorInt = doneIconColor ?: R.color.md_green_500.resolveColor(title.context)
|
||||
sizeDp = 24
|
||||
} else null,
|
||||
if (event.isDone)
|
||||
CommunityMaterial.Icon.cmd_check.toDrawable(
|
||||
title.context,
|
||||
doneIconColor ?: R.color.md_green_500.resolveColor(title.context)
|
||||
)
|
||||
else null,
|
||||
null
|
||||
)
|
||||
}
|
||||
|
@ -20,18 +20,20 @@ import androidx.core.widget.addTextChangedListener
|
||||
import com.google.android.material.button.MaterialButton
|
||||
import com.google.android.material.button.MaterialButtonToggleGroup
|
||||
import com.google.android.material.textfield.TextInputLayout
|
||||
import com.mikepenz.iconics.IconicsDrawable
|
||||
import com.mikepenz.iconics.typeface.IIcon
|
||||
import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial
|
||||
import com.mikepenz.iconics.utils.sizeDp
|
||||
import pl.szczodrzynski.edziennik.*
|
||||
import pl.szczodrzynski.edziennik.App
|
||||
import pl.szczodrzynski.edziennik.core.manager.TextStylingManager.HtmlMode.COMPATIBLE
|
||||
import pl.szczodrzynski.edziennik.core.manager.TextStylingManager.HtmlMode.MARKDOWN
|
||||
import pl.szczodrzynski.edziennik.core.manager.TextStylingManager.HtmlMode.ORIGINAL
|
||||
import pl.szczodrzynski.edziennik.core.manager.TextStylingManager.HtmlMode.SIMPLE
|
||||
import pl.szczodrzynski.edziennik.ext.attachToastHint
|
||||
import pl.szczodrzynski.edziennik.ext.hasSet
|
||||
import pl.szczodrzynski.edziennik.ext.replaceSpan
|
||||
import pl.szczodrzynski.edziennik.ext.toDrawable
|
||||
import pl.szczodrzynski.edziennik.ui.dialogs.StyledTextDialog
|
||||
import pl.szczodrzynski.edziennik.utils.TextInputKeyboardEdit
|
||||
import pl.szczodrzynski.edziennik.utils.html.BetterHtml
|
||||
import pl.szczodrzynski.edziennik.core.manager.TextStylingManager.HtmlMode.*
|
||||
import pl.szczodrzynski.edziennik.utils.span.BoldSpan
|
||||
import pl.szczodrzynski.edziennik.utils.span.ItalicSpan
|
||||
|
||||
@ -288,10 +290,7 @@ class TextStylingManager(private val app: App) {
|
||||
onShowListener: ((tag: String) -> Unit)? = null,
|
||||
onDismissListener: ((tag: String) -> Unit)? = null,
|
||||
) {
|
||||
textLayout.endIconDrawable = IconicsDrawable(
|
||||
activity,
|
||||
CommunityMaterial.Icon3.cmd_open_in_new
|
||||
).apply { sizeDp = 24 }
|
||||
textLayout.endIconDrawable = CommunityMaterial.Icon3.cmd_open_in_new.toDrawable(activity)
|
||||
textLayout.setEndIconOnClickListener {
|
||||
StyledTextDialog(
|
||||
activity,
|
||||
|
@ -5,18 +5,17 @@ import android.app.PendingIntent
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import androidx.core.app.NotificationCompat
|
||||
import com.mikepenz.iconics.IconicsDrawable
|
||||
import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial
|
||||
import com.mikepenz.iconics.utils.colorRes
|
||||
import pl.szczodrzynski.edziennik.App
|
||||
import pl.szczodrzynski.edziennik.MainActivity
|
||||
import pl.szczodrzynski.edziennik.R
|
||||
import pl.szczodrzynski.edziennik.data.enums.NavTarget
|
||||
import pl.szczodrzynski.edziennik.data.enums.NotificationType
|
||||
import pl.szczodrzynski.edziennik.ext.Intent
|
||||
import pl.szczodrzynski.edziennik.ext.asBoldSpannable
|
||||
import pl.szczodrzynski.edziennik.ext.concat
|
||||
import pl.szczodrzynski.edziennik.ext.pendingIntentFlag
|
||||
import pl.szczodrzynski.edziennik.data.enums.NavTarget
|
||||
import pl.szczodrzynski.edziennik.ext.toDrawable
|
||||
import pl.szczodrzynski.edziennik.utils.models.Time
|
||||
import pl.szczodrzynski.edziennik.data.db.entity.Notification as AppNotification
|
||||
|
||||
@ -100,10 +99,11 @@ class PostNotifications(val app: App, nList: List<AppNotification>) {
|
||||
.setContentText(buildSummaryText(summaryCounts))
|
||||
.setTicker(newNotificationsText)
|
||||
.setSmallIcon(R.drawable.ic_notification)
|
||||
.setLargeIcon(IconicsDrawable(app).apply {
|
||||
icon = CommunityMaterial.Icon.cmd_bell_ring_outline
|
||||
colorRes = R.color.colorPrimary
|
||||
}.toBitmap())
|
||||
.setLargeIcon(
|
||||
CommunityMaterial.Icon.cmd_bell_ring_outline
|
||||
.toDrawable(app, colorAttr = R.attr.colorPrimary)
|
||||
.toBitmap()
|
||||
)
|
||||
.setStyle(NotificationCompat.InboxStyle()
|
||||
.also {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
@ -134,9 +134,11 @@ class PostNotifications(val app: App, nList: List<AppNotification>) {
|
||||
.setSubText(if (it.type == NotificationType.SERVER_MESSAGE) null else it.title)
|
||||
.setTicker("${it.profileName}: ${it.title}")
|
||||
.setSmallIcon(R.drawable.ic_notification)
|
||||
.setLargeIcon(IconicsDrawable(app, it.type.icon).apply {
|
||||
colorRes = R.color.colorPrimary
|
||||
}.toBitmap())
|
||||
.setLargeIcon(
|
||||
it.type.icon
|
||||
.toDrawable(app, colorAttr = R.attr.colorPrimary)
|
||||
.toBitmap()
|
||||
)
|
||||
.setStyle(NotificationCompat.BigTextStyle()
|
||||
.bigText(it.textLong ?: it.text))
|
||||
.setWhen(it.addedDate)
|
||||
@ -160,10 +162,11 @@ class PostNotifications(val app: App, nList: List<AppNotification>) {
|
||||
.setContentText(buildSummaryText(summaryCounts))
|
||||
.setTicker(newNotificationsText)
|
||||
.setSmallIcon(R.drawable.ic_notification)
|
||||
.setLargeIcon(IconicsDrawable(app).apply {
|
||||
icon = CommunityMaterial.Icon.cmd_bell_ring_outline
|
||||
colorRes = R.color.colorPrimary
|
||||
}.toBitmap())
|
||||
.setLargeIcon(
|
||||
CommunityMaterial.Icon.cmd_bell_ring_outline
|
||||
.toDrawable(app, colorAttr = R.attr.colorPrimary)
|
||||
.toBitmap()
|
||||
)
|
||||
.addDefaults()
|
||||
.setGroupSummary(true)
|
||||
.setContentIntent(summaryIntent)
|
||||
|
@ -10,10 +10,22 @@ import android.graphics.PorterDuff
|
||||
import android.graphics.PorterDuffColorFilter
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.util.TypedValue
|
||||
import androidx.annotation.*
|
||||
import android.view.View
|
||||
import androidx.annotation.AttrRes
|
||||
import androidx.annotation.ColorInt
|
||||
import androidx.annotation.ColorRes
|
||||
import androidx.annotation.Dimension
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.annotation.StyleRes
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.content.res.ResourcesCompat
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.mikepenz.iconics.IconicsDrawable
|
||||
import com.mikepenz.iconics.typeface.IIcon
|
||||
import com.mikepenz.iconics.utils.colorInt
|
||||
import com.mikepenz.iconics.utils.sizeDp
|
||||
import pl.szczodrzynski.edziennik.R
|
||||
import pl.szczodrzynski.edziennik.ui.base.dialog.BaseDialog
|
||||
import pl.szczodrzynski.navlib.ImageHolder
|
||||
|
||||
fun colorFromName(name: String?): Int {
|
||||
@ -108,3 +120,49 @@ fun Drawable.setTintColor(color: Int): Drawable {
|
||||
}
|
||||
|
||||
fun IIcon.toImageHolder() = ImageHolder(this)
|
||||
|
||||
fun IIcon.toDrawable(
|
||||
context: Context,
|
||||
colorInt: Int? = null,
|
||||
colorRes: Int? = null,
|
||||
colorAttr: Int = R.attr.colorOnBackground,
|
||||
sizeDp: Int = 24,
|
||||
) = IconicsDrawable(context, this).apply {
|
||||
this.colorInt =
|
||||
colorInt
|
||||
?: colorRes?.resolveColor(context)
|
||||
?: colorAttr.resolveAttr(context)
|
||||
this.sizeDp = sizeDp
|
||||
}
|
||||
|
||||
context(Context)
|
||||
fun IIcon.toDrawable(
|
||||
colorInt: Int? = null,
|
||||
colorRes: Int? = null,
|
||||
colorAttr: Int = R.attr.colorOnBackground,
|
||||
sizeDp: Int = 24,
|
||||
) = toDrawable(applicationContext, colorInt, colorRes, colorAttr, sizeDp)
|
||||
|
||||
context(Fragment)
|
||||
fun IIcon.toDrawable(
|
||||
colorInt: Int? = null,
|
||||
colorRes: Int? = null,
|
||||
colorAttr: Int = R.attr.colorOnBackground,
|
||||
sizeDp: Int = 24,
|
||||
) = toDrawable(requireContext(), colorInt, colorRes, colorAttr, sizeDp)
|
||||
|
||||
context(BaseDialog<*>)
|
||||
fun IIcon.toDrawable(
|
||||
colorInt: Int? = null,
|
||||
colorRes: Int? = null,
|
||||
colorAttr: Int = R.attr.colorOnBackground,
|
||||
sizeDp: Int = 24,
|
||||
) = toDrawable(activity, colorInt, colorRes, colorAttr, sizeDp)
|
||||
|
||||
context(View)
|
||||
fun IIcon.toDrawable(
|
||||
colorInt: Int? = null,
|
||||
colorRes: Int? = null,
|
||||
colorAttr: Int = R.attr.colorOnBackground,
|
||||
sizeDp: Int = 24,
|
||||
) = toDrawable(context, colorInt, colorRes, colorAttr, sizeDp)
|
||||
|
@ -20,7 +20,6 @@ import pl.szczodrzynski.edziennik.data.enums.FeatureType
|
||||
import pl.szczodrzynski.edziennik.utils.ProfileImageHolder
|
||||
import pl.szczodrzynski.edziennik.utils.models.Date
|
||||
import pl.szczodrzynski.navlib.ImageHolder
|
||||
import pl.szczodrzynski.navlib.getDrawableFromRes
|
||||
import timber.log.Timber
|
||||
|
||||
// TODO refactor Data* fields and make the receiver non-nullable
|
||||
@ -89,7 +88,7 @@ fun Profile.shouldArchive(): Boolean {
|
||||
|
||||
fun Profile.getDrawable(context: Context): Drawable {
|
||||
if (archived) {
|
||||
return context.getDrawableFromRes(R.drawable.profile_archived).also {
|
||||
return R.drawable.profile_archived.resolveDrawable(context).also {
|
||||
it.colorFilter = PorterDuffColorFilter(colorFromName(name), PorterDuff.Mode.DST_OVER)
|
||||
}
|
||||
}
|
||||
@ -106,7 +105,7 @@ fun Profile.getDrawable(context: Context): Drawable {
|
||||
}
|
||||
}
|
||||
|
||||
return context.getDrawableFromRes(R.drawable.profile).also {
|
||||
return R.drawable.profile.resolveDrawable(context).also {
|
||||
it.colorFilter = PorterDuffColorFilter(colorFromName(name), PorterDuff.Mode.DST_OVER)
|
||||
}
|
||||
}
|
||||
|
@ -8,12 +8,9 @@ import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.databinding.ViewDataBinding
|
||||
import androidx.viewbinding.ViewBinding
|
||||
import com.applandeo.materialcalendarview.EventDay
|
||||
import com.mikepenz.iconics.IconicsDrawable
|
||||
import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial
|
||||
import com.mikepenz.iconics.utils.colorInt
|
||||
import com.mikepenz.iconics.utils.sizeDp
|
||||
import eu.szkolny.font.SzkolnyFont
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.delay
|
||||
@ -25,13 +22,14 @@ import pl.szczodrzynski.edziennik.data.db.entity.Profile
|
||||
import pl.szczodrzynski.edziennik.data.enums.MetadataType
|
||||
import pl.szczodrzynski.edziennik.databinding.FragmentAgendaCalendarBinding
|
||||
import pl.szczodrzynski.edziennik.databinding.FragmentAgendaDefaultBinding
|
||||
import pl.szczodrzynski.edziennik.ext.toDrawable
|
||||
import pl.szczodrzynski.edziennik.ui.base.fragment.BaseFragment
|
||||
import pl.szczodrzynski.edziennik.ui.dialogs.settings.AgendaConfigDialog
|
||||
import pl.szczodrzynski.edziennik.ui.event.EventManualDialog
|
||||
import pl.szczodrzynski.edziennik.utils.models.Date
|
||||
import pl.szczodrzynski.navlib.bottomsheet.items.BottomSheetPrimaryItem
|
||||
|
||||
class AgendaFragment : BaseFragment<ViewDataBinding, MainActivity>(
|
||||
class AgendaFragment : BaseFragment<ViewBinding, MainActivity>(
|
||||
inflater = null,
|
||||
) {
|
||||
|
||||
@ -135,11 +133,8 @@ class AgendaFragment : BaseFragment<ViewDataBinding, MainActivity>(
|
||||
val unreadEventDates = mutableSetOf<Int>()
|
||||
|
||||
events.forEach { event ->
|
||||
val eventIcon = IconicsDrawable(activity).apply {
|
||||
icon = CommunityMaterial.Icon.cmd_checkbox_blank_circle
|
||||
sizeDp = 10
|
||||
colorInt = event.eventColor
|
||||
}
|
||||
val eventIcon = CommunityMaterial.Icon.cmd_checkbox_blank_circle
|
||||
.toDrawable(event.eventColor, sizeDp = 10)
|
||||
|
||||
dayList.add(EventDay(event.startTimeCalendar, eventIcon))
|
||||
|
||||
|
@ -11,7 +11,6 @@ import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import java.util.List;
|
||||
@ -48,7 +47,7 @@ public class AnnouncementsAdapter extends RecyclerView.Adapter<AnnouncementsAdap
|
||||
@NonNull
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
return new ViewHolder(DataBindingUtil.inflate(LayoutInflater.from(parent.getContext()), R.layout.row_announcements_item, parent, false));
|
||||
return new ViewHolder(RowAnnouncementsItemBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,7 +1,5 @@
|
||||
package pl.szczodrzynski.edziennik.ui.announcements;
|
||||
|
||||
import static androidx.recyclerview.widget.RecyclerView.SCROLL_STATE_IDLE;
|
||||
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
@ -11,7 +9,6 @@ import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
@ -34,7 +31,6 @@ import pl.szczodrzynski.edziennik.data.db.full.AnnouncementFull;
|
||||
import pl.szczodrzynski.edziennik.databinding.DialogAnnouncementBinding;
|
||||
import pl.szczodrzynski.edziennik.databinding.FragmentAnnouncementsBinding;
|
||||
import pl.szczodrzynski.edziennik.utils.SimpleDividerItemDecoration;
|
||||
import pl.szczodrzynski.edziennik.utils.Themes;
|
||||
import pl.szczodrzynski.navlib.bottomsheet.items.BottomSheetPrimaryItem;
|
||||
|
||||
public class AnnouncementsFragment extends Fragment {
|
||||
@ -50,7 +46,7 @@ public class AnnouncementsFragment extends Fragment {
|
||||
return null;
|
||||
app = (App) activity.getApplication();
|
||||
// activity, context and profile is valid
|
||||
b = DataBindingUtil.inflate(inflater, R.layout.fragment_announcements, container, false);
|
||||
b = FragmentAnnouncementsBinding.inflate(inflater, container, false);
|
||||
return b.getRoot();
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,6 @@ import pl.szczodrzynski.edziennik.ui.attendance.AttendanceAdapter.Companion.STAT
|
||||
import pl.szczodrzynski.edziennik.ui.attendance.AttendanceView
|
||||
import pl.szczodrzynski.edziennik.ui.attendance.models.AttendanceDayRange
|
||||
import pl.szczodrzynski.edziennik.ui.grades.viewholder.BindableViewHolder
|
||||
import pl.szczodrzynski.edziennik.utils.Themes
|
||||
|
||||
class DayRangeViewHolder(
|
||||
inflater: LayoutInflater,
|
||||
|
@ -26,7 +26,6 @@ import pl.szczodrzynski.edziennik.ui.attendance.AttendanceAdapter.Companion.STAT
|
||||
import pl.szczodrzynski.edziennik.ui.attendance.AttendanceView
|
||||
import pl.szczodrzynski.edziennik.ui.attendance.models.AttendanceMonth
|
||||
import pl.szczodrzynski.edziennik.ui.grades.viewholder.BindableViewHolder
|
||||
import pl.szczodrzynski.edziennik.utils.Themes
|
||||
import pl.szczodrzynski.edziennik.utils.models.Date
|
||||
|
||||
class MonthViewHolder(
|
||||
|
@ -19,7 +19,7 @@ import pl.szczodrzynski.edziennik.ext.setMessage
|
||||
import kotlin.coroutines.CoroutineContext
|
||||
|
||||
abstract class BaseDialog<I : Any>(
|
||||
protected val activity: AppCompatActivity,
|
||||
internal val activity: AppCompatActivity,
|
||||
protected val onShowListener: ((tag: String) -> Unit)? = null,
|
||||
protected val onDismissListener: ((tag: String) -> Unit)? = null,
|
||||
) : CoroutineScope {
|
||||
|
@ -10,9 +10,7 @@ import android.view.ViewGroup
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.google.android.material.chip.Chip
|
||||
import com.mikepenz.iconics.IconicsDrawable
|
||||
import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial
|
||||
import com.mikepenz.iconics.utils.sizeDp
|
||||
import eu.szkolny.font.SzkolnyFont
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
@ -24,8 +22,8 @@ import pl.szczodrzynski.edziennik.data.db.entity.Message
|
||||
import pl.szczodrzynski.edziennik.databinding.AttachmentListItemBinding
|
||||
import pl.szczodrzynski.edziennik.ext.onClick
|
||||
import pl.szczodrzynski.edziennik.ext.onLongClick
|
||||
import pl.szczodrzynski.edziennik.ext.toDrawable
|
||||
import pl.szczodrzynski.edziennik.utils.Utils
|
||||
import pl.szczodrzynski.navlib.colorAttr
|
||||
import kotlin.coroutines.CoroutineContext
|
||||
|
||||
class AttachmentAdapter(
|
||||
@ -80,16 +78,8 @@ class AttachmentAdapter(
|
||||
} ?: fileName
|
||||
}
|
||||
|
||||
b.chip.chipIcon = IconicsDrawable(context).apply {
|
||||
icon = attachmentIcon
|
||||
colorAttr(context, R.attr.colorOnSurface)
|
||||
sizeDp = 24
|
||||
}
|
||||
b.chip.closeIcon = IconicsDrawable(context).apply {
|
||||
icon = CommunityMaterial.Icon.cmd_check
|
||||
colorAttr(context, R.attr.colorOnSurface)
|
||||
sizeDp = 24
|
||||
}
|
||||
b.chip.chipIcon = attachmentIcon.toDrawable(context)
|
||||
b.chip.closeIcon = CommunityMaterial.Icon.cmd_check.toDrawable(context)
|
||||
|
||||
b.chip.isCloseIconVisible = item.isDownloaded && !item.isDownloading
|
||||
// prevent progress bar flickering
|
||||
|
@ -6,14 +6,12 @@ package pl.szczodrzynski.edziennik.ui.base.views
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import com.mikepenz.iconics.IconicsDrawable
|
||||
import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial
|
||||
import com.mikepenz.iconics.utils.colorInt
|
||||
import com.mikepenz.iconics.utils.sizeDp
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
import pl.szczodrzynski.edziennik.data.db.AppDb
|
||||
import pl.szczodrzynski.edziennik.data.db.entity.EventType
|
||||
import pl.szczodrzynski.edziennik.ext.toDrawable
|
||||
import pl.szczodrzynski.edziennik.utils.TextInputDropDown
|
||||
|
||||
class EventTypeDropdown : TextInputDropDown {
|
||||
@ -37,11 +35,12 @@ class EventTypeDropdown : TextInputDropDown {
|
||||
.sortedBy { it.order }
|
||||
|
||||
list += types.map {
|
||||
Item(it.id, it.name, tag = it, icon = IconicsDrawable(context).apply {
|
||||
icon = CommunityMaterial.Icon.cmd_circle
|
||||
sizeDp = 24
|
||||
colorInt = it.color
|
||||
})
|
||||
Item(
|
||||
id = it.id,
|
||||
text = it.name,
|
||||
tag = it,
|
||||
icon = CommunityMaterial.Icon.cmd_circle.toDrawable(it.color),
|
||||
)
|
||||
}
|
||||
|
||||
list
|
||||
|
@ -9,7 +9,6 @@ import android.util.AttributeSet
|
||||
import android.widget.TextView
|
||||
import com.google.android.material.button.MaterialButton
|
||||
import com.mikepenz.iconics.IconicsDrawable
|
||||
import com.mikepenz.iconics.utils.sizePx
|
||||
import pl.szczodrzynski.edziennik.R
|
||||
|
||||
class IconicsMaterialButton @JvmOverloads constructor(
|
||||
|
@ -4,7 +4,6 @@ import android.graphics.Color
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import pl.szczodrzynski.edziennik.App
|
||||
import pl.szczodrzynski.edziennik.App.Companion.profileId
|
||||
import pl.szczodrzynski.edziennik.MainActivity
|
||||
@ -13,8 +12,8 @@ import pl.szczodrzynski.edziennik.data.db.entity.Notice
|
||||
import pl.szczodrzynski.edziennik.data.db.full.NoticeFull
|
||||
import pl.szczodrzynski.edziennik.data.enums.MetadataType
|
||||
import pl.szczodrzynski.edziennik.databinding.FragmentBehaviourBinding
|
||||
import pl.szczodrzynski.edziennik.ext.resolveAttr
|
||||
import pl.szczodrzynski.edziennik.ui.base.fragment.BaseFragment
|
||||
import pl.szczodrzynski.edziennik.utils.Themes.getPrimaryTextColor
|
||||
import java.util.Locale
|
||||
|
||||
class BehaviourFragment : BaseFragment<FragmentBehaviourBinding, MainActivity>(
|
||||
@ -93,7 +92,7 @@ class BehaviourFragment : BaseFragment<FragmentBehaviourBinding, MainActivity>(
|
||||
if (warningsCount >= 3) {
|
||||
b.noticesWarningsCount.setTextColor(Color.RED)
|
||||
} else {
|
||||
b.noticesWarningsCount.setTextColor(getPrimaryTextColor(activity))
|
||||
b.noticesWarningsCount.setTextColor(android.R.attr.textColorPrimary.resolveAttr(activity))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -12,17 +12,14 @@ import android.widget.TextView
|
||||
import androidx.cardview.widget.CardView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.google.android.material.color.MaterialColors
|
||||
import com.mikepenz.iconics.IconicsDrawable
|
||||
import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial
|
||||
import com.mikepenz.iconics.utils.colorInt
|
||||
import com.mikepenz.iconics.utils.colorRes
|
||||
import com.mikepenz.iconics.utils.sizeDp
|
||||
import eu.szkolny.font.SzkolnyFont
|
||||
import pl.szczodrzynski.edziennik.App
|
||||
import pl.szczodrzynski.edziennik.R
|
||||
import pl.szczodrzynski.edziennik.data.db.entity.Notice
|
||||
import pl.szczodrzynski.edziennik.data.db.full.NoticeFull
|
||||
import pl.szczodrzynski.edziennik.ext.resolveColor
|
||||
import pl.szczodrzynski.edziennik.ext.toDrawable
|
||||
import pl.szczodrzynski.edziennik.utils.BetterLink
|
||||
import pl.szczodrzynski.edziennik.utils.Utils.bs
|
||||
import pl.szczodrzynski.edziennik.utils.models.Date
|
||||
@ -53,24 +50,39 @@ class NoticesAdapter//getting the context and product list with constructor
|
||||
|
||||
if (notice.type == Notice.TYPE_POSITIVE) {
|
||||
holder.noticesItemType.setImageDrawable(
|
||||
IconicsDrawable(context, CommunityMaterial.Icon3.cmd_plus_circle_outline).apply {
|
||||
colorInt = MaterialColors.harmonizeWithPrimary(context, R.color.md_green_600.resolveColor(context))
|
||||
sizeDp = 36
|
||||
}
|
||||
CommunityMaterial.Icon3.cmd_plus_circle_outline
|
||||
.toDrawable(
|
||||
context = context,
|
||||
colorInt = MaterialColors.harmonizeWithPrimary(
|
||||
context,
|
||||
R.color.md_green_600.resolveColor(context)
|
||||
),
|
||||
sizeDp = 36
|
||||
)
|
||||
)
|
||||
} else if (notice.type == Notice.TYPE_NEGATIVE) {
|
||||
holder.noticesItemType.setImageDrawable(
|
||||
IconicsDrawable(context, CommunityMaterial.Icon.cmd_alert_decagram_outline).apply {
|
||||
colorInt = MaterialColors.harmonizeWithPrimary(context, R.color.md_red_600.resolveColor(context))
|
||||
sizeDp = 36
|
||||
}
|
||||
CommunityMaterial.Icon.cmd_alert_decagram_outline
|
||||
.toDrawable(
|
||||
context = context,
|
||||
colorInt = MaterialColors.harmonizeWithPrimary(
|
||||
context,
|
||||
R.color.md_red_600.resolveColor(context)
|
||||
),
|
||||
sizeDp = 36,
|
||||
)
|
||||
)
|
||||
} else {
|
||||
holder.noticesItemType.setImageDrawable(
|
||||
IconicsDrawable(context, SzkolnyFont.Icon.szf_message_processing_outline).apply {
|
||||
colorInt = MaterialColors.harmonizeWithPrimary(context, R.color.md_blue_500.resolveColor(context))
|
||||
sizeDp = 36
|
||||
}
|
||||
SzkolnyFont.Icon.szf_message_processing_outline
|
||||
.toDrawable(
|
||||
context = context,
|
||||
colorInt = MaterialColors.harmonizeWithPrimary(
|
||||
context,
|
||||
R.color.md_blue_500.resolveColor(context)
|
||||
),
|
||||
sizeDp = 36,
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,6 @@ import java.util.regex.Pattern;
|
||||
|
||||
import pl.szczodrzynski.edziennik.App;
|
||||
import pl.szczodrzynski.edziennik.R;
|
||||
import pl.szczodrzynski.edziennik.utils.Themes;
|
||||
import timber.log.Timber;
|
||||
|
||||
public class DebugFragment extends Fragment {
|
||||
|
@ -24,7 +24,6 @@ import pl.szczodrzynski.edziennik.ui.grades.GradeView
|
||||
import pl.szczodrzynski.edziennik.ui.grades.GradesAdapter
|
||||
import pl.szczodrzynski.edziennik.ui.grades.GradesAdapter.Companion.STATE_CLOSED
|
||||
import pl.szczodrzynski.edziennik.ui.grades.models.GradesSubject
|
||||
import pl.szczodrzynski.edziennik.utils.Themes
|
||||
|
||||
class SubjectViewHolder(
|
||||
inflater: LayoutInflater,
|
||||
|
@ -8,12 +8,14 @@ import android.graphics.BitmapFactory
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.jetradarmobile.snowfall.SnowfallView
|
||||
import com.mikepenz.iconics.IconicsDrawable
|
||||
import com.mikepenz.iconics.utils.colorInt
|
||||
import com.mikepenz.iconics.utils.sizeDp
|
||||
import eu.szkolny.font.SzkolnyFont
|
||||
import kotlinx.coroutines.*
|
||||
import pl.szczodrzynski.edziennik.*
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import pl.szczodrzynski.edziennik.App
|
||||
import pl.szczodrzynski.edziennik.R
|
||||
import pl.szczodrzynski.edziennik.data.db.entity.Lesson
|
||||
import pl.szczodrzynski.edziennik.data.db.full.LessonFull
|
||||
import pl.szczodrzynski.edziennik.databinding.ActivityCounterBinding
|
||||
@ -21,6 +23,7 @@ import pl.szczodrzynski.edziennik.ext.onClick
|
||||
import pl.szczodrzynski.edziennik.ext.startCoroutineTimer
|
||||
import pl.szczodrzynski.edziennik.ext.timeLeft
|
||||
import pl.szczodrzynski.edziennik.ext.timeTill
|
||||
import pl.szczodrzynski.edziennik.ext.toDrawable
|
||||
import pl.szczodrzynski.edziennik.ui.dialogs.BellSyncTimeChooseDialog
|
||||
import pl.szczodrzynski.edziennik.utils.BigNightUtil
|
||||
import pl.szczodrzynski.edziennik.utils.models.Date
|
||||
@ -68,10 +71,8 @@ class CounterActivity : AppCompatActivity(), CoroutineScope {
|
||||
}
|
||||
|
||||
b.bellSync.setImageDrawable(
|
||||
IconicsDrawable(this@CounterActivity, SzkolnyFont.Icon.szf_alarm_bell_outline).apply {
|
||||
colorInt = 0xff404040.toInt()
|
||||
sizeDp = 36
|
||||
}
|
||||
SzkolnyFont.Icon.szf_alarm_bell_outline
|
||||
.toDrawable(0xff404040.toInt(), sizeDp = 36)
|
||||
)
|
||||
b.bellSync.onClick {
|
||||
BellSyncTimeChooseDialog(activity = this@CounterActivity).show()
|
||||
|
@ -11,10 +11,8 @@ import android.widget.FrameLayout
|
||||
import androidx.core.view.plusAssign
|
||||
import androidx.core.view.setMargins
|
||||
import androidx.lifecycle.Observer
|
||||
import com.mikepenz.iconics.IconicsDrawable
|
||||
import com.mikepenz.iconics.typeface.IIcon
|
||||
import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial
|
||||
import com.mikepenz.iconics.utils.sizeDp
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.Job
|
||||
@ -27,12 +25,12 @@ import pl.szczodrzynski.edziennik.databinding.CardHomeLuckyNumberBinding
|
||||
import pl.szczodrzynski.edziennik.ext.dp
|
||||
import pl.szczodrzynski.edziennik.ext.onClick
|
||||
import pl.szczodrzynski.edziennik.ext.setText
|
||||
import pl.szczodrzynski.edziennik.ext.toDrawable
|
||||
import pl.szczodrzynski.edziennik.ui.dialogs.settings.StudentNumberDialog
|
||||
import pl.szczodrzynski.edziennik.ui.home.HomeCard
|
||||
import pl.szczodrzynski.edziennik.ui.home.HomeCardAdapter
|
||||
import pl.szczodrzynski.edziennik.ui.home.HomeFragment
|
||||
import pl.szczodrzynski.edziennik.utils.models.Date
|
||||
import pl.szczodrzynski.navlib.colorAttr
|
||||
import kotlin.coroutines.CoroutineContext
|
||||
|
||||
class HomeLuckyNumberCard(
|
||||
@ -99,10 +97,7 @@ class HomeLuckyNumberCard(
|
||||
!isYours -> CommunityMaterial.Icon.cmd_emoticon_happy_outline
|
||||
else -> CommunityMaterial.Icon.cmd_emoticon_confused_outline
|
||||
}
|
||||
b.image.icon = IconicsDrawable(activity, icon).apply {
|
||||
sizeDp = 24
|
||||
colorAttr(activity, R.attr.colorOnPrimaryContainer)
|
||||
}
|
||||
b.image.icon = icon.toDrawable(activity, colorAttr = R.attr.colorOnPrimaryContainer)
|
||||
})
|
||||
|
||||
holder.root.onClick {
|
||||
|
@ -5,7 +5,6 @@
|
||||
package pl.szczodrzynski.edziennik.ui.home.cards
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
@ -13,25 +12,43 @@ import android.widget.FrameLayout
|
||||
import androidx.core.view.plusAssign
|
||||
import androidx.core.view.setMargins
|
||||
import androidx.lifecycle.Observer
|
||||
import com.mikepenz.iconics.IconicsDrawable
|
||||
import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial
|
||||
import com.mikepenz.iconics.utils.sizeDp
|
||||
import eu.szkolny.font.SzkolnyFont
|
||||
import kotlinx.coroutines.*
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.async
|
||||
import kotlinx.coroutines.launch
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import org.greenrobot.eventbus.Subscribe
|
||||
import org.greenrobot.eventbus.ThreadMode
|
||||
import pl.szczodrzynski.edziennik.*
|
||||
import pl.szczodrzynski.edziennik.App
|
||||
import pl.szczodrzynski.edziennik.MainActivity
|
||||
import pl.szczodrzynski.edziennik.R
|
||||
import pl.szczodrzynski.edziennik.data.api.edziennik.EdziennikTask
|
||||
import pl.szczodrzynski.edziennik.data.api.events.ApiTaskAllFinishedEvent
|
||||
import pl.szczodrzynski.edziennik.data.db.entity.Event
|
||||
import pl.szczodrzynski.edziennik.data.db.entity.Lesson
|
||||
import pl.szczodrzynski.edziennik.data.db.entity.Profile
|
||||
import pl.szczodrzynski.edziennik.data.enums.FeatureType
|
||||
import pl.szczodrzynski.edziennik.data.db.full.LessonFull
|
||||
import pl.szczodrzynski.edziennik.databinding.CardHomeTimetableBinding
|
||||
import pl.szczodrzynski.edziennik.ext.*
|
||||
import pl.szczodrzynski.edziennik.data.enums.FeatureType
|
||||
import pl.szczodrzynski.edziennik.data.enums.NavTarget
|
||||
import pl.szczodrzynski.edziennik.databinding.CardHomeTimetableBinding
|
||||
import pl.szczodrzynski.edziennik.ext.Bundle
|
||||
import pl.szczodrzynski.edziennik.ext.JsonObject
|
||||
import pl.szczodrzynski.edziennik.ext.MINUTE
|
||||
import pl.szczodrzynski.edziennik.ext.asItalicSpannable
|
||||
import pl.szczodrzynski.edziennik.ext.asStrikethroughSpannable
|
||||
import pl.szczodrzynski.edziennik.ext.compareTo
|
||||
import pl.szczodrzynski.edziennik.ext.concat
|
||||
import pl.szczodrzynski.edziennik.ext.dp
|
||||
import pl.szczodrzynski.edziennik.ext.getStudentData
|
||||
import pl.szczodrzynski.edziennik.ext.onClick
|
||||
import pl.szczodrzynski.edziennik.ext.setText
|
||||
import pl.szczodrzynski.edziennik.ext.startCoroutineTimer
|
||||
import pl.szczodrzynski.edziennik.ext.timeLeft
|
||||
import pl.szczodrzynski.edziennik.ext.timeTill
|
||||
import pl.szczodrzynski.edziennik.ext.toDrawable
|
||||
import pl.szczodrzynski.edziennik.ui.dialogs.BellSyncTimeChooseDialog
|
||||
import pl.szczodrzynski.edziennik.ui.home.CounterActivity
|
||||
import pl.szczodrzynski.edziennik.ui.home.HomeCard
|
||||
@ -40,7 +57,6 @@ import pl.szczodrzynski.edziennik.ui.home.HomeFragment
|
||||
import pl.szczodrzynski.edziennik.utils.models.Date
|
||||
import pl.szczodrzynski.edziennik.utils.models.Time
|
||||
import pl.szczodrzynski.edziennik.utils.models.Week
|
||||
import pl.szczodrzynski.navlib.colorAttr
|
||||
import kotlin.coroutines.CoroutineContext
|
||||
|
||||
class HomeTimetableCard(
|
||||
@ -91,20 +107,9 @@ class HomeTimetableCard(
|
||||
}
|
||||
holder.root += b.root
|
||||
|
||||
b.settings.setImageDrawable(
|
||||
IconicsDrawable(activity, CommunityMaterial.Icon.cmd_cog_outline).apply {
|
||||
colorAttr(activity, R.attr.colorOnPrimaryContainer)
|
||||
sizeDp = 24
|
||||
}
|
||||
)
|
||||
|
||||
b.bellSync.icon = IconicsDrawable(activity, SzkolnyFont.Icon.szf_alarm_bell_outline).apply {
|
||||
sizeDp = 24
|
||||
}
|
||||
|
||||
b.showCounter.icon = IconicsDrawable(activity, CommunityMaterial.Icon2.cmd_fullscreen).apply {
|
||||
sizeDp = 24
|
||||
}
|
||||
b.settings.setImageDrawable(CommunityMaterial.Icon.cmd_cog_outline.toDrawable(activity, R.attr.colorOnPrimaryContainer))
|
||||
b.bellSync.icon = SzkolnyFont.Icon.szf_alarm_bell_outline.toDrawable(activity)
|
||||
b.showCounter.icon = CommunityMaterial.Icon2.cmd_fullscreen.toDrawable(activity)
|
||||
|
||||
b.bellSync.setOnClickListener {
|
||||
BellSyncTimeChooseDialog(
|
||||
|
@ -14,13 +14,9 @@ import android.widget.Toast
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.core.widget.addTextChangedListener
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.navigation.NavOptions
|
||||
import androidx.navigation.navOptions
|
||||
import androidx.viewbinding.ViewBinding
|
||||
import com.google.android.material.textfield.TextInputLayout
|
||||
import com.mikepenz.iconics.IconicsDrawable
|
||||
import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial
|
||||
import com.mikepenz.iconics.utils.sizeDp
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.Job
|
||||
@ -32,12 +28,29 @@ import pl.szczodrzynski.edziennik.data.enums.LoginType
|
||||
import pl.szczodrzynski.edziennik.databinding.LoginFormCheckboxItemBinding
|
||||
import pl.szczodrzynski.edziennik.databinding.LoginFormFieldItemBinding
|
||||
import pl.szczodrzynski.edziennik.databinding.LoginFormFragmentBinding
|
||||
import pl.szczodrzynski.edziennik.ext.*
|
||||
import pl.szczodrzynski.edziennik.ext.Bundle
|
||||
import pl.szczodrzynski.edziennik.ext.getEnum
|
||||
import pl.szczodrzynski.edziennik.ext.onChange
|
||||
import pl.szczodrzynski.edziennik.ext.onClick
|
||||
import pl.szczodrzynski.edziennik.ext.resolveAttr
|
||||
import pl.szczodrzynski.edziennik.ext.resolveString
|
||||
import pl.szczodrzynski.edziennik.ext.setText
|
||||
import pl.szczodrzynski.edziennik.ext.setTintColor
|
||||
import pl.szczodrzynski.edziennik.ext.startCoroutineTimer
|
||||
import pl.szczodrzynski.edziennik.ext.toBundle
|
||||
import pl.szczodrzynski.edziennik.ext.toDrawable
|
||||
import pl.szczodrzynski.edziennik.ext.toJsonObject
|
||||
import pl.szczodrzynski.edziennik.ui.dialogs.QrScannerDialog
|
||||
import pl.szczodrzynski.edziennik.ui.login.LoginInfo.BaseCredential
|
||||
import pl.szczodrzynski.edziennik.ui.login.LoginInfo.FormCheckbox
|
||||
import pl.szczodrzynski.edziennik.ui.login.LoginInfo.FormField
|
||||
import pl.szczodrzynski.navlib.colorAttr
|
||||
import kotlin.collections.component1
|
||||
import kotlin.collections.component2
|
||||
import kotlin.collections.firstOrNull
|
||||
import kotlin.collections.forEach
|
||||
import kotlin.collections.iterator
|
||||
import kotlin.collections.mutableMapOf
|
||||
import kotlin.collections.set
|
||||
import kotlin.coroutines.CoroutineContext
|
||||
|
||||
class LoginFormFragment : Fragment(), CoroutineScope {
|
||||
@ -168,11 +181,7 @@ class LoginFormFragment : Fragment(), CoroutineScope {
|
||||
|
||||
if (credential.qrDecoderClass != null) {
|
||||
b.textLayout.endIconMode = TextInputLayout.END_ICON_CUSTOM
|
||||
b.textLayout.endIconDrawable = IconicsDrawable(activity).apply {
|
||||
icon = CommunityMaterial.Icon3.cmd_qrcode
|
||||
sizeDp = 24
|
||||
colorAttr(activity, R.attr.colorOnBackground)
|
||||
}
|
||||
b.textLayout.endIconDrawable = CommunityMaterial.Icon3.cmd_qrcode.toDrawable()
|
||||
b.textLayout.setEndIconOnClickListener {
|
||||
scanQrCode(credential)
|
||||
}
|
||||
@ -194,11 +203,7 @@ class LoginFormFragment : Fragment(), CoroutineScope {
|
||||
b.textLayout.suffixText = credential.suffix?.resolveString(app)
|
||||
b.textLayout.tag = credential
|
||||
|
||||
b.textLayout.startIconDrawable = IconicsDrawable(activity).apply {
|
||||
icon = credential.icon
|
||||
sizeDp = 24
|
||||
colorAttr(activity, R.attr.colorOnBackground)
|
||||
}
|
||||
b.textLayout.startIconDrawable = credential.icon.toDrawable()
|
||||
|
||||
return b
|
||||
}
|
||||
|
@ -19,7 +19,6 @@ import pl.szczodrzynski.edziennik.R
|
||||
import pl.szczodrzynski.edziennik.data.api.SYSTEM_USER_AGENT
|
||||
import pl.szczodrzynski.edziennik.ext.app
|
||||
import pl.szczodrzynski.edziennik.ext.isNightMode
|
||||
import pl.szczodrzynski.edziennik.utils.Themes
|
||||
import java.nio.charset.Charset
|
||||
|
||||
class RecaptchaActivity : AppCompatActivity() {
|
||||
|
@ -14,8 +14,8 @@ import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.Job
|
||||
import pl.szczodrzynski.edziennik.R
|
||||
import pl.szczodrzynski.edziennik.data.api.models.ApiError
|
||||
import pl.szczodrzynski.edziennik.ext.resolveAttr
|
||||
import pl.szczodrzynski.edziennik.ui.dialogs.ErrorDetailsDialog
|
||||
import pl.szczodrzynski.navlib.getColorFromAttr
|
||||
import kotlin.coroutines.CoroutineContext
|
||||
|
||||
class ErrorSnackbar(val activity: AppCompatActivity) : CoroutineScope {
|
||||
@ -39,8 +39,8 @@ class ErrorSnackbar(val activity: AppCompatActivity) : CoroutineScope {
|
||||
errors = mutableListOf()
|
||||
}
|
||||
val bgColor = ColorUtils.compositeColors(
|
||||
getColorFromAttr(activity, R.attr.colorOnSurface) and 0xcfffffff.toInt(),
|
||||
getColorFromAttr(activity, R.attr.colorSurface)
|
||||
R.attr.colorOnSurface.resolveAttr(activity) and 0xcfffffff.toInt(),
|
||||
R.attr.colorSurface.resolveAttr(activity),
|
||||
)
|
||||
snackbar?.setBackgroundTint(bgColor)
|
||||
showAbove?.let { snackbar?.anchorView = it }
|
||||
|
@ -10,7 +10,7 @@ import androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
import androidx.core.graphics.ColorUtils
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import pl.szczodrzynski.edziennik.R
|
||||
import pl.szczodrzynski.navlib.getColorFromAttr
|
||||
import pl.szczodrzynski.edziennik.ext.resolveAttr
|
||||
|
||||
class MainSnackbar(val activity: AppCompatActivity) {
|
||||
companion object {
|
||||
@ -27,8 +27,8 @@ class MainSnackbar(val activity: AppCompatActivity) {
|
||||
|
||||
}
|
||||
val bgColor = ColorUtils.compositeColors(
|
||||
getColorFromAttr(activity, R.attr.colorOnSurface) and 0xcfffffff.toInt(),
|
||||
getColorFromAttr(activity, R.attr.colorSurface)
|
||||
R.attr.colorOnSurface.resolveAttr(activity) and 0xcfffffff.toInt(),
|
||||
R.attr.colorSurface.resolveAttr(activity),
|
||||
)
|
||||
snackbar?.setBackgroundTint(bgColor)
|
||||
showAbove?.let { snackbar?.anchorView = it }
|
||||
|
@ -20,7 +20,6 @@ import pl.szczodrzynski.edziennik.data.db.entity.Teacher
|
||||
import pl.szczodrzynski.edziennik.ext.*
|
||||
import pl.szczodrzynski.edziennik.ui.messages.MessagesUtils
|
||||
import pl.szczodrzynski.edziennik.utils.Colors
|
||||
import pl.szczodrzynski.edziennik.utils.Themes
|
||||
import pl.szczodrzynski.navlib.elevateSurface
|
||||
|
||||
class MessagesComposeChipCreator(
|
||||
@ -139,6 +138,6 @@ class MessagesComposeChipCreator(
|
||||
override fun configureChip(chip: ChipSpan, chipConfiguration: ChipConfiguration) {
|
||||
super.configureChip(chip, chipConfiguration)
|
||||
chip.setBackgroundColor(elevateSurface(context, 8).toColorStateList())
|
||||
chip.setTextColor(Themes.getPrimaryTextColor(context))
|
||||
chip.setTextColor(android.R.attr.textColorPrimary.resolveAttr(context))
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,6 @@ import pl.szczodrzynski.edziennik.ui.grades.viewholder.BindableViewHolder
|
||||
import pl.szczodrzynski.edziennik.ui.messages.MessagesUtils
|
||||
import pl.szczodrzynski.edziennik.core.manager.NoteManager
|
||||
import pl.szczodrzynski.edziennik.utils.models.Date
|
||||
import pl.szczodrzynski.navlib.getColorFromAttr
|
||||
|
||||
class MessageViewHolder(
|
||||
inflater: LayoutInflater,
|
||||
@ -46,7 +45,10 @@ class MessageViewHolder(
|
||||
|
||||
val isRead = item.isSent || item.isDraft || item.seen
|
||||
val typeface = if (isRead) adapter.typefaceNormal else adapter.typefaceBold
|
||||
val textColor = if (isRead) getColorFromAttr(b.root.context, R.attr.colorOnSurfaceVariant) else getColorFromAttr(b.root.context, R.attr.colorOnSurface)
|
||||
val textColor = if (isRead)
|
||||
R.attr.colorOnSurfaceVariant.resolveAttr(b.root.context)
|
||||
else
|
||||
R.attr.colorOnSurface.resolveAttr(b.root.context)
|
||||
// set text styles
|
||||
b.messageSender.setTextColor(textColor)
|
||||
b.messageSender.typeface = typeface
|
||||
|
@ -8,24 +8,22 @@ import android.view.LayoutInflater
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.mikepenz.iconics.IconicsDrawable
|
||||
import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial
|
||||
import com.mikepenz.iconics.utils.colorInt
|
||||
import com.mikepenz.iconics.utils.sizeDp
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
import pl.szczodrzynski.edziennik.R
|
||||
import pl.szczodrzynski.edziennik.core.manager.TextStylingManager.HtmlMode
|
||||
import pl.szczodrzynski.edziennik.core.manager.TextStylingManager.StylingConfigBase
|
||||
import pl.szczodrzynski.edziennik.data.db.entity.Note
|
||||
import pl.szczodrzynski.edziennik.data.db.entity.Noteable
|
||||
import pl.szczodrzynski.edziennik.data.db.entity.Profile
|
||||
import pl.szczodrzynski.edziennik.databinding.NoteEditorDialogBinding
|
||||
import pl.szczodrzynski.edziennik.ext.isNotNullNorBlank
|
||||
import pl.szczodrzynski.edziennik.ext.resolveString
|
||||
import pl.szczodrzynski.edziennik.ext.toDrawable
|
||||
import pl.szczodrzynski.edziennik.ui.base.dialog.BindingDialog
|
||||
import pl.szczodrzynski.edziennik.ui.dialogs.settings.RegistrationConfigDialog
|
||||
import pl.szczodrzynski.edziennik.utils.TextInputDropDown
|
||||
import pl.szczodrzynski.edziennik.core.manager.TextStylingManager.HtmlMode
|
||||
import pl.szczodrzynski.edziennik.core.manager.TextStylingManager.StylingConfigBase
|
||||
import kotlin.coroutines.resume
|
||||
import kotlin.coroutines.suspendCoroutine
|
||||
|
||||
@ -146,11 +144,8 @@ class NoteEditorDialog(
|
||||
text = color.stringRes.resolveString(activity),
|
||||
tag = color,
|
||||
icon = if (color.value != null)
|
||||
IconicsDrawable(activity).apply {
|
||||
icon = CommunityMaterial.Icon.cmd_circle
|
||||
sizeDp = 24
|
||||
colorInt = color.value.toInt()
|
||||
} else null,
|
||||
CommunityMaterial.Icon.cmd_circle.toDrawable(color.value.toInt())
|
||||
else null,
|
||||
)
|
||||
})
|
||||
b.color.select(id = editingNote?.color ?: 0L)
|
||||
|
@ -11,12 +11,12 @@ import androidx.core.view.isVisible
|
||||
import androidx.core.view.updateLayoutParams
|
||||
import androidx.core.view.updatePadding
|
||||
import com.google.android.material.button.MaterialButton
|
||||
import com.mikepenz.iconics.IconicsDrawable
|
||||
import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial
|
||||
import pl.szczodrzynski.edziennik.R
|
||||
import pl.szczodrzynski.edziennik.data.db.entity.Noteable
|
||||
import pl.szczodrzynski.edziennik.ext.dp
|
||||
import pl.szczodrzynski.edziennik.ext.onClick
|
||||
import pl.szczodrzynski.edziennik.ext.toDrawable
|
||||
|
||||
fun MaterialButton.setupNotesButton(
|
||||
activity: AppCompatActivity,
|
||||
@ -27,7 +27,7 @@ fun MaterialButton.setupNotesButton(
|
||||
if (!isVisible)
|
||||
return
|
||||
// TODO replace with modern notes icon
|
||||
icon = IconicsDrawable(activity, CommunityMaterial.Icon3.cmd_playlist_edit)
|
||||
icon = CommunityMaterial.Icon3.cmd_playlist_edit.toDrawable(activity)
|
||||
setText(R.string.notes_button)
|
||||
iconPadding = 8.dp
|
||||
iconSize = 24.dp
|
||||
|
@ -4,9 +4,6 @@ import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mikepenz.iconics.IconicsDrawable
|
||||
import com.mikepenz.iconics.utils.colorInt
|
||||
import com.mikepenz.iconics.utils.colorRes
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.Job
|
||||
@ -14,9 +11,13 @@ import pl.szczodrzynski.edziennik.App
|
||||
import pl.szczodrzynski.edziennik.R
|
||||
import pl.szczodrzynski.edziennik.data.db.entity.Notification
|
||||
import pl.szczodrzynski.edziennik.databinding.NotificationsListItemBinding
|
||||
import pl.szczodrzynski.edziennik.ext.*
|
||||
import pl.szczodrzynski.edziennik.ext.asColoredSpannable
|
||||
import pl.szczodrzynski.edziennik.ext.concat
|
||||
import pl.szczodrzynski.edziennik.ext.onClick
|
||||
import pl.szczodrzynski.edziennik.ext.resolveAttr
|
||||
import pl.szczodrzynski.edziennik.ext.resolveString
|
||||
import pl.szczodrzynski.edziennik.ext.toDrawable
|
||||
import pl.szczodrzynski.edziennik.utils.models.Date
|
||||
import pl.szczodrzynski.navlib.getColorFromAttr
|
||||
import kotlin.coroutines.CoroutineContext
|
||||
|
||||
class NotificationsAdapter(
|
||||
@ -49,9 +50,8 @@ class NotificationsAdapter(
|
||||
val date = Date.fromMillis(item.addedDate).formattedString
|
||||
val colorSecondary = android.R.attr.textColorSecondary.resolveAttr(activity)
|
||||
|
||||
b.notificationIcon.background = IconicsDrawable(app, item.type.icon).apply {
|
||||
colorInt = getColorFromAttr(b.root.context, R.attr.colorPrimary)
|
||||
}
|
||||
b.notificationIcon.background =
|
||||
item.type.icon.toDrawable(app, colorAttr = R.attr.colorPrimary)
|
||||
|
||||
b.title.text = item.text
|
||||
b.profileDate.text = listOf(
|
||||
|
@ -10,24 +10,18 @@ import com.danielstone.materialaboutlibrary.items.MaterialAboutActionItem
|
||||
import com.danielstone.materialaboutlibrary.model.MaterialAboutCard
|
||||
import com.danielstone.materialaboutlibrary.model.MaterialAboutList
|
||||
import com.danielstone.materialaboutlibrary.util.OpenSourceLicense
|
||||
import com.mikepenz.iconics.IconicsDrawable
|
||||
import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial
|
||||
import com.mikepenz.iconics.utils.colorInt
|
||||
import com.mikepenz.iconics.utils.sizeDp
|
||||
import pl.szczodrzynski.edziennik.R
|
||||
import pl.szczodrzynski.edziennik.ext.app
|
||||
import pl.szczodrzynski.edziennik.ext.resolveColor
|
||||
import pl.szczodrzynski.edziennik.ext.toDrawable
|
||||
|
||||
class SettingsLicenseActivity : MaterialAboutActivity() {
|
||||
|
||||
var foregroundColor: Int = 0
|
||||
|
||||
private val icon
|
||||
get() = IconicsDrawable(this).apply {
|
||||
icon = CommunityMaterial.Icon.cmd_book_outline
|
||||
colorInt = foregroundColor
|
||||
sizeDp = 24
|
||||
}
|
||||
get() = CommunityMaterial.Icon.cmd_book_outline.toDrawable(foregroundColor)
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
app.uiManager.applyTheme(this)
|
||||
|
@ -6,17 +6,14 @@ package pl.szczodrzynski.edziennik.ui.settings
|
||||
|
||||
import com.danielstone.materialaboutlibrary.items.*
|
||||
import com.danielstone.materialaboutlibrary.model.MaterialAboutCard
|
||||
import com.mikepenz.iconics.IconicsDrawable
|
||||
import com.mikepenz.iconics.typeface.IIcon
|
||||
import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial
|
||||
import com.mikepenz.iconics.utils.colorInt
|
||||
import com.mikepenz.iconics.utils.sizeDp
|
||||
import pl.szczodrzynski.edziennik.MainActivity
|
||||
import pl.szczodrzynski.edziennik.R
|
||||
import pl.szczodrzynski.edziennik.data.db.entity.Profile
|
||||
import pl.szczodrzynski.edziennik.ext.after
|
||||
import pl.szczodrzynski.edziennik.ext.toDrawable
|
||||
import pl.szczodrzynski.edziennik.utils.Colors
|
||||
import pl.szczodrzynski.edziennik.utils.Themes
|
||||
|
||||
class SettingsUtil(
|
||||
val activity: MainActivity,
|
||||
@ -25,13 +22,6 @@ class SettingsUtil(
|
||||
|
||||
fun refresh() = onRefresh()
|
||||
|
||||
private fun IIcon.asDrawable(color: Int? = null, size: Int = 24) =
|
||||
IconicsDrawable(activity).apply {
|
||||
icon = this@asDrawable
|
||||
sizeDp = size
|
||||
colorInt = color ?: Themes.getPrimaryTextColor(activity)
|
||||
}
|
||||
|
||||
fun createCard(
|
||||
titleRes: Int?,
|
||||
items: (card: MaterialAboutCard) -> List<MaterialAboutItem>,
|
||||
@ -67,7 +57,7 @@ class SettingsUtil(
|
||||
|
||||
val moreItem = MaterialAboutActionItem.Builder()
|
||||
.text(R.string.settings_more_text)
|
||||
.icon(CommunityMaterial.Icon.cmd_chevron_down.asDrawable(iconColor, size = 24))
|
||||
.icon(CommunityMaterial.Icon.cmd_chevron_down.toDrawable(activity, iconColor))
|
||||
.build()
|
||||
|
||||
moreItem.setOnClickAction {
|
||||
@ -93,7 +83,7 @@ class SettingsUtil(
|
||||
val item = MaterialAboutActionItem.Builder()
|
||||
.text(text)
|
||||
.subText(subText ?: 0)
|
||||
.icon(icon.asDrawable(iconColor))
|
||||
.icon(icon.toDrawable(activity, iconColor))
|
||||
.build()
|
||||
|
||||
item.setOnClickAction {
|
||||
@ -119,7 +109,7 @@ class SettingsUtil(
|
||||
.text(text)
|
||||
.subText(subText ?: 0)
|
||||
.subTextChecked(subTextChecked ?: 0)
|
||||
.icon(icon.asDrawable(iconColor))
|
||||
.icon(icon.toDrawable(activity, iconColor))
|
||||
.setChecked(value)
|
||||
.build()
|
||||
|
||||
@ -149,7 +139,7 @@ class SettingsUtil(
|
||||
.text(text)
|
||||
.subText(subText ?: 0)
|
||||
.subTextChecked(subTextChecked ?: 0)
|
||||
.icon(icon.asDrawable(iconColor))
|
||||
.icon(icon.toDrawable(activity, iconColor))
|
||||
.setChecked(value)
|
||||
.build()
|
||||
|
||||
|
@ -14,7 +14,6 @@ import pl.szczodrzynski.edziennik.ui.dialogs.settings.ThemeChooserDialog
|
||||
import pl.szczodrzynski.edziennik.ui.settings.SettingsCard
|
||||
import pl.szczodrzynski.edziennik.ui.settings.SettingsUtil
|
||||
import pl.szczodrzynski.edziennik.utils.BigNightUtil
|
||||
import pl.szczodrzynski.edziennik.utils.Themes
|
||||
import pl.szczodrzynski.edziennik.utils.models.Date
|
||||
|
||||
class SettingsThemeCard(util: SettingsUtil) : SettingsCard(util) {
|
||||
|
@ -10,17 +10,16 @@ import android.view.View
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.mikepenz.iconics.IconicsDrawable
|
||||
import com.mikepenz.iconics.utils.colorInt
|
||||
import com.mikepenz.iconics.utils.sizeDp
|
||||
import pl.szczodrzynski.edziennik.App
|
||||
import pl.szczodrzynski.edziennik.R
|
||||
import pl.szczodrzynski.edziennik.core.manager.NoteManager
|
||||
import pl.szczodrzynski.edziennik.data.db.entity.Lesson
|
||||
import pl.szczodrzynski.edziennik.data.db.full.AttendanceFull
|
||||
import pl.szczodrzynski.edziennik.data.db.full.LessonFull
|
||||
import pl.szczodrzynski.edziennik.databinding.DialogLessonDetailsBinding
|
||||
import pl.szczodrzynski.edziennik.ext.onClick
|
||||
import pl.szczodrzynski.edziennik.ext.setText
|
||||
import pl.szczodrzynski.edziennik.ext.toDrawable
|
||||
import pl.szczodrzynski.edziennik.ui.attendance.AttendanceDetailsDialog
|
||||
import pl.szczodrzynski.edziennik.ui.base.dialog.BindingDialog
|
||||
import pl.szczodrzynski.edziennik.ui.event.EventDetailsDialog
|
||||
@ -29,7 +28,6 @@ import pl.szczodrzynski.edziennik.ui.event.EventManualDialog
|
||||
import pl.szczodrzynski.edziennik.ui.notes.setupNotesButton
|
||||
import pl.szczodrzynski.edziennik.utils.BetterLink
|
||||
import pl.szczodrzynski.edziennik.utils.SimpleDividerItemDecoration
|
||||
import pl.szczodrzynski.edziennik.core.manager.NoteManager
|
||||
import pl.szczodrzynski.edziennik.utils.models.Date
|
||||
import pl.szczodrzynski.edziennik.utils.models.Week
|
||||
|
||||
@ -163,12 +161,7 @@ class LessonDetailsDialog(
|
||||
b.attendanceIcon.isVisible = attendance.let {
|
||||
val icon = attendanceManager.getAttendanceIcon(it) ?: return@let false
|
||||
val color = attendanceManager.getAttendanceColor(it)
|
||||
b.attendanceIcon.setImageDrawable(
|
||||
IconicsDrawable(activity, icon).apply {
|
||||
colorInt = color
|
||||
sizeDp = 24
|
||||
}
|
||||
)
|
||||
b.attendanceIcon.setImageDrawable(icon.toDrawable(color))
|
||||
true
|
||||
}
|
||||
b.attendanceDetails.onClick {
|
||||
|
@ -17,9 +17,6 @@ import androidx.core.view.setPadding
|
||||
import androidx.core.view.updateLayoutParams
|
||||
import com.linkedin.android.tachyon.DayView
|
||||
import com.linkedin.android.tachyon.DayViewConfig
|
||||
import com.mikepenz.iconics.IconicsDrawable
|
||||
import com.mikepenz.iconics.utils.colorInt
|
||||
import com.mikepenz.iconics.utils.sizeDp
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.launch
|
||||
@ -52,6 +49,7 @@ import pl.szczodrzynski.edziennik.ext.resolveDrawable
|
||||
import pl.szczodrzynski.edziennik.ext.setText
|
||||
import pl.szczodrzynski.edziennik.ext.setTintColor
|
||||
import pl.szczodrzynski.edziennik.ext.startCoroutineTimer
|
||||
import pl.szczodrzynski.edziennik.ext.toDrawable
|
||||
import pl.szczodrzynski.edziennik.ui.base.fragment.BaseFragment
|
||||
import pl.szczodrzynski.edziennik.ui.timetable.TimetableFragment.Companion.DEFAULT_END_HOUR
|
||||
import pl.szczodrzynski.edziennik.ui.timetable.TimetableFragment.Companion.DEFAULT_START_HOUR
|
||||
@ -384,12 +382,7 @@ class TimetableDayFragment : BaseFragment<TimetableDayFragmentBinding, MainActiv
|
||||
lb.attendanceIcon.isVisible = attendance?.let {
|
||||
val icon = attendanceManager.getAttendanceIcon(it) ?: return@let false
|
||||
val color = attendanceManager.getAttendanceColor(it)
|
||||
lb.attendanceIcon.setImageDrawable(
|
||||
IconicsDrawable(activity, icon).apply {
|
||||
colorInt = color
|
||||
sizeDp = 24
|
||||
}
|
||||
)
|
||||
lb.attendanceIcon.setImageDrawable(icon.toDrawable(color))
|
||||
true
|
||||
} ?: false
|
||||
|
||||
|
@ -13,19 +13,17 @@ import android.graphics.Color
|
||||
import android.net.Uri
|
||||
import android.view.View
|
||||
import android.widget.RemoteViews
|
||||
import com.mikepenz.iconics.IconicsDrawable
|
||||
import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial
|
||||
import com.mikepenz.iconics.utils.colorInt
|
||||
import com.mikepenz.iconics.utils.sizeDp
|
||||
import pl.szczodrzynski.edziennik.App
|
||||
import pl.szczodrzynski.edziennik.MainActivity
|
||||
import pl.szczodrzynski.edziennik.R
|
||||
import pl.szczodrzynski.edziennik.core.receiver.SzkolnyReceiver
|
||||
import pl.szczodrzynski.edziennik.data.enums.NavTarget
|
||||
import pl.szczodrzynski.edziennik.ext.Bundle
|
||||
import pl.szczodrzynski.edziennik.ext.getJsonObject
|
||||
import pl.szczodrzynski.edziennik.ext.pendingIntentMutable
|
||||
import pl.szczodrzynski.edziennik.ext.putExtras
|
||||
import pl.szczodrzynski.edziennik.core.receiver.SzkolnyReceiver
|
||||
import pl.szczodrzynski.edziennik.data.enums.NavTarget
|
||||
import pl.szczodrzynski.edziennik.ext.toDrawable
|
||||
import pl.szczodrzynski.edziennik.ui.widgets.WidgetConfig
|
||||
|
||||
class WidgetNotificationsProvider : AppWidgetProvider() {
|
||||
@ -55,10 +53,9 @@ class WidgetNotificationsProvider : AppWidgetProvider() {
|
||||
|
||||
views.setImageViewBitmap(
|
||||
R.id.widgetNotificationsSync,
|
||||
IconicsDrawable(context, CommunityMaterial.Icon.cmd_download_outline).apply {
|
||||
colorInt = Color.WHITE
|
||||
sizeDp = iconSize
|
||||
}.toBitmap()
|
||||
CommunityMaterial.Icon.cmd_download_outline
|
||||
.toDrawable(context, Color.WHITE, sizeDp = iconSize)
|
||||
.toBitmap()
|
||||
)
|
||||
|
||||
views.setViewVisibility(R.id.widgetNotificationsLoading, View.GONE)
|
||||
|
@ -21,22 +21,20 @@ import android.os.Build
|
||||
import android.util.SparseArray
|
||||
import android.view.View
|
||||
import android.widget.RemoteViews
|
||||
import com.mikepenz.iconics.IconicsDrawable
|
||||
import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial
|
||||
import com.mikepenz.iconics.utils.colorInt
|
||||
import com.mikepenz.iconics.utils.sizeDp
|
||||
import pl.szczodrzynski.edziennik.App
|
||||
import pl.szczodrzynski.edziennik.MainActivity
|
||||
import pl.szczodrzynski.edziennik.R
|
||||
import pl.szczodrzynski.edziennik.data.api.edziennik.EdziennikTask
|
||||
import pl.szczodrzynski.edziennik.data.db.entity.Lesson
|
||||
import pl.szczodrzynski.edziennik.data.db.entity.Lesson.Companion.TYPE_NO_LESSONS
|
||||
import pl.szczodrzynski.edziennik.data.enums.NavTarget
|
||||
import pl.szczodrzynski.edziennik.ext.filterOutArchived
|
||||
import pl.szczodrzynski.edziennik.ext.getJsonObject
|
||||
import pl.szczodrzynski.edziennik.ext.pendingIntentFlag
|
||||
import pl.szczodrzynski.edziennik.ext.pendingIntentMutable
|
||||
import pl.szczodrzynski.edziennik.ext.putExtras
|
||||
import pl.szczodrzynski.edziennik.data.enums.NavTarget
|
||||
import pl.szczodrzynski.edziennik.ext.toDrawable
|
||||
import pl.szczodrzynski.edziennik.ui.widgets.LessonDialogActivity
|
||||
import pl.szczodrzynski.edziennik.ui.widgets.WidgetConfig
|
||||
import pl.szczodrzynski.edziennik.utils.models.Date
|
||||
@ -125,10 +123,9 @@ class WidgetTimetableProvider : AppWidgetProvider() {
|
||||
|
||||
views.setImageViewBitmap(
|
||||
R.id.widgetTimetableRefresh,
|
||||
IconicsDrawable(context, CommunityMaterial.Icon3.cmd_refresh).apply {
|
||||
colorInt = Color.WHITE
|
||||
sizeDp = if (config.bigStyle) 28 else 20
|
||||
}.toBitmap()
|
||||
CommunityMaterial.Icon3.cmd_refresh
|
||||
.toDrawable(context, Color.WHITE, sizeDp = if (config.bigStyle) 28 else 20)
|
||||
.toBitmap()
|
||||
)
|
||||
|
||||
prepareAppWidget(app, appWidgetId, views, config, bellSyncDiffMillis)
|
||||
|
@ -8,10 +8,8 @@ import androidx.appcompat.view.menu.MenuBuilder
|
||||
import androidx.appcompat.view.menu.MenuPopupHelper
|
||||
import androidx.appcompat.widget.PopupMenu
|
||||
import com.google.android.material.textfield.TextInputEditText
|
||||
import com.mikepenz.iconics.IconicsDrawable
|
||||
import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial
|
||||
import com.mikepenz.iconics.utils.colorInt
|
||||
import com.mikepenz.iconics.utils.sizeDp
|
||||
import pl.szczodrzynski.edziennik.ext.toDrawable
|
||||
|
||||
open class TextInputDropDown : TextInputEditText {
|
||||
constructor(context: Context) : super(context) {
|
||||
@ -39,10 +37,7 @@ open class TextInputDropDown : TextInputEditText {
|
||||
|
||||
@SuppressLint("RestrictedApi")
|
||||
open fun create(context: Context) {
|
||||
val drawable = IconicsDrawable(context, CommunityMaterial.Icon.cmd_chevron_down).apply {
|
||||
colorInt = Themes.getPrimaryTextColor(context)
|
||||
sizeDp = 24
|
||||
}
|
||||
val drawable = CommunityMaterial.Icon.cmd_chevron_down.toDrawable()
|
||||
|
||||
setCompoundDrawablesWithIntrinsicBounds(null, null, drawable, null)
|
||||
isFocusableInTouchMode = false
|
||||
|
@ -1,18 +0,0 @@
|
||||
package pl.szczodrzynski.edziennik.utils
|
||||
|
||||
import android.content.Context
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.annotation.StyleRes
|
||||
import pl.szczodrzynski.edziennik.R
|
||||
import pl.szczodrzynski.navlib.getColorFromAttr
|
||||
|
||||
object Themes {
|
||||
|
||||
fun getPrimaryTextColor(context: Context): Int {
|
||||
return getColorFromAttr(context, android.R.attr.textColorPrimary)
|
||||
}
|
||||
|
||||
fun getSecondaryTextColor(context: Context): Int {
|
||||
return getColorFromAttr(context, android.R.attr.textColorSecondary)
|
||||
}
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2021-3-27.
|
||||
-->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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"
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/rootFrame"
|
||||
android:layout_width="match_parent"
|
||||
@ -9,8 +10,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:keepScreenOn="true">
|
||||
android:keepScreenOn="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
@ -20,20 +21,22 @@
|
||||
android:layout_marginRight="8dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/counter_activity_sync"
|
||||
android:textSize="12sp"
|
||||
android:textColor="#ff606060" />
|
||||
android:textColor="#ff606060"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/bellSync"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:padding="10dp"
|
||||
tools:tint="#ff404040"
|
||||
tools:src="@sample/settings" />
|
||||
tools:src="@sample/settings"
|
||||
tools:tint="#ff404040" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
@ -10,18 +11,18 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
tools:ignore="UselessParent"
|
||||
android:layout_alignParentLeft="true">
|
||||
tools:ignore="UselessParent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/customactivityoncrash_activity_vertical_margin"
|
||||
android:paddingHorizontal="@dimen/customactivityoncrash_activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/customactivityoncrash_activity_vertical_margin">
|
||||
android:paddingTop="@dimen/customactivityoncrash_activity_vertical_margin"
|
||||
android:paddingBottom="@dimen/customactivityoncrash_activity_vertical_margin">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="96dp"
|
||||
@ -35,7 +36,7 @@
|
||||
android:layout_marginTop="@dimen/customactivityoncrash_activity_vertical_margin"
|
||||
android:gravity="center"
|
||||
android:text="@string/crash_title"
|
||||
android:textAppearance="?textAppearanceHeadlineSmall"/>
|
||||
android:textAppearance="?textAppearanceHeadlineSmall" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/crash_notice"
|
||||
@ -98,14 +99,12 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/crash_details" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
app:srcCompat="@mipmap/ic_splash_v5" />
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</RelativeLayout>
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/feedbackFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
@ -1,36 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/rootFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".MainActivity"
|
||||
tools:theme="@style/AppTheme.Black">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/rootFrame"
|
||||
<pl.szczodrzynski.navlib.NavView
|
||||
android:id="@+id/navView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:animateLayoutChanges="true">
|
||||
|
||||
<pl.szczodrzynski.navlib.NavView
|
||||
android:id="@+id/navView"
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/swipeRefreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:animateLayoutChanges="true">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/swipeRefreshLayout"
|
||||
<FrameLayout
|
||||
android:id="@+id/fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<include layout="@layout/fragment_loading" />
|
||||
</FrameLayout>
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
</pl.szczodrzynski.navlib.NavView>
|
||||
</FrameLayout>
|
||||
|
||||
</layout>
|
||||
<include layout="@layout/fragment_loading" />
|
||||
</FrameLayout>
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
</pl.szczodrzynski.navlib.NavView>
|
||||
</FrameLayout>
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2021-4-11.
|
||||
-->
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/card"
|
||||
android:layout_width="match_parent"
|
||||
@ -43,11 +43,11 @@
|
||||
android:id="@+id/badgeBackground"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="@drawable/bg_rounded_8dp"
|
||||
android:layout_marginRight="-24dp"
|
||||
android:layout_marginEnd="-24dp"
|
||||
android:layout_marginTop="-24dp"
|
||||
tools:backgroundTint="?android:colorBackground"/>
|
||||
android:layout_marginEnd="-24dp"
|
||||
android:layout_marginRight="-24dp"
|
||||
android:background="@drawable/bg_rounded_8dp"
|
||||
tools:backgroundTint="?android:colorBackground" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2021-4-8.
|
||||
-->
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/card"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2021-4-8.
|
||||
-->
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/card"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2021-4-10.
|
||||
-->
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/card"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2021-4-11.
|
||||
-->
|
||||
|
||||
<com.github.tibolte.agendacalendarview.agenda.AgendaEventView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.github.tibolte.agendacalendarview.agenda.AgendaEventView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2021-4-9.
|
||||
-->
|
||||
|
||||
<com.github.tibolte.agendacalendarview.agenda.AgendaEventView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.github.tibolte.agendacalendarview.agenda.AgendaEventView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2021-4-11.
|
||||
-->
|
||||
|
||||
<com.github.tibolte.agendacalendarview.agenda.AgendaEventView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.github.tibolte.agendacalendarview.agenda.AgendaEventView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2021-4-10.
|
||||
-->
|
||||
|
||||
<com.github.tibolte.agendacalendarview.agenda.AgendaEventView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.github.tibolte.agendacalendarview.agenda.AgendaEventView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -1,36 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2020-4-1.
|
||||
-->
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<FrameLayout
|
||||
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"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="8dp">
|
||||
|
||||
<FrameLayout
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/chip"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="8dp">
|
||||
android:layout_height="48dp"
|
||||
android:ellipsize="middle"
|
||||
app:chipIconSize="24dp"
|
||||
app:chipIconVisible="true"
|
||||
app:closeIconSize="18dp"
|
||||
app:closeIconVisible="false"
|
||||
tools:chipIcon="@android:drawable/ic_menu_delete"
|
||||
tools:closeIcon="@drawable/ic_account_circle"
|
||||
tools:closeIconVisible="true"
|
||||
tools:text="Zadanie z matematyki.pdf" />
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/chip"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:ellipsize="middle"
|
||||
app:chipIconSize="24dp"
|
||||
app:chipIconVisible="true"
|
||||
app:closeIconSize="18dp"
|
||||
app:closeIconVisible="false"
|
||||
tools:chipIcon="@android:drawable/ic_menu_delete"
|
||||
tools:closeIcon="@drawable/ic_account_circle"
|
||||
tools:closeIconVisible="true"
|
||||
tools:text="Zadanie z matematyki.pdf" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:layout_marginHorizontal="8dp" />
|
||||
</FrameLayout>
|
||||
</layout>
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:layout_marginHorizontal="8dp" />
|
||||
</FrameLayout>
|
||||
|
@ -1,56 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2020-5-4.
|
||||
-->
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<ScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ScrollView
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp">
|
||||
|
||||
<LinearLayout
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@string/attendance_config_title"
|
||||
android:textAppearance="?textAppearanceTitleMedium" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/useSymbols"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp">
|
||||
android:minHeight="32dp"
|
||||
android:text="@string/attendance_config_use_symbols" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@string/attendance_config_title"
|
||||
android:textAppearance="?textAppearanceTitleMedium" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="32dp"
|
||||
android:text="@string/attendance_config_use_symbols_hint"
|
||||
android:textAppearance="?textAppearanceBodySmall" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/useSymbols"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="32dp"
|
||||
android:text="@string/attendance_config_use_symbols" />
|
||||
<CheckBox
|
||||
android:id="@+id/groupConsecutiveDays"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:minHeight="32dp"
|
||||
android:text="@string/attendance_config_group_consecutive_days" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="32dp"
|
||||
android:text="@string/attendance_config_use_symbols_hint"
|
||||
android:textAppearance="?textAppearanceBodySmall" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/groupConsecutiveDays"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:minHeight="32dp"
|
||||
android:text="@string/attendance_config_group_consecutive_days" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/showPresenceInMonth"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:minHeight="32dp"
|
||||
android:text="@string/attendance_config_show_presence_in_month" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</layout>
|
||||
<CheckBox
|
||||
android:id="@+id/showPresenceInMonth"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:minHeight="32dp"
|
||||
android:text="@string/attendance_config_show_presence_in_month" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
@ -1,19 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2020-5-9.
|
||||
-->
|
||||
|
||||
<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">
|
||||
<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">
|
||||
|
||||
<data>
|
||||
<import type="android.view.View"/>
|
||||
<import type="pl.szczodrzynski.edziennik.utils.Utils"/>
|
||||
<import type="pl.szczodrzynski.edziennik.utils.models.Date"/>
|
||||
<import type="pl.szczodrzynski.edziennik.utils.models.Time"/>
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<import type="pl.szczodrzynski.edziennik.utils.Utils" />
|
||||
|
||||
<import type="pl.szczodrzynski.edziennik.utils.models.Date" />
|
||||
|
||||
<import type="pl.szczodrzynski.edziennik.utils.models.Time" />
|
||||
|
||||
<variable
|
||||
name="attendance"
|
||||
type="pl.szczodrzynski.edziennik.data.db.full.AttendanceFull" />
|
||||
|
||||
<variable
|
||||
name="devMode"
|
||||
type="boolean" />
|
||||
@ -45,8 +52,8 @@
|
||||
android:text="@{attendance.typeShort}"
|
||||
android:textIsSelectable="true"
|
||||
android:textSize="36sp"
|
||||
app:autoSizeMinTextSize="18sp"
|
||||
app:autoSizeMaxTextSize="56sp"
|
||||
app:autoSizeMinTextSize="18sp"
|
||||
app:autoSizeTextType="uniform"
|
||||
tools:background="#ff673ab7"
|
||||
tools:text="e" />
|
||||
@ -82,7 +89,6 @@
|
||||
android:textAppearance="?textAppearanceTitleLarge"
|
||||
android:textIsSelectable="true"
|
||||
tools:text="matematyka" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@ -159,17 +165,17 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:isVisible="@{attendance.lessonTopic != null}"
|
||||
android:text="@string/attendance_details_lesson_topic"
|
||||
android:textAppearance="?textAppearanceLabelMedium"
|
||||
android:isVisible="@{attendance.lessonTopic != null}" />
|
||||
android:textAppearance="?textAppearanceLabelMedium" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="0dp"
|
||||
android:isVisible="@{attendance.lessonTopic != null}"
|
||||
android:text="@{attendance.lessonTopic}"
|
||||
android:textIsSelectable="true"
|
||||
android:isVisible="@{attendance.lessonTopic != null}"
|
||||
tools:text="Malowanie autoportretu na ścianie sali gimnastycznej. Modlitwa w terenie." />
|
||||
|
||||
<TextView
|
||||
@ -190,9 +196,9 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:baselineAligned="false"
|
||||
android:isVisible="@{devMode}">
|
||||
android:isVisible="@{devMode}"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
|
@ -1,14 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2020-4-29.
|
||||
-->
|
||||
|
||||
<layout xmlns:tools="http://schemas.android.com/tools"
|
||||
<layout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
<import type="android.view.View"/>
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<variable
|
||||
name="simpleMode"
|
||||
type="Boolean" />
|
||||
@ -50,7 +52,6 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="Nieobecność nieusprawiedliwiona" />
|
||||
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsTextView
|
||||
android:id="@+id/subjectName"
|
||||
android:layout_width="0dp"
|
||||
|
@ -1,92 +1,89 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2020-4-30.
|
||||
-->
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?selectableItemBackground"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@drawable/divider" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="?selectableItemBackground">
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textAppearance="?textAppearanceBodyLarge"
|
||||
tools:text="2 marca - 3 marca" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@drawable/divider"/>
|
||||
android:id="@+id/unread"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:background="@drawable/unread_red_circle"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsImageView
|
||||
android:id="@+id/dropdownIcon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:scaleType="centerInside"
|
||||
app:iiv_color="?android:textColorSecondary"
|
||||
app:iiv_icon="cmd-chevron-down"
|
||||
app:iiv_size="24dp"
|
||||
tools:src="@android:drawable/ic_menu_more" />
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginBottom="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/previewContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
android:baselineAligned="false"
|
||||
android:orientation="horizontal"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textAppearance="?textAppearanceBodyLarge"
|
||||
tools:text="2 marca - 3 marca" />
|
||||
|
||||
<View
|
||||
android:id="@+id/unread"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/unread_red_circle"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsImageView
|
||||
android:id="@+id/dropdownIcon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:scaleType="centerInside"
|
||||
app:iiv_color="?android:textColorSecondary"
|
||||
app:iiv_icon="cmd-chevron-down"
|
||||
app:iiv_size="24dp"
|
||||
tools:src="@android:drawable/ic_menu_more" />
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
<TextView
|
||||
android:id="@+id/summaryContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginBottom="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/previewContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:baselineAligned="false"
|
||||
android:orientation="horizontal"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/summaryContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:visibility="gone"
|
||||
tools:text="6 nieob. • 2 nieob. nieuspr. • 5 spóźnień"
|
||||
tools:text1="Cały rok: 3 oceny • suma: 320 pkt"
|
||||
tools:text2="Cały rok: 15 ocen • średnia: 2,62"
|
||||
tools:visibility="visible" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:visibility="gone"
|
||||
tools:text="6 nieob. • 2 nieob. nieuspr. • 5 spóźnień"
|
||||
tools:text1="Cały rok: 3 oceny • suma: 320 pkt"
|
||||
tools:text2="Cały rok: 15 ocen • średnia: 2,62"
|
||||
tools:visibility="visible" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
@ -1,20 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2020-5-4.
|
||||
-->
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/attendance_empty_text"
|
||||
android:textAppearance="?textAppearanceBodyLarge" />
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/attendance_empty_text"
|
||||
android:textAppearance="?textAppearanceBodyLarge" />
|
||||
</LinearLayout>
|
||||
|
@ -1,129 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2020-5-1.
|
||||
-->
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?selectableItemBackground"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@drawable/divider" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="?selectableItemBackground">
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textAppearance="?textAppearanceBodyLarge"
|
||||
tools:text="Kwiecień 2020" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@drawable/divider"/>
|
||||
android:id="@+id/unread"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:background="@drawable/unread_red_circle"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<LinearLayout
|
||||
<TextView
|
||||
android:id="@+id/percentage"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
tools:text="99,5%" />
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsImageView
|
||||
android:id="@+id/dropdownIcon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:scaleType="centerInside"
|
||||
app:iiv_color="?android:textColorSecondary"
|
||||
app:iiv_icon="cmd-chevron-down"
|
||||
app:iiv_size="24dp"
|
||||
tools:src="@android:drawable/ic_menu_more" />
|
||||
</LinearLayout>
|
||||
|
||||
<pl.szczodrzynski.edziennik.ui.attendance.AttendanceBar
|
||||
android:id="@+id/attendanceBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginHorizontal="8dp" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.flexbox.FlexboxLayout
|
||||
android:id="@+id/previewContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="8dp"
|
||||
android:visibility="gone"
|
||||
app:flexWrap="wrap"
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textAppearance="?textAppearanceBodyLarge"
|
||||
tools:text="Kwiecień 2020" />
|
||||
|
||||
<View
|
||||
android:id="@+id/unread"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/unread_red_circle"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/percentage"
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
tools:text="99,5%" />
|
||||
android:paddingTop="8dp">
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsImageView
|
||||
android:id="@+id/dropdownIcon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:scaleType="centerInside"
|
||||
app:iiv_color="?android:textColorSecondary"
|
||||
app:iiv_icon="cmd-chevron-down"
|
||||
app:iiv_size="24dp"
|
||||
tools:src="@android:drawable/ic_menu_more" />
|
||||
</LinearLayout>
|
||||
|
||||
<pl.szczodrzynski.edziennik.ui.attendance.AttendanceBar
|
||||
android:id="@+id/attendanceBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginHorizontal="8dp"/>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.flexbox.FlexboxLayout
|
||||
android:id="@+id/previewContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="8dp"
|
||||
android:visibility="gone"
|
||||
app:flexWrap="wrap"
|
||||
tools:visibility="visible">
|
||||
|
||||
<LinearLayout
|
||||
<pl.szczodrzynski.edziennik.ui.attendance.AttendanceView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp">
|
||||
tools:background="@drawable/bg_rounded_4dp"
|
||||
tools:backgroundTint="#43a047"
|
||||
tools:layout_marginEnd="5dp"
|
||||
tools:layout_marginRight="5dp"
|
||||
tools:paddingHorizontal="5dp"
|
||||
tools:singleLine="true"
|
||||
tools:text="w"
|
||||
tools:textSize="14sp" />
|
||||
|
||||
<pl.szczodrzynski.edziennik.ui.attendance.AttendanceView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:background="@drawable/bg_rounded_4dp"
|
||||
tools:backgroundTint="#43a047"
|
||||
tools:layout_marginEnd="5dp"
|
||||
tools:layout_marginRight="5dp"
|
||||
tools:paddingHorizontal="5dp"
|
||||
tools:singleLine="true"
|
||||
tools:text="w"
|
||||
tools:textSize="14sp" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:layout_marginEnd="5dp"
|
||||
tools:layout_marginRight="5dp"
|
||||
tools:text="6,8%" />
|
||||
</LinearLayout>
|
||||
</com.google.android.flexbox.FlexboxLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:layout_marginEnd="5dp"
|
||||
tools:layout_marginRight="5dp"
|
||||
tools:text="6,8%" />
|
||||
</LinearLayout>
|
||||
</com.google.android.flexbox.FlexboxLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/summaryContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:paddingVertical="8dp"
|
||||
android:textAppearance="?textAppearanceBodySmall"
|
||||
tools:text="Obecność w tym okresie: 100%" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
<TextView
|
||||
android:id="@+id/summaryContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:paddingVertical="8dp"
|
||||
android:textAppearance="?textAppearanceBodySmall"
|
||||
tools:text="Obecność w tym okresie: 100%" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
@ -1,79 +1,76 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2020-5-5.
|
||||
-->
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?selectableItemBackground"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@drawable/divider" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="?selectableItemBackground">
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textAppearance="?textAppearanceBodyLarge"
|
||||
tools:text="historia i społeczeństwo" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@drawable/divider"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textAppearance="?textAppearanceBodyLarge"
|
||||
tools:text="historia i społeczeństwo" />
|
||||
|
||||
<View
|
||||
android:id="@+id/unread"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/unread_red_circle"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/percentage"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
tools:text="6,5%" />
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsImageView
|
||||
android:id="@+id/dropdownIcon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:scaleType="centerInside"
|
||||
app:iiv_color="?android:textColorSecondary"
|
||||
app:iiv_icon="cmd-chevron-down"
|
||||
app:iiv_size="24dp"
|
||||
tools:src="@android:drawable/ic_menu_more" />
|
||||
</LinearLayout>
|
||||
|
||||
<pl.szczodrzynski.edziennik.ui.attendance.AttendanceBar
|
||||
android:id="@+id/attendanceBar"
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/unread"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:layout_marginBottom="8dp" />
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:background="@drawable/unread_red_circle"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/percentage"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
tools:text="6,5%" />
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsImageView
|
||||
android:id="@+id/dropdownIcon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:scaleType="centerInside"
|
||||
app:iiv_color="?android:textColorSecondary"
|
||||
app:iiv_icon="cmd-chevron-down"
|
||||
app:iiv_size="24dp"
|
||||
tools:src="@android:drawable/ic_menu_more" />
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
|
||||
<pl.szczodrzynski.edziennik.ui.attendance.AttendanceBar
|
||||
android:id="@+id/attendanceBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="12dp"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:layout_marginBottom="8dp" />
|
||||
</LinearLayout>
|
||||
|
@ -1,95 +1,92 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2020-5-8.
|
||||
-->
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?selectableItemBackground"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@drawable/divider" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="?selectableItemBackground">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@drawable/divider"/>
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="48dp"
|
||||
<pl.szczodrzynski.edziennik.ui.attendance.AttendanceView
|
||||
android:id="@+id/type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<pl.szczodrzynski.edziennik.ui.attendance.AttendanceView
|
||||
android:id="@+id/type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:background="@drawable/bg_rounded_4dp"
|
||||
tools:backgroundTint="#43a047"
|
||||
tools:paddingHorizontal="5dp"
|
||||
tools:singleLine="true"
|
||||
tools:text="ob"
|
||||
tools:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textAppearance="?textAppearanceBodyLarge"
|
||||
tools:text="obecność" />
|
||||
|
||||
<View
|
||||
android:id="@+id/unread"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/unread_red_circle"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsImageView
|
||||
android:id="@+id/dropdownIcon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:scaleType="centerInside"
|
||||
app:iiv_color="?android:textColorSecondary"
|
||||
app:iiv_icon="cmd-chevron-down"
|
||||
app:iiv_size="24dp"
|
||||
tools:background="@android:drawable/ic_menu_more" />
|
||||
tools:background="@drawable/bg_rounded_4dp"
|
||||
tools:backgroundTint="#43a047"
|
||||
tools:paddingHorizontal="5dp"
|
||||
tools:singleLine="true"
|
||||
tools:text="ob"
|
||||
tools:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/details"
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:textAppearance="?textAppearanceBodySmall"
|
||||
tools:text="57,67% • 521 przez cały rok • 134 w tym semestrze"
|
||||
tools:text1="Cały rok: 3 oceny • suma: 320 pkt"
|
||||
tools:text2="Cały rok: 15 ocen • średnia: 2,62" />
|
||||
android:layout_margin="8dp"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textAppearance="?textAppearanceBodyLarge"
|
||||
tools:text="obecność" />
|
||||
|
||||
<View
|
||||
android:id="@+id/unread"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:background="@drawable/unread_red_circle"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsImageView
|
||||
android:id="@+id/dropdownIcon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:scaleType="centerInside"
|
||||
app:iiv_color="?android:textColorSecondary"
|
||||
app:iiv_icon="cmd-chevron-down"
|
||||
app:iiv_size="24dp"
|
||||
tools:background="@android:drawable/ic_menu_more" />
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/details"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:textAppearance="?textAppearanceBodySmall"
|
||||
tools:text="57,67% • 521 przez cały rok • 134 w tym semestrze"
|
||||
tools:text1="Cały rok: 3 oceny • suma: 320 pkt"
|
||||
tools:text2="Cały rok: 15 ocen • średnia: 2,62" />
|
||||
</LinearLayout>
|
||||
|
@ -1,42 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2020-4-30.
|
||||
-->
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<FrameLayout
|
||||
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">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<FrameLayout
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/noData"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:drawablePadding="16dp"
|
||||
android:gravity="center"
|
||||
android:padding="16dp"
|
||||
android:text="@string/attendances_no_data"
|
||||
android:textAppearance="?textAppearanceHeadlineSmall"
|
||||
android:visibility="gone"
|
||||
app:drawableTopCompat="@drawable/ic_no_grades"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/noData"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:drawablePadding="16dp"
|
||||
android:gravity="center"
|
||||
android:padding="16dp"
|
||||
android:textAppearance="?textAppearanceHeadlineSmall"
|
||||
android:text="@string/attendances_no_data"
|
||||
android:visibility="gone"
|
||||
app:drawableTopCompat="@drawable/ic_no_grades"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"
|
||||
tools:listitem="@layout/attendance_item_attendance"
|
||||
tools:visibility="visible" />
|
||||
</FrameLayout>
|
||||
</layout>
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"
|
||||
tools:listitem="@layout/attendance_item_attendance"
|
||||
tools:visibility="visible" />
|
||||
</FrameLayout>
|
||||
|
@ -1,172 +1,169 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2020-5-4.
|
||||
-->
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
<com.google.android.material.button.MaterialButtonToggleGroup
|
||||
android:id="@+id/toggleGroup"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:gravity="center_horizontal"
|
||||
app:selectionRequired="true"
|
||||
app:singleSelection="true">
|
||||
|
||||
<com.google.android.material.button.MaterialButtonToggleGroup
|
||||
android:id="@+id/toggleGroup"
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/semester1"
|
||||
style="?materialButtonOutlinedStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Semestr 1" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/semester2"
|
||||
style="?materialButtonOutlinedStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Semestr 2" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/allYear"
|
||||
style="?materialButtonOutlinedStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Cały rok" />
|
||||
</com.google.android.material.button.MaterialButtonToggleGroup>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/scrollView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
app:singleSelection="true"
|
||||
app:selectionRequired="true"
|
||||
android:gravity="center_horizontal">
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/semester1"
|
||||
style="?materialButtonOutlinedStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Semestr 1" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/semester2"
|
||||
style="?materialButtonOutlinedStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Semestr 2" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/allYear"
|
||||
style="?materialButtonOutlinedStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Cały rok" />
|
||||
</com.google.android.material.button.MaterialButtonToggleGroup>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/scrollView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/statsLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/statsLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/percentage"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:textAppearance="?textAppearanceTitleMedium"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="Obecność w tym okresie: 99,7%" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/percentage"
|
||||
android:layout_width="0dp"
|
||||
<antonkozyriatskyi.circularprogressindicator.CircularProgressIndicator
|
||||
android:id="@+id/percentageCircle"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:visibility="invisible"
|
||||
app:direction="clockwise"
|
||||
app:drawDot="false"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:progressBackgroundStrokeWidth="9dp"
|
||||
app:progressCap="butt"
|
||||
app:progressStrokeWidth="10dp"
|
||||
app:textSize="0sp"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<pl.szczodrzynski.edziennik.ui.attendance.AttendanceBar
|
||||
android:id="@+id/attendanceBar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toStartOf="@+id/percentageCircle"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/percentage"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.google.android.flexbox.FlexboxLayout
|
||||
android:id="@+id/previewContainer"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:orientation="horizontal"
|
||||
app:flexWrap="wrap"
|
||||
app:layout_constraintEnd_toStartOf="@+id/percentageCircle"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/attendanceBar">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:textAppearance="?textAppearanceTitleMedium"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="Obecność w tym okresie: 99,7%" />
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<antonkozyriatskyi.circularprogressindicator.CircularProgressIndicator
|
||||
android:id="@+id/percentageCircle"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:direction="clockwise"
|
||||
app:drawDot="false"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:progressBackgroundStrokeWidth="9dp"
|
||||
app:progressStrokeWidth="10dp"
|
||||
app:progressCap="butt"
|
||||
app:textSize="0sp"
|
||||
android:visibility="invisible"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<pl.szczodrzynski.edziennik.ui.attendance.AttendanceBar
|
||||
android:id="@+id/attendanceBar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:layout_marginTop="4dp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/percentageCircle"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/percentage"
|
||||
android:visibility="invisible"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.google.android.flexbox.FlexboxLayout
|
||||
android:id="@+id/previewContainer"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:orientation="horizontal"
|
||||
app:flexWrap="wrap"
|
||||
app:layout_constraintEnd_toStartOf="@+id/percentageCircle"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/attendanceBar">
|
||||
|
||||
<LinearLayout
|
||||
<pl.szczodrzynski.edziennik.ui.attendance.AttendanceView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="8dp">
|
||||
tools:background="@drawable/bg_rounded_4dp"
|
||||
tools:backgroundTint="#43a047"
|
||||
tools:layout_marginEnd="5dp"
|
||||
tools:layout_marginRight="5dp"
|
||||
tools:paddingHorizontal="5dp"
|
||||
tools:singleLine="true"
|
||||
tools:text="w"
|
||||
tools:textSize="14sp" />
|
||||
|
||||
<pl.szczodrzynski.edziennik.ui.attendance.AttendanceView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:background="@drawable/bg_rounded_4dp"
|
||||
tools:backgroundTint="#43a047"
|
||||
tools:layout_marginEnd="5dp"
|
||||
tools:layout_marginRight="5dp"
|
||||
tools:paddingHorizontal="5dp"
|
||||
tools:singleLine="true"
|
||||
tools:text="w"
|
||||
tools:textSize="14sp" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:layout_marginEnd="5dp"
|
||||
tools:layout_marginRight="5dp"
|
||||
tools:text="6,8%" />
|
||||
</LinearLayout>
|
||||
</com.google.android.flexbox.FlexboxLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:layout_marginEnd="5dp"
|
||||
tools:layout_marginRight="5dp"
|
||||
tools:text="6,8%" />
|
||||
</LinearLayout>
|
||||
</com.google.android.flexbox.FlexboxLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginVertical="64dp"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginVertical="64dp"
|
||||
tools:visibility="gone" />
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/noData"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:drawablePadding="16dp"
|
||||
android:gravity="center"
|
||||
android:padding="16dp"
|
||||
android:text="@string/attendances_no_data"
|
||||
android:textAppearance="?textAppearanceHeadlineSmall"
|
||||
android:visibility="gone"
|
||||
app:drawableTopCompat="@drawable/ic_no_grades"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/noData"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:drawablePadding="16dp"
|
||||
android:gravity="center"
|
||||
android:padding="16dp"
|
||||
android:text="@string/attendances_no_data"
|
||||
android:textAppearance="?textAppearanceHeadlineSmall"
|
||||
android:visibility="gone"
|
||||
app:drawableTopCompat="@drawable/ic_no_grades"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
tools:listitem="@layout/attendance_item_attendance"
|
||||
tools:visibility="visible" />
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
tools:listitem="@layout/attendance_item_attendance"
|
||||
tools:visibility="visible" />
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</LinearLayout>
|
||||
|
@ -1,10 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2020-1-8.
|
||||
-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
@ -1,16 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2019-11-23.
|
||||
-->
|
||||
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
style="?attr/materialCardViewFilledStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginVertical="8dp"
|
||||
android:padding="16dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
style="?attr/materialCardViewFilledStyle"
|
||||
android:padding="16dp"
|
||||
app:shapeAppearance="@style/ShapeAppearance.Material3.Corner.ExtraLarge" />
|
||||
|
@ -1,51 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2020-8-25.
|
||||
-->
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingTop="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingTop="8dp">
|
||||
<com.mikepenz.iconics.view.IconicsImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:iiv_color="?colorOnSecondaryContainer"
|
||||
app:iiv_icon="szf-archive"
|
||||
app:iiv_size="24dp"
|
||||
tools:background="@sample/settings"
|
||||
tools:backgroundTint="?colorOnSecondaryContainer" />
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:iiv_color="?colorOnSecondaryContainer"
|
||||
app:iiv_icon="szf-archive"
|
||||
app:iiv_size="24dp"
|
||||
tools:background="@sample/settings"
|
||||
tools:backgroundTint="?colorOnSecondaryContainer" />
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/home_archive_title"
|
||||
android:textAppearance="?textAppearanceTitleMedium" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/home_archive_title"
|
||||
android:textAppearance="?textAppearanceTitleMedium" />
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/homeArchiveText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="left"
|
||||
android:gravity="left"
|
||||
android:text="@string/home_archive_text"
|
||||
tools:text="Przeglądasz dane ucznia z roku szkolnego 2019/2020." />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/homeArchiveText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="left"
|
||||
android:gravity="left"
|
||||
android:text="@string/home_archive_text"
|
||||
tools:text="Przeglądasz dane ucznia z roku szkolnego 2019/2020." />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/homeArchiveClose"
|
||||
style="?materialButtonSecondaryStyle"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/home_archive_close" />
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/homeArchiveClose"
|
||||
style="?materialButtonSecondaryStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/home_archive_close" />
|
||||
</LinearLayout>
|
||||
|
@ -1,54 +1,56 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2020-9-3.
|
||||
-->
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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">
|
||||
<LinearLayout
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingTop="8dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/homeAvailabilityIcon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:srcCompat="@drawable/ic_update" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/homeAvailabilityTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingTop="8dp"
|
||||
android:orientation="vertical">
|
||||
<ImageView
|
||||
android:id="@+id/homeAvailabilityIcon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:srcCompat="@drawable/ic_update" />
|
||||
<TextView
|
||||
android:id="@+id/homeAvailabilityTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/home_availability_title"
|
||||
android:textAppearance="?textAppearanceTitleMedium" />
|
||||
android:text="@string/home_availability_title"
|
||||
android:textAppearance="?textAppearanceTitleMedium" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/homeAvailabilityText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/home_availability_text"
|
||||
tools:text="Zaktualizuj aplikację do najnowszej wersji 4.3.1." />
|
||||
<TextView
|
||||
android:id="@+id/homeAvailabilityText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/home_availability_text"
|
||||
tools:text="Zaktualizuj aplikację do najnowszej wersji 4.3.1." />
|
||||
|
||||
<LinearLayout
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="16dp">
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/homeAvailabilityUpdate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/home_availability_update" />
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/homeAvailabilityInfo"
|
||||
style="?materialButtonSecondaryStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:text="@string/home_availability_info" />
|
||||
</LinearLayout>
|
||||
android:layout_marginTop="16dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/homeAvailabilityUpdate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/home_availability_update" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/homeAvailabilityInfo"
|
||||
style="?materialButtonSecondaryStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:text="@string/home_availability_info" />
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
</LinearLayout>
|
||||
|
@ -1,78 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2019-12-22.
|
||||
-->
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
tools:ignore="HardcodedText"
|
||||
tools:layout_margin="8dp">
|
||||
|
||||
<LinearLayout
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Warning! Do not move this debug card, or you will probably confuse the internal card ID list, thus resulting in a weird and (maybe)non-undoable card order." />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/librusCaptchaButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
tools:layout_margin="8dp"
|
||||
tools:ignore="HardcodedText">
|
||||
android:text="LIBRUS® Captcha" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Warning! Do not move this debug card, or you will probably confuse the internal card ID list, thus resulting in a weird and (maybe)non-undoable card order."/>
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/refreshWidget"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Refresh all widgets" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/librusCaptchaButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="LIBRUS® Captcha" />
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Network"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/refreshWidget"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Refresh all widgets" />
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/runChucker"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Launch Chucker" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Network"
|
||||
android:textSize="16sp"/>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Messages"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/runChucker"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Launch Chucker" />
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/migrate71"
|
||||
style="?materialButtonOutlinedStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Migration 71" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Messages"
|
||||
android:textSize="16sp"/>
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/syncReceivers"
|
||||
style="?materialButtonOutlinedStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Sync receivers" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/migrate71"
|
||||
style="?materialButtonOutlinedStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Migration 71" />
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Sync"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/syncReceivers"
|
||||
style="?materialButtonOutlinedStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Sync receivers" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Sync"
|
||||
android:textSize="16sp"/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/pruneWorkButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Prune finished work" />
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/pruneWorkButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Prune finished work" />
|
||||
</LinearLayout>
|
||||
|
@ -2,62 +2,59 @@
|
||||
~ Copyright (c) Kuba Szczodrzyński 2020-2-28.
|
||||
-->
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<pl.szczodrzynski.edziennik.ui.base.views.IconicsMaterialButton
|
||||
style="?materialIconButtonContainerStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:clickable="false"
|
||||
app:iiv_color="?colorOnPrimaryContainer"
|
||||
app:iiv_icon="cmd-calendar-multiple"
|
||||
app:iiv_size="24dp"
|
||||
tools:icon="@sample/settings"
|
||||
tools:iconTint="?colorOnPrimaryContainer" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="vertical">
|
||||
|
||||
<pl.szczodrzynski.edziennik.ui.base.views.IconicsMaterialButton
|
||||
style="?materialIconButtonContainerStyle"
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/card_events_header_title"
|
||||
android:textAppearance="?textAppearanceTitleMedium" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventsNoData"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:clickable="false"
|
||||
app:iiv_color="?colorOnPrimaryContainer"
|
||||
app:iiv_icon="cmd-calendar-multiple"
|
||||
app:iiv_size="24dp"
|
||||
tools:icon="@sample/settings"
|
||||
tools:iconTint="?colorOnPrimaryContainer" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/card_events_header_title"
|
||||
android:textAppearance="?textAppearanceTitleMedium" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventsNoData"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="left"
|
||||
android:text="@string/events_no_nearest" />
|
||||
</LinearLayout>
|
||||
android:layout_gravity="left"
|
||||
android:text="@string/events_no_nearest" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/eventsView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipToPadding="false"
|
||||
tools:itemCount="3"
|
||||
tools:listitem="@layout/event_list_item"
|
||||
tools:visibility="visible" />
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/eventsView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipToPadding="false"
|
||||
tools:itemCount="3"
|
||||
tools:listitem="@layout/event_list_item"
|
||||
tools:visibility="visible" />
|
||||
</LinearLayout>
|
||||
|
@ -2,60 +2,56 @@
|
||||
~ Copyright (c) Kacper Ziubryniewicz 2019-11-29
|
||||
-->
|
||||
|
||||
<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">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<pl.szczodrzynski.edziennik.ui.base.views.IconicsMaterialButton
|
||||
style="?materialIconButtonContainerStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:clickable="false"
|
||||
app:iiv_color="?colorOnPrimaryContainer"
|
||||
app:iiv_icon="cmd-numeric-5-box-outline"
|
||||
app:iiv_size="24dp"
|
||||
tools:icon="@sample/settings"
|
||||
tools:iconTint="?colorOnPrimaryContainer" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="vertical">
|
||||
|
||||
<pl.szczodrzynski.edziennik.ui.base.views.IconicsMaterialButton
|
||||
style="?materialIconButtonContainerStyle"
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/card_grades_header_title"
|
||||
android:textAppearance="?textAppearanceTitleMedium" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/noData"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:clickable="false"
|
||||
app:iiv_color="?colorOnPrimaryContainer"
|
||||
app:iiv_icon="cmd-numeric-5-box-outline"
|
||||
app:iiv_size="24dp"
|
||||
tools:icon="@sample/settings"
|
||||
tools:iconTint="?colorOnPrimaryContainer" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/card_grades_header_title"
|
||||
android:textAppearance="?textAppearanceTitleMedium" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/noData"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/card_grades_no_data" />
|
||||
</LinearLayout>
|
||||
android:text="@string/card_grades_no_data" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/gradeList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:orientation="vertical"/>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/gradeList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:orientation="vertical" />
|
||||
</LinearLayout>
|
||||
|
@ -2,56 +2,52 @@
|
||||
~ Copyright (c) Kuba Szczodrzyński 2019-11-24.
|
||||
-->
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
android:orientation="horizontal">
|
||||
|
||||
<pl.szczodrzynski.edziennik.ui.base.views.IconicsMaterialButton
|
||||
android:id="@+id/image"
|
||||
style="?materialIconButtonContainerStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:clickable="false"
|
||||
app:iiv_color="?colorOnPrimaryContainer"
|
||||
app:iiv_icon="cmd-emoticon-sad-outline"
|
||||
app:iiv_size="24dp"
|
||||
tools:icon="@sample/settings"
|
||||
tools:iconTint="?colorOnPrimaryContainer" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
android:orientation="vertical">
|
||||
|
||||
<pl.szczodrzynski.edziennik.ui.base.views.IconicsMaterialButton
|
||||
android:id="@+id/image"
|
||||
style="?materialIconButtonContainerStyle"
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:clickable="false"
|
||||
app:iiv_color="?colorOnPrimaryContainer"
|
||||
app:iiv_icon="cmd-emoticon-sad-outline"
|
||||
app:iiv_size="24dp"
|
||||
tools:icon="@sample/settings"
|
||||
tools:iconTint="?colorOnPrimaryContainer" />
|
||||
android:text="@string/home_lucky_number_no_info"
|
||||
android:textAppearance="?textAppearanceTitleMedium" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
<TextView
|
||||
android:id="@+id/subText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/home_lucky_number_no_info"
|
||||
android:textAppearance="?textAppearanceTitleMedium" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/subText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="Numer w dzienniku to 23" />
|
||||
</LinearLayout>
|
||||
tools:text="Numer w dzienniku to 23" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
</LinearLayout>
|
||||
|
@ -2,9 +2,10 @@
|
||||
~ Copyright (c) Kuba Szczodrzyński 2021-10-28.
|
||||
-->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
<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"
|
||||
@ -44,7 +45,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/notes_no_data" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -1,32 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2019-12-22.
|
||||
-->
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
tools:layout_margin="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
tools:layout_margin="8dp">
|
||||
android:text="Hello world" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Hello world"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/noData"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_margin="16dp"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:gravity="center"
|
||||
android:text="@string/card_grades_no_data"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/noData"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_margin="16dp"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:gravity="center"
|
||||
android:text="@string/card_grades_no_data"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
@ -2,70 +2,155 @@
|
||||
~ Copyright (c) Kuba Szczodrzyński 2019-11-24.
|
||||
-->
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<FrameLayout
|
||||
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">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
tools:layout_margin="8dp">
|
||||
|
||||
<FrameLayout
|
||||
<LinearLayout
|
||||
android:id="@+id/noTimetableLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<pl.szczodrzynski.edziennik.ui.base.views.IconicsMaterialButton
|
||||
android:id="@+id/noTimetableSync"
|
||||
style="?materialIconButtonContainerStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:clickable="false"
|
||||
app:iiv_color="?colorOnPrimaryContainer"
|
||||
app:iiv_icon="szf-sync"
|
||||
app:iiv_size="24dp"
|
||||
tools:icon="@sample/settings"
|
||||
tools:iconTint="?colorOnPrimaryContainer" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/home_timetable_no_timetable"
|
||||
android:textAppearance="?textAppearanceTitleMedium" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/noTimetableText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/home_timetable_no_timetable_text" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/noLessonsLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingTop="8dp"
|
||||
android:visibility="gone"
|
||||
tools:layout_marginTop="100dp"
|
||||
tools:visibility="visible">
|
||||
|
||||
<pl.szczodrzynski.edziennik.ui.base.views.IconicsMaterialButton
|
||||
style="?materialIconButtonContainerStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:clickable="false"
|
||||
app:iiv_color="?colorOnPrimaryContainer"
|
||||
app:iiv_icon="cmd-calendar-month-outline"
|
||||
app:iiv_size="24dp"
|
||||
tools:icon="@sample/settings"
|
||||
tools:iconTint="?colorOnPrimaryContainer" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/home_timetable_no_lessons"
|
||||
android:textAppearance="?textAppearanceTitleMedium" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="left"
|
||||
android:gravity="left"
|
||||
android:text="@string/home_timetable_no_lessons_text" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/notPublicLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp"
|
||||
android:visibility="gone"
|
||||
tools:layout_marginTop="185dp"
|
||||
tools:visibility="visible">
|
||||
|
||||
<pl.szczodrzynski.edziennik.ui.base.views.IconicsMaterialButton
|
||||
style="?materialIconButtonContainerStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:clickable="false"
|
||||
app:iiv_color="?colorOnPrimaryContainer"
|
||||
app:iiv_icon="szf-sync-error"
|
||||
app:iiv_size="24dp"
|
||||
tools:icon="@sample/settings"
|
||||
tools:iconTint="?colorOnPrimaryContainer" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/home_timetable_not_public"
|
||||
android:textAppearance="?textAppearanceTitleMedium" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/home_timetable_not_public_text" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/timetableLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
tools:layout_margin="8dp">
|
||||
android:padding="8dp"
|
||||
tools:layout_marginTop="290dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/noTimetableLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<pl.szczodrzynski.edziennik.ui.base.views.IconicsMaterialButton
|
||||
android:id="@+id/noTimetableSync"
|
||||
style="?materialIconButtonContainerStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:clickable="false"
|
||||
app:iiv_color="?colorOnPrimaryContainer"
|
||||
app:iiv_icon="szf-sync"
|
||||
app:iiv_size="24dp"
|
||||
tools:icon="@sample/settings"
|
||||
tools:iconTint="?colorOnPrimaryContainer" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/home_timetable_no_timetable"
|
||||
android:textAppearance="?textAppearanceTitleMedium" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/noTimetableText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/home_timetable_no_timetable_text" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/noLessonsLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingTop="8dp"
|
||||
android:visibility="gone"
|
||||
tools:layout_marginTop="100dp"
|
||||
tools:visibility="visible">
|
||||
android:orientation="horizontal">
|
||||
|
||||
<pl.szczodrzynski.edziennik.ui.base.views.IconicsMaterialButton
|
||||
style="?materialIconButtonContainerStyle"
|
||||
@ -82,91 +167,54 @@
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:id="@+id/dayInfo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/home_timetable_no_lessons"
|
||||
android:textAppearance="?textAppearanceTitleMedium" />
|
||||
android:textAppearance="?textAppearanceTitleMedium"
|
||||
tools:text="Jutro" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lessonInfo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="left"
|
||||
android:gravity="left"
|
||||
android:text="@string/home_timetable_no_lessons_text" />
|
||||
android:textAppearance="?textAppearanceBodySmall"
|
||||
tools:text="7 lekcji - 8:10 do 14:45" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/settings"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:padding="12dp"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/notPublicLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp"
|
||||
android:visibility="gone"
|
||||
tools:layout_marginTop="185dp"
|
||||
tools:visibility="visible">
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<pl.szczodrzynski.edziennik.ui.base.views.IconicsMaterialButton
|
||||
style="?materialIconButtonContainerStyle"
|
||||
android:layout_width="wrap_content"
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/progress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:clickable="false"
|
||||
app:iiv_color="?colorOnPrimaryContainer"
|
||||
app:iiv_icon="szf-sync-error"
|
||||
app:iiv_size="24dp"
|
||||
tools:icon="@sample/settings"
|
||||
tools:iconTint="?colorOnPrimaryContainer" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/home_timetable_not_public"
|
||||
android:textAppearance="?textAppearanceTitleMedium" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/home_timetable_not_public_text" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/timetableLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp"
|
||||
tools:layout_marginTop="290dp">
|
||||
app:trackCornerRadius="10dp"
|
||||
tools:max="2700"
|
||||
tools:progress="2000"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<pl.szczodrzynski.edziennik.ui.base.views.IconicsMaterialButton
|
||||
style="?materialIconButtonContainerStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:clickable="false"
|
||||
app:iiv_color="?colorOnPrimaryContainer"
|
||||
app:iiv_icon="cmd-calendar-month-outline"
|
||||
app:iiv_size="24dp"
|
||||
tools:icon="@sample/settings"
|
||||
tools:iconTint="?colorOnPrimaryContainer" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@ -174,121 +222,69 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dayInfo"
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/lessonBig"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?textAppearanceTitleMedium"
|
||||
tools:text="Jutro" />
|
||||
tools:text="Pierwsza: informatyka" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lessonInfo"
|
||||
android:id="@+id/counter"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?textAppearanceBodySmall"
|
||||
tools:text="7 lekcji - 8:10 do 14:45" />
|
||||
android:textAppearance="?textAppearanceBodyMedium"
|
||||
tools:text="zostały 2 minuty 35 sekund" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/settings"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:padding="12dp"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="8dp">
|
||||
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/progress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:trackCornerRadius="10dp"
|
||||
tools:max="2700"
|
||||
tools:progress="2000"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
<TextView
|
||||
android:id="@+id/classroomHeading"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
android:text="Sala"
|
||||
android:textAppearance="?textAppearanceTitleMedium"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lessonBig"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?textAppearanceTitleMedium"
|
||||
tools:text="Pierwsza: informatyka" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/counter"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?textAppearanceBodyMedium"
|
||||
tools:text="zostały 2 minuty 35 sekund" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
<TextView
|
||||
android:id="@+id/classroom"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/classroomHeading"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Sala"
|
||||
android:textAppearance="?textAppearanceTitleMedium"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/classroom"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="09a komputerowa" />
|
||||
</LinearLayout>
|
||||
tools:text="09a komputerowa" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nextLessonsTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:textAppearance="?textAppearanceLabelLarge"
|
||||
tools:text="Później:"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nextLessons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="9:05 informatyka\n10:00 urządzenia techniki komputerowej\n11:00 projektowanie lokalnych sieci komputerowych\n11:55 zajęcia z wychowawcą\n13:00 język polski\n14:05 język niemiecki" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/bellSync"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/bell_sync_title"/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/showCounter"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/counter_activity"/>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</layout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nextLessonsTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:textAppearance="?textAppearanceLabelLarge"
|
||||
tools:text="Później:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nextLessons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="9:05 informatyka\n10:00 urządzenia techniki komputerowej\n11:00 projektowanie lokalnych sieci komputerowych\n11:55 zajęcia z wychowawcą\n13:00 język polski\n14:05 język niemiecki" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/bellSync"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/bell_sync_title" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/showCounter"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/counter_activity" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
@ -1,119 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
android:layout_gravity="center"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
tools:visibility="gone" />
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
<ImageView
|
||||
android:id="@+id/konami"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="90dp"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:visibility="gone"
|
||||
app:srcCompat="@drawable/emoji_glasses" />
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?actionBarSize">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/konami"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="90dp"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:visibility="gone"
|
||||
app:srcCompat="@drawable/emoji_glasses" />
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?actionBarSize">
|
||||
android:layout_height="match_parent"
|
||||
android:minHeight="?actionBarSize"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap">
|
||||
|
||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:minHeight="?actionBarSize"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap">
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="?actionBarSize"
|
||||
app:layout_collapseMode="parallax"
|
||||
app:layout_collapseParallaxMultiplier="0.7">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="?actionBarSize"
|
||||
app:layout_collapseMode="parallax"
|
||||
app:layout_collapseParallaxMultiplier="0.7">
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="16dp">
|
||||
|
||||
<FrameLayout
|
||||
<ImageView
|
||||
android:id="@+id/szkolny"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="16dp">
|
||||
android:scaleType="center"
|
||||
android:scaleX="0.8"
|
||||
android:scaleY="0.8"
|
||||
android:src="@mipmap/ic_splash_v5" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/szkolny"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="center"
|
||||
android:scaleX="0.8"
|
||||
android:scaleY="0.8"
|
||||
android:src="@mipmap/ic_splash_v5" />
|
||||
<ImageView
|
||||
android:id="@+id/glove"
|
||||
android:layout_width="144dp"
|
||||
android:layout_height="144dp"
|
||||
android:layout_gravity="center"
|
||||
android:paddingBottom="4dp"
|
||||
android:visibility="gone"
|
||||
app:srcCompat="@drawable/thanos_idle" />
|
||||
</FrameLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/glove"
|
||||
android:layout_width="144dp"
|
||||
android:layout_height="144dp"
|
||||
android:layout_gravity="center"
|
||||
android:paddingBottom="4dp"
|
||||
android:visibility="gone"
|
||||
app:srcCompat="@drawable/thanos_idle" />
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="64dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/app_name"
|
||||
android:textAppearance="?textAppearanceHeadlineMedium" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="64dp"
|
||||
android:layout_marginBottom="48dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/contributors_headline"
|
||||
android:textAppearance="?textAppearanceTitleLarge" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tabLayout"
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?actionBarSize"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="?colorSurfaceContainerLow"
|
||||
android:foreground="@color/colorSurface_2dp"
|
||||
android:minHeight="?actionBarSize"
|
||||
android:visibility="gone"
|
||||
app:tabIndicatorColor="?colorPrimary"
|
||||
app:tabMode="auto"
|
||||
app:tabSelectedTextColor="?colorPrimary"
|
||||
app:tabTextColor="?android:textColorPrimary"
|
||||
tools:visibility="visible" />
|
||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="64dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/app_name"
|
||||
android:textAppearance="?textAppearanceHeadlineMedium" />
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/viewPager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:visibility="visible" />
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="64dp"
|
||||
android:layout_marginBottom="48dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/contributors_headline"
|
||||
android:textAppearance="?textAppearanceTitleLarge" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tabLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?actionBarSize"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="?colorSurfaceContainerLow"
|
||||
android:foreground="@color/colorSurface_2dp"
|
||||
android:minHeight="?actionBarSize"
|
||||
android:visibility="gone"
|
||||
app:tabIndicatorColor="?colorPrimary"
|
||||
app:tabMode="auto"
|
||||
app:tabSelectedTextColor="?colorPrimary"
|
||||
app:tabTextColor="?android:textColorPrimary"
|
||||
tools:visibility="visible" />
|
||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/viewPager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:visibility="visible" />
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</LinearLayout>
|
||||
|
@ -1,10 +1,8 @@
|
||||
<?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.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:listitem="@layout/contributors_list_item" />
|
||||
</layout>
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:listitem="@layout/contributors_list_item" />
|
||||
|
@ -1,49 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?selectableItemBackground"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:padding="12dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_account_circle" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?selectableItemBackground"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
android:layout_gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="16dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:padding="12dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_account_circle" />
|
||||
|
||||
<LinearLayout
|
||||
<TextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="16dp">
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?textAppearanceTitleMedium"
|
||||
tools:text="Jan Kowalski" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?textAppearanceTitleMedium"
|
||||
tools:text="Jan Kowalski" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/subtext"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?textAppearanceBodyMedium"
|
||||
tools:text="\@jan - ∞ contributions" />
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/subtext"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?textAppearanceBodyMedium"
|
||||
tools:text="\@jan - ∞ contributions" />
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
</LinearLayout>
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<ScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
|
@ -1,32 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kacper Ziubryniewicz 2019-12-20
|
||||
-->
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:keepScreenOn="true"
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp">
|
||||
|
||||
<LinearLayout
|
||||
<TextView
|
||||
android:id="@+id/bellSyncHowto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp"
|
||||
android:keepScreenOn="true">
|
||||
tools:text="@string/bell_sync_howto" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bellSyncHowto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="@string/bell_sync_howto" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/bellSyncButton"
|
||||
android:layout_width="128dp"
|
||||
android:layout_height="128dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="32dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
app:srcCompat="@drawable/ic_bell" />
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
<ImageView
|
||||
android:id="@+id/bellSyncButton"
|
||||
android:layout_width="128dp"
|
||||
android:layout_height="128dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="32dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
app:srcCompat="@drawable/ic_bell" />
|
||||
</LinearLayout>
|
||||
|
@ -1,43 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kacper Ziubryniewicz 2019-12-20
|
||||
-->
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<ScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ScrollView
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="wrap_content"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp">
|
||||
|
||||
<LinearLayout
|
||||
<TextView
|
||||
android:id="@+id/bellSyncHowto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:padding="24dp">
|
||||
android:layout_marginBottom="24dp"
|
||||
tools:text="@string/bell_sync_choose_howto" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bellSyncHowto"
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="?textInputFilledDenseStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/bell_sync_time_title">
|
||||
|
||||
<pl.szczodrzynski.edziennik.utils.TextInputDropDown
|
||||
android:id="@+id/timeDropdown"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="24dp"
|
||||
tools:text="@string/bell_sync_choose_howto" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="?textInputFilledDenseStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/bell_sync_time_title">
|
||||
|
||||
<pl.szczodrzynski.edziennik.utils.TextInputDropDown
|
||||
android:id="@+id/timeDropdown"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="false"
|
||||
tools:text="lekcja matematyka (8:00)"/>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</layout>
|
||||
android:enabled="false"
|
||||
tools:text="lekcja matematyka (8:00)" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
@ -2,7 +2,8 @@
|
||||
~ Copyright (c) Kuba Szczodrzyński 2021-4-10.
|
||||
-->
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<layout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
@ -91,9 +92,9 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="32dp"
|
||||
android:isVisible="@{!isAgendaMode}"
|
||||
android:text="@string/agenda_config_mode_unavailable"
|
||||
android:textAppearance="?textAppearanceBodySmall"
|
||||
android:isVisible="@{!isAgendaMode}" />
|
||||
android:textAppearance="?textAppearanceBodySmall" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
@ -115,8 +116,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:minHeight="32dp"
|
||||
android:checked="@={config.shareByDefault}"
|
||||
android:minHeight="32dp"
|
||||
android:text="@string/settings_register_share_by_default_text" />
|
||||
|
||||
<TextView
|
||||
|
@ -1,11 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kacper Ziubryniewicz 2020-1-20
|
||||
-->
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
@ -42,11 +43,11 @@
|
||||
android:id="@+id/customPlusValue"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
app:picker_min="0.0"
|
||||
app:picker_max="1.0"
|
||||
app:picker_stepSize="0.01"
|
||||
app:picker_disableGestures="true"
|
||||
app:picker_orientation="horizontal" />
|
||||
app:picker_max="1.0"
|
||||
app:picker_min="0.0"
|
||||
app:picker_orientation="horizontal"
|
||||
app:picker_stepSize="0.01" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@ -67,11 +68,11 @@
|
||||
android:id="@+id/customMinusValue"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
app:picker_min="0.0"
|
||||
app:picker_max="1.0"
|
||||
app:picker_stepSize="0.01"
|
||||
app:picker_disableGestures="true"
|
||||
app:picker_orientation="horizontal" />
|
||||
app:picker_max="1.0"
|
||||
app:picker_min="0.0"
|
||||
app:picker_orientation="horizontal"
|
||||
app:picker_stepSize="0.01" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
@ -85,7 +86,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="0dp"
|
||||
android:text="@string/grades_config_dont_count_grades"/>
|
||||
android:text="@string/grades_config_dont_count_grades" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="?textInputOutlinedDenseStyle"
|
||||
@ -100,7 +101,7 @@
|
||||
android:id="@+id/dontCountGradesText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="nb, 0, +, -, bz"/>
|
||||
tools:text="nb, 0, +, -, bz" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<CheckBox
|
||||
@ -109,7 +110,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:minHeight="32dp"
|
||||
android:text="@string/grades_config_dont_show_improved"/>
|
||||
android:text="@string/grades_config_dont_show_improved" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -123,7 +124,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:minHeight="32dp"
|
||||
android:text="@string/grades_config_average_without_weight"/>
|
||||
android:text="@string/grades_config_average_without_weight" />
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsImageView
|
||||
android:id="@+id/averageWithoutWeightHelp"
|
||||
@ -161,7 +162,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="0dp"
|
||||
android:text="@string/dialog_grades_config_sort_by_subject"/>
|
||||
android:text="@string/dialog_grades_config_sort_by_subject" />
|
||||
</RadioGroup>
|
||||
|
||||
<TextView
|
||||
@ -181,14 +182,14 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="0dp"
|
||||
android:text="@string/dialog_grades_config_color_from_eregister"/>
|
||||
android:text="@string/dialog_grades_config_color_from_eregister" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/gradeColorByValue"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="0dp"
|
||||
android:text="@string/dialog_grades_config_color_by_value"/>
|
||||
android:text="@string/dialog_grades_config_color_by_value" />
|
||||
</RadioGroup>
|
||||
|
||||
<TextView
|
||||
@ -208,35 +209,35 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="0dp"
|
||||
android:text="@string/settings_register_avg_mode_4"/>
|
||||
android:text="@string/settings_register_avg_mode_4" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/gradeAverageMode0"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="0dp"
|
||||
android:text="@string/settings_register_avg_mode_0"/>
|
||||
android:text="@string/settings_register_avg_mode_0" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/gradeAverageMode1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="0dp"
|
||||
android:text="@string/settings_register_avg_mode_1"/>
|
||||
android:text="@string/settings_register_avg_mode_1" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/gradeAverageMode2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="0dp"
|
||||
android:text="@string/settings_register_avg_mode_2"/>
|
||||
android:text="@string/settings_register_avg_mode_2" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/gradeAverageMode3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="0dp"
|
||||
android:text="@string/settings_register_avg_mode_3"/>
|
||||
android:text="@string/settings_register_avg_mode_3" />
|
||||
</RadioGroup>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2019-12-16.
|
||||
-->
|
||||
|
||||
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.core.widget.NestedScrollView
|
||||
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"
|
||||
|
@ -2,7 +2,8 @@
|
||||
~ Copyright (c) Kuba Szczodrzyński 2021-3-19.
|
||||
-->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -1,29 +1,51 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2019-12-18.
|
||||
-->
|
||||
|
||||
<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">
|
||||
<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">
|
||||
|
||||
<data>
|
||||
<import type="android.view.View"/>
|
||||
<import type="pl.szczodrzynski.edziennik.App"/>
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<import type="pl.szczodrzynski.edziennik.App" />
|
||||
|
||||
<variable
|
||||
name="appCompanion"
|
||||
type="pl.szczodrzynski.edziennik.App.Companion" />
|
||||
|
||||
<variable
|
||||
name="event"
|
||||
type="pl.szczodrzynski.edziennik.data.db.full.EventFull" />
|
||||
<variable name="eventShared" type="boolean" />
|
||||
<variable name="eventOwn" type="boolean" />
|
||||
<variable name="name" type="java.lang.CharSequence" />
|
||||
<variable name="details" type="java.lang.CharSequence" />
|
||||
<variable name="monthName" type="String" />
|
||||
|
||||
<variable
|
||||
name="eventShared"
|
||||
type="boolean" />
|
||||
|
||||
<variable
|
||||
name="eventOwn"
|
||||
type="boolean" />
|
||||
|
||||
<variable
|
||||
name="name"
|
||||
type="java.lang.CharSequence" />
|
||||
|
||||
<variable
|
||||
name="details"
|
||||
type="java.lang.CharSequence" />
|
||||
|
||||
<variable
|
||||
name="monthName"
|
||||
type="String" />
|
||||
</data>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -47,46 +69,45 @@
|
||||
android:background="@drawable/unread_red_circle" />
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1">
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{name}"
|
||||
android:textIsSelectable="true"
|
||||
android:textAppearance="?textAppearanceTitleLarge"
|
||||
android:isVisible="@{event.typeName != null}"
|
||||
android:text="@{name}"
|
||||
android:textAppearance="?textAppearanceTitleLarge"
|
||||
android:textIsSelectable="true"
|
||||
tools:text="sprawdzian" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lessonDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textIsSelectable="true"
|
||||
android:textAppearance="?textAppearanceTitleMedium"
|
||||
android:text="@{details}"
|
||||
android:isVisible="@{details != null}"
|
||||
android:text="@{details}"
|
||||
android:textAppearance="?textAppearanceTitleMedium"
|
||||
android:textIsSelectable="true"
|
||||
tools:text="język angielski • 2B3T a2"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center">
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?textAppearanceBodySmall"
|
||||
android:text="@{event.time == null ? @string/event_all_day : event.time.stringHM}"
|
||||
tools:text="14:50"/>
|
||||
android:textAppearance="?textAppearanceBodySmall"
|
||||
tools:text="14:50" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@ -100,9 +121,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{monthName}"
|
||||
tools:text="listopada" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsTextView
|
||||
@ -116,49 +135,47 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="@drawable/divider"/>
|
||||
android:background="@drawable/divider" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textAppearance="?textAppearanceLabelMedium"
|
||||
android:isVisible="@{event.teacherName != null}"
|
||||
android:text="@string/dialog_event_details_teacher"
|
||||
android:isVisible="@{event.teacherName != null}"/>
|
||||
android:textAppearance="?textAppearanceLabelMedium" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/teacherName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:isVisible="@{event.teacherName != null}"
|
||||
android:text="@{event.teacherName}"
|
||||
android:textIsSelectable="true"
|
||||
android:isVisible="@{event.teacherName != null}"
|
||||
tools:text="Janósz Kowalski" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textAppearance="?textAppearanceLabelMedium"
|
||||
android:text="@string/dialog_event_details_added_by"/>
|
||||
android:text="@string/dialog_event_details_added_by"
|
||||
android:textAppearance="?textAppearanceLabelMedium" />
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsTextView
|
||||
android:id="@+id/addedBy"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textIsSelectable="true"
|
||||
tools:text="18 grudnia, 23:17 przez Janósz Kowalski" />
|
||||
|
||||
<!--<View
|
||||
tools:text="18 grudnia, 23:17 przez Janósz Kowalski" /> <!--<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:background="@color/dividerColor"/>-->
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textAppearance="?textAppearanceLabelMedium"
|
||||
android:text="@string/dialog_event_details_topic"/>
|
||||
android:background="@color/dividerColor"/>--> <TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/dialog_event_details_topic"
|
||||
android:textAppearance="?textAppearanceLabelMedium" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/topic"
|
||||
@ -204,21 +221,19 @@
|
||||
<pl.szczodrzynski.edziennik.ui.base.views.AttachmentsView
|
||||
android:id="@+id/attachmentsFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="@drawable/divider"/>
|
||||
android:background="@drawable/divider" />
|
||||
|
||||
<com.google.android.flexbox.FlexboxLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:flexWrap="wrap"
|
||||
app:justifyContent="center">
|
||||
|
||||
<!-- cmd_eye_check_outline -->
|
||||
app:justifyContent="center"> <!-- cmd_eye_check_outline -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/checkDoneButton"
|
||||
style="?materialButtonOutlinedStyle"
|
||||
@ -229,9 +244,7 @@
|
||||
android:fontFamily="@font/community_material_font_v5_8_55"
|
||||
android:minWidth="0dp"
|
||||
android:text="\uf4df"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<!-- cmd_pencil_outline -->
|
||||
android:textSize="20sp" /> <!-- cmd_pencil_outline -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/editButton"
|
||||
style="?materialButtonOutlinedStyle"
|
||||
@ -241,9 +254,7 @@
|
||||
android:fontFamily="@font/community_material_font_v5_8_55"
|
||||
android:minWidth="0dp"
|
||||
android:text="\uf2f4"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<!-- cmd_calendar_export -->
|
||||
android:textSize="20sp" /> <!-- cmd_calendar_export -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/saveInCalendarButton"
|
||||
style="?materialButtonOutlinedStyle"
|
||||
@ -253,9 +264,7 @@
|
||||
android:fontFamily="@font/community_material_font_v5_8_55"
|
||||
android:minWidth="0dp"
|
||||
android:text="\uf97a"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<!-- cmd_cursor_default_click_outline -->
|
||||
android:textSize="20sp" /> <!-- cmd_cursor_default_click_outline -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/goToTimetableButton"
|
||||
style="?materialButtonOutlinedStyle"
|
||||
@ -265,9 +274,7 @@
|
||||
android:fontFamily="@font/community_material_font_v5_8_55"
|
||||
android:minWidth="0dp"
|
||||
android:text="\ufc90"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<!-- cmd_download_outline -->
|
||||
android:textSize="20sp" /> <!-- cmd_download_outline -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/downloadButton"
|
||||
style="?materialButtonOutlinedStyle"
|
||||
|
@ -1,24 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2019-11-12.
|
||||
-->
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<ScrollView
|
||||
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"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/scrollView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:id="@+id/scrollView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/mainLayout"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
@ -26,12 +24,13 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/dialog_event_manual_date">
|
||||
|
||||
<pl.szczodrzynski.edziennik.ui.base.views.DateDropdown
|
||||
android:id="@+id/dateDropdown"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="false"
|
||||
tools:text="13 listopada"/>
|
||||
tools:text="13 listopada" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
@ -41,6 +40,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:hint="@string/dialog_event_manual_time">
|
||||
|
||||
<pl.szczodrzynski.edziennik.ui.base.views.TimeDropdown
|
||||
android:id="@+id/timeDropdown"
|
||||
android:layout_width="match_parent"
|
||||
@ -48,7 +48,7 @@
|
||||
android:enabled="false"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
tools:text="8:10 - język polski"/>
|
||||
tools:text="8:10 - język polski" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
@ -111,12 +111,11 @@
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:background="@drawable/bg_circle"
|
||||
android:foreground="?selectableItemBackgroundBorderless" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
@ -133,10 +132,10 @@
|
||||
android:id="@+id/topic"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textLongMessage|textMultiLine|textImeMultiLine"
|
||||
android:minLines="2"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:inputType="textLongMessage|textMultiLine|textImeMultiLine"
|
||||
android:minLines="2"
|
||||
tools:text="2b3T" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
@ -144,17 +143,15 @@
|
||||
android:id="@+id/showMore"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?selectableItemBackground"
|
||||
android:paddingVertical="16dp"
|
||||
android:text="@string/dialog_event_manual_more_options"
|
||||
android:background="?selectableItemBackground"
|
||||
|
||||
app:iiv_end_icon="cmd-chevron-down"
|
||||
app:iiv_end_color="?android:textColorSecondary"
|
||||
app:iiv_end_size="24dp"
|
||||
|
||||
app:iiv_end_checked_icon="cmd-chevron-up"
|
||||
app:iiv_end_checked_color="?android:textColorSecondary"
|
||||
app:iiv_end_checked_size="24dp"/>
|
||||
app:iiv_end_checked_icon="cmd-chevron-up"
|
||||
app:iiv_end_checked_size="24dp"
|
||||
app:iiv_end_color="?android:textColorSecondary"
|
||||
app:iiv_end_icon="cmd-chevron-down"
|
||||
app:iiv_end_size="24dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/moreLayout"
|
||||
@ -165,8 +162,8 @@
|
||||
tools:visibility="visible">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="?textInputOutlinedDenseStyle"
|
||||
android:id="@+id/subjectDropdownLayout"
|
||||
style="?textInputOutlinedDenseStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
@ -194,10 +191,6 @@
|
||||
android:enabled="false"
|
||||
tools:text="2b3T" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
</layout>
|
||||
</ScrollView>
|
||||
|
@ -2,67 +2,65 @@
|
||||
~ Copyright (c) Kacper Ziubryniewicz 2020-1-5
|
||||
-->
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="20dp"
|
||||
android:paddingTop="16dp">
|
||||
|
||||
<LinearLayout
|
||||
<RadioGroup
|
||||
android:id="@+id/weekSelectionRadioGroup"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="20dp"
|
||||
android:paddingTop="16dp">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/weekSelectionRadioGroup"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/withChangesCurrentWeekRadio"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="true"
|
||||
tools:text="@string/timetable_generate_current_week_format" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/withChangesNextWeekRadio"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="@string/timetable_generate_next_week_format" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/forSelectedWeekRadio"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/timetable_generate_selected_week" />
|
||||
</RadioGroup>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:background="@drawable/divider"/>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/showProfileNameCheckbox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="0dp"
|
||||
android:text="@string/timetable_generate_show_profile_name" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/showTeachersNamesCheckbox"
|
||||
<RadioButton
|
||||
android:id="@+id/withChangesCurrentWeekRadio"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="true"
|
||||
android:minHeight="0dp"
|
||||
android:text="@string/timetable_generate_show_teachers_names" />
|
||||
tools:text="@string/timetable_generate_current_week_format" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/noColorsCheckbox"
|
||||
<RadioButton
|
||||
android:id="@+id/withChangesNextWeekRadio"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="0dp"
|
||||
android:text="@string/timetable_generate_no_colors" />
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
tools:text="@string/timetable_generate_next_week_format" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/forSelectedWeekRadio"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/timetable_generate_selected_week" />
|
||||
</RadioGroup>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:background="@drawable/divider" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/showProfileNameCheckbox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="0dp"
|
||||
android:text="@string/timetable_generate_show_profile_name" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/showTeachersNamesCheckbox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="true"
|
||||
android:minHeight="0dp"
|
||||
android:text="@string/timetable_generate_show_teachers_names" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/noColorsCheckbox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="0dp"
|
||||
android:text="@string/timetable_generate_no_colors" />
|
||||
</LinearLayout>
|
||||
|
@ -1,33 +1,47 @@
|
||||
<?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">
|
||||
<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">
|
||||
|
||||
<data>
|
||||
<import type="android.view.View"/>
|
||||
<import type="pl.szczodrzynski.edziennik.utils.Utils"/>
|
||||
<import type="pl.szczodrzynski.edziennik.utils.models.Date"/>
|
||||
<import type="pl.szczodrzynski.edziennik.utils.models.Time"/>
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<import type="pl.szczodrzynski.edziennik.utils.Utils" />
|
||||
|
||||
<import type="pl.szczodrzynski.edziennik.utils.models.Date" />
|
||||
|
||||
<import type="pl.szczodrzynski.edziennik.utils.models.Time" />
|
||||
|
||||
<variable
|
||||
name="grade"
|
||||
type="pl.szczodrzynski.edziennik.data.db.full.GradeFull" />
|
||||
|
||||
<variable
|
||||
name="historyVisible"
|
||||
type="boolean" />
|
||||
|
||||
<variable
|
||||
name="addedDate"
|
||||
type="String" />
|
||||
|
||||
<variable
|
||||
name="weightText"
|
||||
type="String" />
|
||||
|
||||
<variable
|
||||
name="comment"
|
||||
type="String" />
|
||||
|
||||
<variable
|
||||
name="commentVisible"
|
||||
type="boolean" />
|
||||
|
||||
<variable
|
||||
name="devMode"
|
||||
type="boolean" />
|
||||
|
||||
<variable
|
||||
name="gradeValue"
|
||||
type="float" />
|
||||
@ -59,8 +73,8 @@
|
||||
android:text="@{grade.name}"
|
||||
android:textIsSelectable="true"
|
||||
android:textSize="36sp"
|
||||
app:autoSizeMinTextSize="18sp"
|
||||
app:autoSizeMaxTextSize="56sp"
|
||||
app:autoSizeMinTextSize="18sp"
|
||||
app:autoSizeTextType="uniform"
|
||||
tools:background="#ff4caf50"
|
||||
tools:text="1-" />
|
||||
@ -86,10 +100,8 @@
|
||||
android:layout_weight="1"
|
||||
android:text="@{@string/dialog_grade_details_semester_format(grade.semester)}"
|
||||
android:textAppearance="?textAppearanceBodySmall"
|
||||
|
||||
android:textIsSelectable="true"
|
||||
tools:text="semestr 1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
@ -105,13 +117,12 @@
|
||||
android:id="@+id/gradeWeight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:isVisible="@{weightText != null}"
|
||||
android:text="@{weightText}"
|
||||
android:textAppearance="?textAppearanceTitleMedium"
|
||||
android:textIsSelectable="true"
|
||||
android:isVisible="@{weightText != null}"
|
||||
tools:text="waga 3"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@ -173,50 +184,50 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:isVisible="@{grade.classAverage != null && grade.classAverage != -1}"
|
||||
android:text="@string/dialog_grade_details_class_average"
|
||||
android:textAppearance="?textAppearanceLabelMedium"
|
||||
android:isVisible="@{grade.classAverage != null && grade.classAverage != -1}" />
|
||||
android:textAppearance="?textAppearanceLabelMedium" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="0dp"
|
||||
android:isVisible="@{grade.classAverage != null && grade.classAverage != -1}"
|
||||
android:text="@{@string/dialog_grade_details_class_average_format(grade.classAverage)}"
|
||||
android:textIsSelectable="true"
|
||||
android:isVisible="@{grade.classAverage != null && grade.classAverage != -1}"
|
||||
tools:text="1.72" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:isVisible="@{commentVisible}"
|
||||
android:text="@string/dialog_grade_details_comment"
|
||||
android:textAppearance="?textAppearanceLabelMedium"
|
||||
android:isVisible="@{commentVisible}" />
|
||||
android:textAppearance="?textAppearanceLabelMedium" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="0dp"
|
||||
android:textIsSelectable="true"
|
||||
android:isVisible="@{commentVisible}"
|
||||
android:textIsSelectable="true"
|
||||
tools:text="Uczeń jest idiotą i nie umie robić nic w excelu. Niestety nie zdał tej klasy więc ta ocena i tak mu nic nie da, więc a cotam, dam mu jedynkę kolejną.. XDD" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:isVisible="@{gradeValue != -1}"
|
||||
android:text="@string/dialog_grade_details_value"
|
||||
android:textAppearance="?textAppearanceLabelMedium"
|
||||
android:isVisible="@{gradeValue != -1}" />
|
||||
android:textAppearance="?textAppearanceLabelMedium" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="0dp"
|
||||
android:isVisible="@{gradeValue != -1}"
|
||||
android:text="@{@string/dialog_grade_details_class_average_format(gradeValue)}"
|
||||
android:textIsSelectable="true"
|
||||
android:isVisible="@{gradeValue != -1}"
|
||||
tools:text="4.75" />
|
||||
|
||||
<TextView
|
||||
@ -238,50 +249,49 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:isVisible="@{devMode}"
|
||||
android:text="@string/dialog_grade_details_id"
|
||||
android:textAppearance="?textAppearanceLabelMedium"
|
||||
android:isVisible="@{devMode}" />
|
||||
android:textAppearance="?textAppearanceLabelMedium" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="0dp"
|
||||
android:isVisible="@{devMode}"
|
||||
android:text="@{Long.toString(grade.id)}"
|
||||
android:textIsSelectable="true"
|
||||
android:isVisible="@{devMode}"
|
||||
tools:text="12345" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:isVisible="@{grade.parentId instanceof Long}"
|
||||
android:text="@string/dialog_grade_details_improved"
|
||||
android:textAppearance="?textAppearanceBodySmall"
|
||||
android:isVisible="@{grade.parentId instanceof Long}" />
|
||||
android:textAppearance="?textAppearanceBodySmall" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:isVisible="@{historyVisible}"
|
||||
android:text="@string/dialog_grade_details_history"
|
||||
android:textAppearance="?textAppearanceTitleMedium"
|
||||
android:isVisible="@{historyVisible}" />
|
||||
android:textAppearance="?textAppearanceTitleMedium" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/gradeHistoryNest"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginHorizontal="-8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:isVisible="@{historyVisible}">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/gradeHistoryList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:listitem="@layout/grades_item_grade"
|
||||
tools:itemCount="2"/>
|
||||
|
||||
tools:itemCount="2"
|
||||
tools:listitem="@layout/grades_item_grade" />
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<View
|
||||
@ -301,10 +311,10 @@
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginVertical="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/grades_stats_custom_value_notice"
|
||||
android:textAppearance="?textAppearanceBodySmall" />
|
||||
|
||||
@ -324,8 +334,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="8dp"
|
||||
android:visibility="gone"
|
||||
android:text="@string/notes_button" />
|
||||
android:text="@string/notes_button"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</layout>
|
||||
|
@ -1,13 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/lessonChangeView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
android:paddingHorizontal="24dp"
|
||||
android:paddingVertical="8dp"
|
||||
tools:listitem="@layout/timetable_lesson" />
|
||||
</layout>
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/lessonChangeView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
android:paddingHorizontal="24dp"
|
||||
android:paddingVertical="8dp"
|
||||
tools:listitem="@layout/timetable_lesson" />
|
||||
|
@ -1,32 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2019-11-11.
|
||||
-->
|
||||
|
||||
<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">
|
||||
<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">
|
||||
|
||||
<data>
|
||||
<import type="android.view.View"/>
|
||||
<import type="pl.szczodrzynski.edziennik.App"/>
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<import type="pl.szczodrzynski.edziennik.App" />
|
||||
|
||||
<variable
|
||||
name="annotationVisible"
|
||||
type="boolean"/>
|
||||
type="boolean" />
|
||||
|
||||
<variable
|
||||
name="lesson"
|
||||
type="pl.szczodrzynski.edziennik.data.db.full.LessonFull" />
|
||||
<variable name="oldSubjectName" type="String" />
|
||||
<variable name="subjectName" type="String" />
|
||||
<variable name="oldTeacherName" type="String" />
|
||||
<variable name="teacherName" type="String" />
|
||||
<variable name="oldClassroom" type="String" />
|
||||
<variable name="classroom" type="String" />
|
||||
<variable name="oldTeamName" type="String" />
|
||||
<variable name="teamName" type="String" />
|
||||
|
||||
<variable
|
||||
name="oldSubjectName"
|
||||
type="String" />
|
||||
|
||||
<variable
|
||||
name="subjectName"
|
||||
type="String" />
|
||||
|
||||
<variable
|
||||
name="oldTeacherName"
|
||||
type="String" />
|
||||
|
||||
<variable
|
||||
name="teacherName"
|
||||
type="String" />
|
||||
|
||||
<variable
|
||||
name="oldClassroom"
|
||||
type="String" />
|
||||
|
||||
<variable
|
||||
name="classroom"
|
||||
type="String" />
|
||||
|
||||
<variable
|
||||
name="oldTeamName"
|
||||
type="String" />
|
||||
|
||||
<variable
|
||||
name="teamName"
|
||||
type="String" />
|
||||
</data>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -42,67 +73,65 @@
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1">
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:isVisible="@{oldSubjectName != null}"
|
||||
android:text="@{oldSubjectName}"
|
||||
android:textIsSelectable="true"
|
||||
android:textAppearance="?textAppearanceBodyLarge"
|
||||
android:textColor="?android:textColorTertiary"
|
||||
android:isVisible="@{oldSubjectName != null}"
|
||||
android:textIsSelectable="true"
|
||||
app:strikeThrough="@{true}"
|
||||
tools:text="pracownia urządzeń techniki komputerowej" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{subjectName}"
|
||||
android:textIsSelectable="true"
|
||||
android:textAppearance="?textAppearanceTitleLarge"
|
||||
android:isVisible="@{subjectName != null}"
|
||||
android:text="@{subjectName}"
|
||||
android:textAppearance="?textAppearanceTitleLarge"
|
||||
android:textIsSelectable="true"
|
||||
tools:text="pracownia urządzeń techniki komputerowej" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lessonDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textIsSelectable="true"
|
||||
android:textAppearance="?textAppearanceTitleMedium"
|
||||
android:textIsSelectable="true"
|
||||
tools:text="czwartek, 14 listopada 2019"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/annotation"
|
||||
style="?chipStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:isVisible="@{annotationVisible}"
|
||||
app:chipBackgroundColor="?colorError"
|
||||
android:text="@string/timetable_lesson_cancelled"
|
||||
android:textColor="?colorOnError"
|
||||
style="?chipStyle"
|
||||
app:chipStrokeWidth="0dp"
|
||||
android:text="@string/timetable_lesson_cancelled"/>
|
||||
|
||||
app:chipBackgroundColor="?colorError"
|
||||
app:chipStrokeWidth="0dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="right">
|
||||
|
||||
android:gravity="right"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:isVisible="@{lesson.displayLessonNumber != null}"
|
||||
android:text="@{lesson.displayLessonNumber.toString()}"
|
||||
android:textAppearance="?textAppearanceHeadlineLarge"
|
||||
android:isVisible="@{lesson.displayLessonNumber != null}"
|
||||
tools:text="4" />
|
||||
|
||||
<TextView
|
||||
@ -110,9 +139,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{lesson.displayStartTime.stringHM + ` - ` + lesson.displayEndTime.stringHM}"
|
||||
tools:text="14:55 - 15:40" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@ -141,7 +168,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/dialog_lesson_go_to_button" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsTextView
|
||||
@ -163,34 +189,37 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:orientation="vertical"
|
||||
android:isVisible="@{teacherName != null || oldTeacherName != null}">
|
||||
android:layout_weight="1"
|
||||
android:isVisible="@{teacherName != null || oldTeacherName != null}"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?textAppearanceLabelMedium"
|
||||
android:text="@string/dialog_lesson_details_teacher" />
|
||||
android:text="@string/dialog_lesson_details_teacher"
|
||||
android:textAppearance="?textAppearanceLabelMedium" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/oldTeacherNameView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?textAppearanceBodySmall"
|
||||
android:text="@{oldTeacherName}"
|
||||
android:textIsSelectable="true"
|
||||
android:singleLine="true"
|
||||
android:isVisible="@{oldTeacherName != null}"
|
||||
android:singleLine="true"
|
||||
android:text="@{oldTeacherName}"
|
||||
android:textAppearance="?textAppearanceBodySmall"
|
||||
android:textIsSelectable="true"
|
||||
app:strikeThrough="@{true}"
|
||||
tools:text="Janósz Kowalski" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/teacherNameView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:isVisible="@{teacherName != null}"
|
||||
android:text="@{teacherName}"
|
||||
android:textIsSelectable="true"
|
||||
android:isVisible="@{teacherName != null}"
|
||||
tools:text="Janósz Kowalski" />
|
||||
</LinearLayout>
|
||||
|
||||
@ -198,31 +227,33 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:isVisible="@{teamName != null || oldTeamName != null}">
|
||||
android:isVisible="@{teamName != null || oldTeamName != null}"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?textAppearanceLabelMedium"
|
||||
android:text="@string/dialog_lesson_details_team" />
|
||||
android:text="@string/dialog_lesson_details_team"
|
||||
android:textAppearance="?textAppearanceLabelMedium" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?textAppearanceBodySmall"
|
||||
android:text="@{oldTeamName}"
|
||||
android:textIsSelectable="true"
|
||||
android:isVisible="@{oldTeamName != null}"
|
||||
android:text="@{oldTeamName}"
|
||||
android:textAppearance="?textAppearanceBodySmall"
|
||||
android:textIsSelectable="true"
|
||||
app:strikeThrough="@{true}"
|
||||
tools:text="013 informatyczna" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:isVisible="@{teamName != null}"
|
||||
android:text="@{teamName}"
|
||||
android:textIsSelectable="true"
|
||||
android:isVisible="@{teamName != null}"
|
||||
tools:text="013 informatyczna" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@ -236,29 +267,32 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:isVisible="@{classroom != null || oldClassroom != null}">
|
||||
android:isVisible="@{classroom != null || oldClassroom != null}"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textAppearance="?textAppearanceLabelMedium"
|
||||
android:text="@string/dialog_lesson_details_classroom" />
|
||||
android:text="@string/dialog_lesson_details_classroom"
|
||||
android:textAppearance="?textAppearanceLabelMedium" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?textAppearanceBodySmall"
|
||||
android:text="@{oldClassroom}"
|
||||
android:textIsSelectable="true"
|
||||
android:isVisible="@{oldClassroom != null}"
|
||||
android:text="@{oldClassroom}"
|
||||
android:textAppearance="?textAppearanceBodySmall"
|
||||
android:textIsSelectable="true"
|
||||
app:strikeThrough="@{true}"
|
||||
tools:text="013 informatyczna" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:isVisible="@{classroom != null}"
|
||||
android:text="@{classroom}"
|
||||
android:textIsSelectable="true"
|
||||
android:isVisible="@{classroom != null}"
|
||||
tools:text="013 informatyczna" />
|
||||
</LinearLayout>
|
||||
|
||||
@ -270,12 +304,13 @@
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textAppearance="?textAppearanceLabelMedium"
|
||||
android:text="@string/dialog_lesson_details_id" />
|
||||
android:text="@string/dialog_lesson_details_id"
|
||||
android:textAppearance="?textAppearanceLabelMedium" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
@ -285,7 +320,6 @@
|
||||
android:textIsSelectable="true"
|
||||
tools:text="12345" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
@ -293,7 +327,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="@drawable/divider"/>
|
||||
android:background="@drawable/divider" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/attendanceLayout"
|
||||
@ -321,9 +355,9 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
android:textAppearance="?textAppearanceBodyLarge"
|
||||
tools:text="nieobecność usprawiedliweniowsza1234324" />
|
||||
|
||||
@ -346,7 +380,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="@drawable/divider"/>
|
||||
android:background="@drawable/divider" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/eventsNoData"
|
||||
@ -376,7 +410,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/dialog_no_events_hint" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
@ -384,8 +417,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipToPadding="false"
|
||||
tools:visibility="visible"
|
||||
tools:listitem="@layout/event_list_item" />
|
||||
tools:listitem="@layout/event_list_item"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -403,7 +436,7 @@
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_margin="8dp"
|
||||
android:text="@string/add"
|
||||
app:icon="@drawable/ic_action_add"/>
|
||||
app:icon="@drawable/ic_action_add" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/notesButton"
|
||||
@ -413,7 +446,7 @@
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_margin="8dp"
|
||||
android:text="@string/notes_button"
|
||||
android:visibility="gone"/>
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2021-3-22.
|
||||
-->
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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">
|
||||
|
||||
|
@ -1,14 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2020-9-3.
|
||||
-->
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<layout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<import type="pl.szczodrzynski.edziennik.utils.html.BetterHtml" />
|
||||
|
||||
<variable
|
||||
name="message"
|
||||
type="pl.szczodrzynski.edziennik.data.api.szkolny.response.RegisterAvailabilityStatus.Message" />
|
||||
@ -28,8 +31,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitXY"
|
||||
android:isVisible="@{message.image != null}"
|
||||
android:scaleType="fitXY"
|
||||
tools:src="@tools:sample/backgrounds/scenic" />
|
||||
|
||||
<LinearLayout
|
||||
@ -63,8 +66,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/register_unavailable_read_more"
|
||||
android:isVisible="@{message.url != null}" />
|
||||
android:isVisible="@{message.url != null}"
|
||||
android:text="@string/register_unavailable_read_more" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
@ -1,13 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/teacherAbsenceView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
android:paddingHorizontal="24dp"
|
||||
android:paddingVertical="8dp"
|
||||
tools:listitem="@layout/row_dialog_teacher_absence_item" />
|
||||
</layout>
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/teacherAbsenceView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
android:paddingHorizontal="24dp"
|
||||
android:paddingVertical="8dp"
|
||||
tools:listitem="@layout/row_dialog_teacher_absence_item" />
|
||||
|
@ -1,24 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2020-1-8.
|
||||
-->
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingTop="24dp">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Hello world"/>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingTop="24dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/clickMe"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Click me"/>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Hello world" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/clickMe"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Click me" />
|
||||
</LinearLayout>
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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">
|
||||
|
||||
@ -17,33 +18,33 @@
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?textAppearanceLabelMedium"
|
||||
android:isVisible="@{profileName != null}"
|
||||
android:text="@string/dialog_widget_config_profile" />
|
||||
android:text="@string/dialog_widget_config_profile"
|
||||
android:textAppearance="?textAppearanceLabelMedium" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="0dp"
|
||||
android:isVisible="@{profileName != null}"
|
||||
android:text="@{profileName}"
|
||||
android:textIsSelectable="true"
|
||||
android:isVisible="@{profileName != null}"
|
||||
tools:text="Władca Androida" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:textAppearance="?textAppearanceLabelMedium"
|
||||
android:text="@string/dialog_widget_timetable_config_theme" />
|
||||
android:text="@string/dialog_widget_timetable_config_theme"
|
||||
android:textAppearance="?textAppearanceLabelMedium" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/theme"
|
||||
@ -78,8 +79,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:textAppearance="?textAppearanceLabelMedium"
|
||||
android:text="@string/dialog_widget_timetable_config_opacity" />
|
||||
android:text="@string/dialog_widget_timetable_config_opacity"
|
||||
android:textAppearance="?textAppearanceLabelMedium" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/opacity"
|
||||
@ -93,14 +94,14 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="0dp"
|
||||
android:textIsSelectable="true"
|
||||
android:gravity="end"
|
||||
android:textIsSelectable="true"
|
||||
tools:text="100%" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/wallpaper"
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Mateusz Idziejczak 2021-4-3.
|
||||
-->
|
||||
|
||||
<com.jetradarmobile.snowfall.SnowfallView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.jetradarmobile.snowfall.SnowfallView
|
||||
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"
|
||||
|
@ -1,7 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) Kuba Szczodrzyński 2019-12-15.
|
||||
-->
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
|
||||
<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">
|
||||
|
||||
@ -17,9 +19,9 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginRight="8dp"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginRight="8dp">
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
@ -93,11 +95,12 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="middle"
|
||||
android:isVisible="@{!simpleMode}"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?textAppearanceBodySmall"
|
||||
android:isVisible="@{!simpleMode}"
|
||||
tools:text="Udostępniono 10 grudnia przez Ktoś Z Twojej Klasy • 2B3T" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/editButton"
|
||||
style="?materialIconButtonSecondaryStyle"
|
||||
|
@ -1,24 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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">
|
||||
<LinearLayout
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
style="?android:attr/progressBarStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
<com.applandeo.materialcalendarview.CalendarView
|
||||
android:id="@+id/agenda_calendar_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
style="?android:attr/progressBarStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
<com.applandeo.materialcalendarview.CalendarView
|
||||
android:id="@+id/agenda_calendar_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:headerColor="?colorPrimary"/>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
app:headerColor="?colorPrimary" />
|
||||
</LinearLayout>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user