forked from github/wulkanowy-mirror
Add widget system theme option (#759)
This commit is contained in:
parent
45fc76a9a5
commit
6ac5c6a0b4
@ -4,6 +4,7 @@ import android.appwidget.AppWidgetManager.ACTION_APPWIDGET_UPDATE
|
||||
import android.appwidget.AppWidgetManager.EXTRA_APPWIDGET_ID
|
||||
import android.appwidget.AppWidgetManager.EXTRA_APPWIDGET_IDS
|
||||
import android.content.Intent
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.widget.Toast
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
@ -14,6 +15,7 @@ import io.github.wulkanowy.databinding.ActivityWidgetConfigureBinding
|
||||
import io.github.wulkanowy.ui.base.BaseActivity
|
||||
import io.github.wulkanowy.ui.base.WidgetConfigureAdapter
|
||||
import io.github.wulkanowy.ui.modules.login.LoginActivity
|
||||
import io.github.wulkanowy.utils.AppInfo
|
||||
import javax.inject.Inject
|
||||
|
||||
class LuckyNumberWidgetConfigureActivity :
|
||||
@ -26,6 +28,9 @@ class LuckyNumberWidgetConfigureActivity :
|
||||
@Inject
|
||||
override lateinit var presenter: LuckyNumberWidgetConfigurePresenter
|
||||
|
||||
@Inject
|
||||
lateinit var appInfo: AppInfo
|
||||
|
||||
private var dialog: AlertDialog? = null
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
@ -48,10 +53,11 @@ class LuckyNumberWidgetConfigureActivity :
|
||||
}
|
||||
|
||||
override fun showThemeDialog() {
|
||||
val items = arrayOf(
|
||||
var items = arrayOf(
|
||||
getString(R.string.widget_timetable_theme_light),
|
||||
getString(R.string.widget_timetable_theme_dark)
|
||||
)
|
||||
if (appInfo.systemVersion >= Build.VERSION_CODES.Q) items += (getString(R.string.widget_timetable_theme_system))
|
||||
|
||||
dialog = AlertDialog.Builder(this, R.style.WulkanowyTheme_WidgetAccountSwitcher)
|
||||
.setTitle(R.string.widget_timetable_theme_title)
|
||||
|
@ -8,6 +8,7 @@ import android.appwidget.AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH
|
||||
import android.appwidget.AppWidgetProvider
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.res.Configuration
|
||||
import android.os.Bundle
|
||||
import android.view.View.GONE
|
||||
import android.view.View.VISIBLE
|
||||
@ -62,14 +63,12 @@ class LuckyNumberWidgetProvider : AppWidgetProvider() {
|
||||
override fun onUpdate(context: Context, appWidgetManager: AppWidgetManager, appWidgetIds: IntArray?) {
|
||||
super.onUpdate(context, appWidgetManager, appWidgetIds)
|
||||
appWidgetIds?.forEach { appWidgetId ->
|
||||
val savedTheme = sharedPref.getLong(getThemeWidgetKey(appWidgetId), 0)
|
||||
val layoutId = if (savedTheme == 0L) R.layout.widget_luckynumber else R.layout.widget_luckynumber_dark
|
||||
|
||||
val luckyNumber = getLuckyNumber(sharedPref.getLong(getStudentWidgetKey(appWidgetId), 0), appWidgetId)
|
||||
val appIntent = PendingIntent.getActivity(context, MainView.Section.LUCKY_NUMBER.id,
|
||||
MainActivity.getStartIntent(context, MainView.Section.LUCKY_NUMBER, true), FLAG_UPDATE_CURRENT)
|
||||
|
||||
val remoteView = RemoteViews(context.packageName, layoutId).apply {
|
||||
val remoteView = RemoteViews(context.packageName, getCorrectLayoutId(appWidgetId, context)).apply {
|
||||
setTextViewText(R.id.luckyNumberWidgetNumber, luckyNumber?.luckyNumber?.toString() ?: "#")
|
||||
setOnClickPendingIntent(R.id.luckyNumberWidgetContainer, appIntent)
|
||||
}
|
||||
@ -82,17 +81,19 @@ class LuckyNumberWidgetProvider : AppWidgetProvider() {
|
||||
override fun onDeleted(context: Context?, appWidgetIds: IntArray?) {
|
||||
super.onDeleted(context, appWidgetIds)
|
||||
appWidgetIds?.forEach { appWidgetId ->
|
||||
if (appWidgetId != 0) sharedPref.delete(getStudentWidgetKey(appWidgetId))
|
||||
with(sharedPref) {
|
||||
delete(getHeightWidgetKey(appWidgetId))
|
||||
delete(getStudentWidgetKey(appWidgetId))
|
||||
delete(getThemeWidgetKey(appWidgetId))
|
||||
delete(getWidthWidgetKey(appWidgetId))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAppWidgetOptionsChanged(context: Context, appWidgetManager: AppWidgetManager, appWidgetId: Int, newOptions: Bundle?) {
|
||||
super.onAppWidgetOptionsChanged(context, appWidgetManager, appWidgetId, newOptions)
|
||||
|
||||
val savedTheme = sharedPref.getLong(getThemeWidgetKey(appWidgetId), 0)
|
||||
val layoutId = if (savedTheme == 0L) R.layout.widget_luckynumber else R.layout.widget_luckynumber_dark
|
||||
|
||||
val remoteView = RemoteViews(context.packageName, layoutId)
|
||||
val remoteView = RemoteViews(context.packageName, getCorrectLayoutId(appWidgetId, context))
|
||||
|
||||
setStyles(remoteView, appWidgetId, newOptions)
|
||||
appWidgetManager.updateAppWidget(appWidgetId, remoteView)
|
||||
@ -102,8 +103,10 @@ class LuckyNumberWidgetProvider : AppWidgetProvider() {
|
||||
val width = options?.getInt(OPTION_APPWIDGET_MIN_WIDTH) ?: sharedPref.getLong(getWidthWidgetKey(appWidgetId), 74).toInt()
|
||||
val height = options?.getInt(OPTION_APPWIDGET_MAX_HEIGHT) ?: sharedPref.getLong(getHeightWidgetKey(appWidgetId), 74).toInt()
|
||||
|
||||
sharedPref.putLong(getWidthWidgetKey(appWidgetId), width.toLong())
|
||||
sharedPref.putLong(getHeightWidgetKey(appWidgetId), height.toLong())
|
||||
with(sharedPref) {
|
||||
putLong(getWidthWidgetKey(appWidgetId), width.toLong())
|
||||
putLong(getHeightWidgetKey(appWidgetId), height.toLong())
|
||||
}
|
||||
|
||||
val rows = getCellsForSize(height)
|
||||
val cols = getCellsForSize(width)
|
||||
@ -162,4 +165,15 @@ class LuckyNumberWidgetProvider : AppWidgetProvider() {
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
private fun getCorrectLayoutId(appWidgetId: Int, context: Context): Int {
|
||||
val savedTheme = sharedPref.getLong(getThemeWidgetKey(appWidgetId), 0)
|
||||
val isSystemDarkMode = context.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK == Configuration.UI_MODE_NIGHT_YES
|
||||
|
||||
return if (savedTheme == 1L || (savedTheme == 2L && isSystemDarkMode)) {
|
||||
R.layout.widget_luckynumber_dark
|
||||
} else {
|
||||
R.layout.widget_luckynumber
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import android.appwidget.AppWidgetManager.ACTION_APPWIDGET_UPDATE
|
||||
import android.appwidget.AppWidgetManager.EXTRA_APPWIDGET_ID
|
||||
import android.appwidget.AppWidgetManager.EXTRA_APPWIDGET_IDS
|
||||
import android.content.Intent
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.widget.Toast
|
||||
import android.widget.Toast.LENGTH_LONG
|
||||
@ -16,6 +17,7 @@ import io.github.wulkanowy.ui.base.BaseActivity
|
||||
import io.github.wulkanowy.ui.base.WidgetConfigureAdapter
|
||||
import io.github.wulkanowy.ui.modules.login.LoginActivity
|
||||
import io.github.wulkanowy.ui.modules.timetablewidget.TimetableWidgetProvider.Companion.EXTRA_FROM_PROVIDER
|
||||
import io.github.wulkanowy.utils.AppInfo
|
||||
import javax.inject.Inject
|
||||
|
||||
class TimetableWidgetConfigureActivity :
|
||||
@ -28,6 +30,9 @@ class TimetableWidgetConfigureActivity :
|
||||
@Inject
|
||||
override lateinit var presenter: TimetableWidgetConfigurePresenter
|
||||
|
||||
@Inject
|
||||
lateinit var appInfo: AppInfo
|
||||
|
||||
private var dialog: AlertDialog? = null
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
@ -50,10 +55,11 @@ class TimetableWidgetConfigureActivity :
|
||||
}
|
||||
|
||||
override fun showThemeDialog() {
|
||||
val items = arrayOf(
|
||||
var items = arrayOf(
|
||||
getString(R.string.widget_timetable_theme_light),
|
||||
getString(R.string.widget_timetable_theme_dark)
|
||||
)
|
||||
if (appInfo.systemVersion >= Build.VERSION_CODES.Q) items += getString(R.string.widget_timetable_theme_system)
|
||||
|
||||
dialog = AlertDialog.Builder(this, R.style.WulkanowyTheme_WidgetAccountSwitcher)
|
||||
.setTitle(R.string.widget_timetable_theme_title)
|
||||
|
@ -18,9 +18,9 @@ import io.github.wulkanowy.data.repositories.preferences.PreferencesRepository
|
||||
import io.github.wulkanowy.data.repositories.semester.SemesterRepository
|
||||
import io.github.wulkanowy.data.repositories.student.StudentRepository
|
||||
import io.github.wulkanowy.data.repositories.timetable.TimetableRepository
|
||||
import io.github.wulkanowy.ui.modules.timetablewidget.TimetableWidgetProvider.Companion.getCurrentThemeWidgetKey
|
||||
import io.github.wulkanowy.ui.modules.timetablewidget.TimetableWidgetProvider.Companion.getDateWidgetKey
|
||||
import io.github.wulkanowy.ui.modules.timetablewidget.TimetableWidgetProvider.Companion.getStudentWidgetKey
|
||||
import io.github.wulkanowy.ui.modules.timetablewidget.TimetableWidgetProvider.Companion.getThemeWidgetKey
|
||||
import io.github.wulkanowy.utils.SchedulersProvider
|
||||
import io.github.wulkanowy.utils.getCompatColor
|
||||
import io.github.wulkanowy.utils.toFormattedString
|
||||
@ -41,9 +41,7 @@ class TimetableWidgetFactory(
|
||||
|
||||
private var lessons = emptyList<Timetable>()
|
||||
|
||||
private var savedTheme: Long? = null
|
||||
|
||||
private var layoutId: Int? = null
|
||||
private var savedCurrentTheme: Long? = null
|
||||
|
||||
private var primaryColor: Int? = null
|
||||
|
||||
@ -71,28 +69,32 @@ class TimetableWidgetFactory(
|
||||
val studentId = sharedPref.getLong(getStudentWidgetKey(appWidgetId), 0)
|
||||
|
||||
updateTheme(appWidgetId)
|
||||
|
||||
updateLessons(date, studentId)
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateTheme(appWidgetId: Int) {
|
||||
savedTheme = sharedPref.getLong(getThemeWidgetKey(appWidgetId), 0)
|
||||
layoutId = if (savedTheme == 0L) R.layout.item_widget_timetable else R.layout.item_widget_timetable_dark
|
||||
savedCurrentTheme = sharedPref.getLong(getCurrentThemeWidgetKey(appWidgetId), 0)
|
||||
|
||||
primaryColor = if (savedTheme == 0L) R.color.colorPrimary else R.color.colorPrimaryLight
|
||||
textColor = if (savedTheme == 0L) android.R.color.black else android.R.color.white
|
||||
timetableChangeColor = if (savedTheme == 0L) R.color.timetable_change_dark else R.color.timetable_change_light
|
||||
if (savedCurrentTheme == 0L) {
|
||||
primaryColor = R.color.colorPrimary
|
||||
textColor = android.R.color.black
|
||||
timetableChangeColor = R.color.timetable_change_dark
|
||||
} else {
|
||||
primaryColor = R.color.colorPrimaryLight
|
||||
textColor = android.R.color.white
|
||||
timetableChangeColor = R.color.timetable_change_light
|
||||
}
|
||||
}
|
||||
|
||||
private fun getItemLayout(lesson: Timetable): Int {
|
||||
return when {
|
||||
prefRepository.showWholeClassPlan == "small" && !lesson.isStudentPlan -> {
|
||||
if (savedTheme == 0L) R.layout.item_widget_timetable_small
|
||||
if (savedCurrentTheme == 0L) R.layout.item_widget_timetable_small
|
||||
else R.layout.item_widget_timetable_small_dark
|
||||
}
|
||||
savedTheme == 0L -> R.layout.item_widget_timetable
|
||||
else -> R.layout.item_widget_timetable_dark
|
||||
savedCurrentTheme == 1L -> R.layout.item_widget_timetable_dark
|
||||
else -> R.layout.item_widget_timetable
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13,6 +13,7 @@ import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.Intent.FLAG_ACTIVITY_CLEAR_TASK
|
||||
import android.content.Intent.FLAG_ACTIVITY_NEW_TASK
|
||||
import android.content.res.Configuration
|
||||
import android.widget.RemoteViews
|
||||
import dagger.android.AndroidInjection
|
||||
import io.github.wulkanowy.R
|
||||
@ -71,6 +72,8 @@ class TimetableWidgetProvider : BroadcastReceiver() {
|
||||
fun getStudentWidgetKey(appWidgetId: Int) = "timetable_widget_student_$appWidgetId"
|
||||
|
||||
fun getThemeWidgetKey(appWidgetId: Int) = "timetable_widget_theme_$appWidgetId"
|
||||
|
||||
fun getCurrentThemeWidgetKey(appWidgetId: Int) = "timetable_widget_current_theme_$appWidgetId"
|
||||
}
|
||||
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
@ -110,14 +113,23 @@ class TimetableWidgetProvider : BroadcastReceiver() {
|
||||
with(sharedPref) {
|
||||
delete(getStudentWidgetKey(appWidgetId))
|
||||
delete(getDateWidgetKey(appWidgetId))
|
||||
delete(getThemeWidgetKey(appWidgetId))
|
||||
delete(getCurrentThemeWidgetKey(appWidgetId))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
private fun updateWidget(context: Context, appWidgetId: Int, date: LocalDate, student: Student?) {
|
||||
val savedTheme = sharedPref.getLong(getThemeWidgetKey(appWidgetId), 0)
|
||||
val layoutId = if (savedTheme == 0L) R.layout.widget_timetable else R.layout.widget_timetable_dark
|
||||
val savedConfigureTheme = sharedPref.getLong(getThemeWidgetKey(appWidgetId), 0)
|
||||
val isSystemDarkMode = context.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK == Configuration.UI_MODE_NIGHT_YES
|
||||
var currentTheme = 0L
|
||||
var layoutId = R.layout.widget_timetable
|
||||
|
||||
if (savedConfigureTheme == 1L || (savedConfigureTheme == 2L && isSystemDarkMode)) {
|
||||
currentTheme = 1L
|
||||
layoutId = R.layout.widget_timetable_dark
|
||||
}
|
||||
|
||||
val nextNavIntent = createNavIntent(context, appWidgetId, appWidgetId, BUTTON_NEXT)
|
||||
val prevNavIntent = createNavIntent(context, -appWidgetId, appWidgetId, BUTTON_PREV)
|
||||
@ -150,7 +162,11 @@ class TimetableWidgetProvider : BroadcastReceiver() {
|
||||
setPendingIntentTemplate(R.id.timetableWidgetList, appIntent)
|
||||
}
|
||||
|
||||
sharedPref.putLong(getDateWidgetKey(appWidgetId), date.toEpochDay(), true)
|
||||
with(sharedPref) {
|
||||
putLong(getCurrentThemeWidgetKey(appWidgetId), currentTheme)
|
||||
putLong(getDateWidgetKey(appWidgetId), date.toEpochDay(), true)
|
||||
}
|
||||
|
||||
with(appWidgetManager) {
|
||||
notifyAppWidgetViewDataChanged(appWidgetId, R.id.timetableWidgetList)
|
||||
updateAppWidget(appWidgetId, remoteView)
|
||||
|
@ -10,9 +10,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:paddingStart="24dp"
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingEnd="24dp"
|
||||
android:paddingRight="24dp"
|
||||
android:text="@string/account_title"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
|
@ -12,12 +12,12 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/white"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingBottom="6dp"
|
||||
android:paddingLeft="6dp"
|
||||
android:paddingStart="6dp"
|
||||
android:paddingLeft="6dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingRight="12dp">
|
||||
android:paddingRight="12dp"
|
||||
android:paddingBottom="6dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/timetableWidgetItemNumber"
|
||||
@ -26,8 +26,8 @@
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLength="2"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="28sp"
|
||||
android:textColor="@android:color/black"
|
||||
tools:text="5" />
|
||||
|
||||
<TextView
|
||||
@ -43,19 +43,19 @@
|
||||
android:layout_toRightOf="@+id/timetableWidgetItemTimeStart"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textSize="15sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="15sp"
|
||||
tools:text="@tools:sample/lorem" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/timetableWidgetItemTimeStart"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/timetableWidgetItemNumber"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:layout_toEndOf="@id/timetableWidgetItemNumber"
|
||||
android:layout_toRightOf="@id/timetableWidgetItemNumber"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_alignTop="@id/timetableWidgetItemNumber"
|
||||
android:maxLines="1"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="13sp"
|
||||
@ -116,9 +116,9 @@
|
||||
android:layout_alignTop="@+id/timetableWidgetItemTimeFinish"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_toEndOf="@+id/timetableWidgetItemTimeStart"
|
||||
android:layout_toRightOf="@+id/timetableWidgetItemTimeStart"
|
||||
android:textColor="@color/timetable_change_dark"
|
||||
|
@ -12,12 +12,10 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/colorWidgetBackground"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingBottom="6dp"
|
||||
android:paddingLeft="6dp"
|
||||
android:paddingStart="6dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingRight="12dp">
|
||||
android:paddingBottom="6dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/timetableWidgetItemNumber"
|
||||
@ -26,8 +24,8 @@
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLength="2"
|
||||
android:textSize="28sp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="28sp"
|
||||
tools:text="5" />
|
||||
|
||||
<TextView
|
||||
@ -36,26 +34,21 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/timetableWidgetItemNumber"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:layout_marginRight="40dp"
|
||||
android:layout_toEndOf="@+id/timetableWidgetItemTimeStart"
|
||||
android:layout_toRightOf="@+id/timetableWidgetItemTimeStart"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textSize="15sp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="15sp"
|
||||
tools:text="@tools:sample/lorem" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/timetableWidgetItemTimeStart"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toEndOf="@id/timetableWidgetItemNumber"
|
||||
android:layout_toRightOf="@id/timetableWidgetItemNumber"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_alignTop="@id/timetableWidgetItemNumber"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_toEndOf="@id/timetableWidgetItemNumber"
|
||||
android:maxLines="1"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="13sp"
|
||||
@ -67,9 +60,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBottom="@+id/timetableWidgetItemNumber"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:layout_toEndOf="@id/timetableWidgetItemNumber"
|
||||
android:layout_toRightOf="@id/timetableWidgetItemNumber"
|
||||
android:maxLines="1"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="13sp"
|
||||
@ -81,9 +72,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBottom="@+id/timetableWidgetItemNumber"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_toEndOf="@+id/timetableWidgetItemTimeStart"
|
||||
android:layout_toRightOf="@+id/timetableWidgetItemTimeStart"
|
||||
android:maxLines="1"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="13sp"
|
||||
@ -96,11 +85,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBottom="@+id/timetableWidgetItemNumber"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_toEndOf="@id/timetableWidgetItemRoom"
|
||||
android:layout_toRightOf="@id/timetableWidgetItemRoom"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/timetable_change_light"
|
||||
@ -115,12 +101,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/timetableWidgetItemTimeFinish"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_toEndOf="@+id/timetableWidgetItemTimeStart"
|
||||
android:layout_toRightOf="@+id/timetableWidgetItemTimeStart"
|
||||
android:textColor="@color/timetable_change_light"
|
||||
android:textSize="13sp"
|
||||
tools:text="Lekcja odwołana: uczniowie zwolnieni do domu"
|
||||
|
@ -29,7 +29,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="13sp"
|
||||
@ -46,7 +45,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textColor="@android:color/black"
|
||||
@ -59,7 +57,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="15sp"
|
||||
@ -70,12 +67,12 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="15sp"
|
||||
tools:text="Agata" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/timetableWidgetItemDescription"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -16,9 +16,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toStartOf="@id/timetableWidgetAccount"
|
||||
android:layout_toLeftOf="@id/timetableWidgetAccount"
|
||||
android:layout_toEndOf="@id/timetableWidgetNext"
|
||||
android:layout_toRightOf="@id/timetableWidgetNext"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
@ -26,7 +24,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="15sp"
|
||||
@ -37,7 +34,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="13sp"
|
||||
@ -49,7 +45,6 @@
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="?android:selectableItemBackground"
|
||||
android:contentDescription="@string/account_title"
|
||||
android:src="@drawable/ic_widget_account" />
|
||||
@ -60,7 +55,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:backgroundTint="@color/colorPrimaryDark"
|
||||
android:contentDescription="@string/all_prev"
|
||||
android:src="@drawable/ic_widget_chevron"
|
||||
@ -72,7 +66,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toEndOf="@id/timetableWidgetPrev"
|
||||
android:layout_toRightOf="@id/timetableWidgetPrev"
|
||||
android:backgroundTint="@color/colorPrimaryDark"
|
||||
android:contentDescription="@string/all_next"
|
||||
android:rotation="180"
|
||||
|
@ -16,9 +16,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toStartOf="@id/timetableWidgetAccount"
|
||||
android:layout_toLeftOf="@id/timetableWidgetAccount"
|
||||
android:layout_toEndOf="@id/timetableWidgetNext"
|
||||
android:layout_toRightOf="@id/timetableWidgetNext"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
@ -26,7 +24,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="15sp"
|
||||
@ -37,7 +34,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="13sp"
|
||||
@ -49,7 +45,6 @@
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="?android:selectableItemBackground"
|
||||
android:contentDescription="@string/account_title"
|
||||
android:src="@drawable/ic_widget_account" />
|
||||
@ -60,7 +55,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:backgroundTint="@color/colorWidgetNavButton"
|
||||
android:contentDescription="@string/all_prev"
|
||||
android:src="@drawable/ic_widget_chevron"
|
||||
@ -72,7 +66,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toEndOf="@id/timetableWidgetPrev"
|
||||
android:layout_toRightOf="@id/timetableWidgetPrev"
|
||||
android:backgroundTint="@color/colorWidgetNavButton"
|
||||
android:contentDescription="@string/all_next"
|
||||
android:rotation="180"
|
||||
|
@ -283,6 +283,7 @@
|
||||
<string name="widget_timetable_theme_title">Thema wählen</string>
|
||||
<string name="widget_timetable_theme_light">Licht</string>
|
||||
<string name="widget_timetable_theme_dark">Dunkel</string>
|
||||
<string name="widget_timetable_theme_system">Systemthema</string>
|
||||
<!--Preferences-->
|
||||
<string name="pref_view_header">Erscheinungsbild</string>
|
||||
<string name="pref_view_list">Standard Ansicht</string>
|
||||
|
@ -303,6 +303,7 @@
|
||||
<string name="widget_timetable_theme_title">Wybierz motyw</string>
|
||||
<string name="widget_timetable_theme_light">Jasny</string>
|
||||
<string name="widget_timetable_theme_dark">Ciemny</string>
|
||||
<string name="widget_timetable_theme_system">Motyw systemu</string>
|
||||
<!--Preferences-->
|
||||
<string name="pref_view_header">Wygląd</string>
|
||||
<string name="pref_view_list">Domyślny widok</string>
|
||||
|
@ -303,6 +303,7 @@
|
||||
<string name="widget_timetable_theme_title">Выбрать тему</string>
|
||||
<string name="widget_timetable_theme_light">Светлая</string>
|
||||
<string name="widget_timetable_theme_dark">Тёмная</string>
|
||||
<string name="widget_timetable_theme_system">Системная тема</string>
|
||||
<!--Preferences-->
|
||||
<string name="pref_view_header">Вид</string>
|
||||
<string name="pref_view_list">Окно по умолчанию</string>
|
||||
|
@ -303,6 +303,7 @@
|
||||
<string name="widget_timetable_theme_title">Увібрати тему</string>
|
||||
<string name="widget_timetable_theme_light">Яскрава</string>
|
||||
<string name="widget_timetable_theme_dark">Темна</string>
|
||||
<string name="widget_timetable_theme_system">Тема системи</string>
|
||||
<!--Preferences-->
|
||||
<string name="pref_view_header">Вигляд</string>
|
||||
<string name="pref_view_list">Вікно за замовчуванням</string>
|
||||
|
@ -36,7 +36,7 @@
|
||||
<item>https://vulcan.net.pl/</item>
|
||||
<item>https://vulcan.net.pl/</item>
|
||||
<item>https://vulcan.net.pl/</item>
|
||||
<item>http://fakelog.cf/?standard</item>
|
||||
<item>http://fakelog.tk/?standard</item>
|
||||
</string-array>
|
||||
<string-array name="hosts_symbols">
|
||||
<item>Default</item>
|
||||
|
@ -336,6 +336,7 @@
|
||||
<string name="widget_timetable_theme_title">Choose theme</string>
|
||||
<string name="widget_timetable_theme_light">Light</string>
|
||||
<string name="widget_timetable_theme_dark">Dark</string>
|
||||
<string name="widget_timetable_theme_system">System Theme</string>
|
||||
|
||||
|
||||
<!--Preferences-->
|
||||
|
Loading…
x
Reference in New Issue
Block a user