forked from github/wulkanowy-mirror
Merge branch 'release/0.10.1'
This commit is contained in:
commit
e269886eae
@ -14,7 +14,7 @@ cache:
|
|||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- develop
|
- develop
|
||||||
- 0.10.0
|
- 0.10.1
|
||||||
|
|
||||||
android:
|
android:
|
||||||
licenses:
|
licenses:
|
||||||
|
@ -17,8 +17,8 @@ android {
|
|||||||
testApplicationId "io.github.tests.wulkanowy"
|
testApplicationId "io.github.tests.wulkanowy"
|
||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
targetSdkVersion 28
|
targetSdkVersion 28
|
||||||
versionCode 43
|
versionCode 44
|
||||||
versionName "0.10.0"
|
versionName "0.10.1"
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
vectorDrawables.useSupportLibrary = true
|
vectorDrawables.useSupportLibrary = true
|
||||||
@ -123,18 +123,18 @@ configurations.all {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation "io.github.wulkanowy:api:0.10.0"
|
implementation "io.github.wulkanowy:api:0.10.1"
|
||||||
|
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||||
implementation "androidx.core:core-ktx:1.1.0-rc03"
|
implementation "androidx.core:core-ktx:1.1.0"
|
||||||
implementation "androidx.activity:activity-ktx:1.0.0-rc01"
|
implementation "androidx.activity:activity-ktx:1.0.0"
|
||||||
implementation "androidx.appcompat:appcompat:1.1.0-rc01"
|
implementation "androidx.appcompat:appcompat:1.1.0"
|
||||||
implementation "androidx.appcompat:appcompat-resources:1.1.0-rc01"
|
implementation "androidx.appcompat:appcompat-resources:1.1.0"
|
||||||
implementation "androidx.fragment:fragment-ktx:1.1.0-rc04"
|
implementation "androidx.fragment:fragment-ktx:1.1.0"
|
||||||
implementation "androidx.annotation:annotation:1.1.0"
|
implementation "androidx.annotation:annotation:1.1.0"
|
||||||
implementation "androidx.multidex:multidex:2.0.1"
|
implementation "androidx.multidex:multidex:2.0.1"
|
||||||
|
|
||||||
implementation "androidx.preference:preference-ktx:1.1.0-rc01"
|
implementation "androidx.preference:preference-ktx:1.1.0"
|
||||||
implementation "androidx.recyclerview:recyclerview:1.1.0-beta03"
|
implementation "androidx.recyclerview:recyclerview:1.1.0-beta03"
|
||||||
implementation "androidx.viewpager:viewpager:1.0.0"
|
implementation "androidx.viewpager:viewpager:1.0.0"
|
||||||
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
|
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
|
||||||
|
2
app/proguard-rules.pro
vendored
2
app/proguard-rules.pro
vendored
@ -42,4 +42,4 @@
|
|||||||
|
|
||||||
|
|
||||||
#Config for Material Components
|
#Config for Material Components
|
||||||
-keep class com.google.android.material.tabs.**
|
-keep class com.google.android.material.tabs.** { *; }
|
||||||
|
@ -2,6 +2,7 @@ package io.github.wulkanowy.ui.modules.luckynumberwidget
|
|||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import androidx.core.graphics.ColorUtils
|
||||||
import eu.davidea.flexibleadapter.FlexibleAdapter
|
import eu.davidea.flexibleadapter.FlexibleAdapter
|
||||||
import eu.davidea.flexibleadapter.items.AbstractFlexibleItem
|
import eu.davidea.flexibleadapter.items.AbstractFlexibleItem
|
||||||
import eu.davidea.flexibleadapter.items.IFlexible
|
import eu.davidea.flexibleadapter.items.IFlexible
|
||||||
@ -9,6 +10,7 @@ import eu.davidea.viewholders.FlexibleViewHolder
|
|||||||
import io.github.wulkanowy.R
|
import io.github.wulkanowy.R
|
||||||
import io.github.wulkanowy.data.db.entities.Student
|
import io.github.wulkanowy.data.db.entities.Student
|
||||||
import io.github.wulkanowy.ui.modules.timetablewidget.TimetableWidgetConfigureItem
|
import io.github.wulkanowy.ui.modules.timetablewidget.TimetableWidgetConfigureItem
|
||||||
|
import io.github.wulkanowy.utils.getThemeAttrColor
|
||||||
import kotlinx.android.extensions.LayoutContainer
|
import kotlinx.android.extensions.LayoutContainer
|
||||||
import kotlinx.android.synthetic.main.item_account.*
|
import kotlinx.android.synthetic.main.item_account.*
|
||||||
|
|
||||||
@ -17,16 +19,19 @@ class LuckyNumberWidgetConfigureItem(var student: Student, val isCurrent: Boolea
|
|||||||
|
|
||||||
override fun getLayoutRes() = R.layout.item_account
|
override fun getLayoutRes() = R.layout.item_account
|
||||||
|
|
||||||
override fun createViewHolder(view: View, adapter: FlexibleAdapter<IFlexible<*>>): ViewHolder {
|
override fun createViewHolder(view: View, adapter: FlexibleAdapter<IFlexible<*>>) = ViewHolder(view, adapter)
|
||||||
return ViewHolder(view, adapter)
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressLint("SetTextI18n")
|
@SuppressLint("SetTextI18n")
|
||||||
override fun bindViewHolder(adapter: FlexibleAdapter<IFlexible<*>>, holder: ViewHolder, position: Int, payloads: MutableList<Any>) {
|
override fun bindViewHolder(adapter: FlexibleAdapter<IFlexible<*>>, holder: ViewHolder, position: Int, payloads: MutableList<Any>) {
|
||||||
holder.apply {
|
val context = holder.contentView.context
|
||||||
|
|
||||||
|
val colorImage = if (isCurrent) context.getThemeAttrColor(R.attr.colorPrimary)
|
||||||
|
else ColorUtils.setAlphaComponent(context.getThemeAttrColor(R.attr.colorOnSurface), 153)
|
||||||
|
|
||||||
|
with(holder) {
|
||||||
accountItemName.text = "${student.studentName} ${student.className}"
|
accountItemName.text = "${student.studentName} ${student.className}"
|
||||||
accountItemSchool.text = student.schoolName
|
accountItemSchool.text = student.schoolName
|
||||||
accountItemImage.setBackgroundResource(if (isCurrent) R.drawable.ic_account_circular_border else 0)
|
accountItemImage.setColorFilter(colorImage)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,8 +52,9 @@ class LuckyNumberWidgetConfigureItem(var student: Student, val isCurrent: Boolea
|
|||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
class ViewHolder(view: View, adapter: FlexibleAdapter<*>) : FlexibleViewHolder(view, adapter), LayoutContainer {
|
class ViewHolder(view: View, adapter: FlexibleAdapter<*>) : FlexibleViewHolder(view, adapter),
|
||||||
override val containerView: View
|
LayoutContainer {
|
||||||
get() = contentView
|
|
||||||
|
override val containerView: View? get() = contentView
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,12 +2,14 @@ package io.github.wulkanowy.ui.modules.timetablewidget
|
|||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import androidx.core.graphics.ColorUtils
|
||||||
import eu.davidea.flexibleadapter.FlexibleAdapter
|
import eu.davidea.flexibleadapter.FlexibleAdapter
|
||||||
import eu.davidea.flexibleadapter.items.AbstractFlexibleItem
|
import eu.davidea.flexibleadapter.items.AbstractFlexibleItem
|
||||||
import eu.davidea.flexibleadapter.items.IFlexible
|
import eu.davidea.flexibleadapter.items.IFlexible
|
||||||
import eu.davidea.viewholders.FlexibleViewHolder
|
import eu.davidea.viewholders.FlexibleViewHolder
|
||||||
import io.github.wulkanowy.R
|
import io.github.wulkanowy.R
|
||||||
import io.github.wulkanowy.data.db.entities.Student
|
import io.github.wulkanowy.data.db.entities.Student
|
||||||
|
import io.github.wulkanowy.utils.getThemeAttrColor
|
||||||
import kotlinx.android.extensions.LayoutContainer
|
import kotlinx.android.extensions.LayoutContainer
|
||||||
import kotlinx.android.synthetic.main.item_account.*
|
import kotlinx.android.synthetic.main.item_account.*
|
||||||
|
|
||||||
@ -16,16 +18,19 @@ class TimetableWidgetConfigureItem(val student: Student, private val isCurrent:
|
|||||||
|
|
||||||
override fun getLayoutRes() = R.layout.item_account
|
override fun getLayoutRes() = R.layout.item_account
|
||||||
|
|
||||||
override fun createViewHolder(view: View, adapter: FlexibleAdapter<IFlexible<*>>): ViewHolder {
|
override fun createViewHolder(view: View, adapter: FlexibleAdapter<IFlexible<*>>) = ViewHolder(view, adapter)
|
||||||
return ViewHolder(view, adapter)
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressLint("SetTextI18n")
|
@SuppressLint("SetTextI18n")
|
||||||
override fun bindViewHolder(adapter: FlexibleAdapter<IFlexible<*>>, holder: ViewHolder, position: Int, payloads: MutableList<Any>) {
|
override fun bindViewHolder(adapter: FlexibleAdapter<IFlexible<*>>, holder: ViewHolder, position: Int, payloads: MutableList<Any>) {
|
||||||
holder.apply {
|
val context = holder.contentView.context
|
||||||
|
|
||||||
|
val colorImage = if (isCurrent) context.getThemeAttrColor(R.attr.colorPrimary)
|
||||||
|
else ColorUtils.setAlphaComponent(context.getThemeAttrColor(R.attr.colorOnSurface), 153)
|
||||||
|
|
||||||
|
with(holder) {
|
||||||
accountItemName.text = "${student.studentName} ${student.className}"
|
accountItemName.text = "${student.studentName} ${student.className}"
|
||||||
accountItemSchool.text = student.schoolName
|
accountItemSchool.text = student.schoolName
|
||||||
accountItemImage.setBackgroundResource(if (isCurrent) R.drawable.ic_account_circular_border else 0)
|
accountItemImage.setColorFilter(colorImage)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,8 +51,9 @@ class TimetableWidgetConfigureItem(val student: Student, private val isCurrent:
|
|||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
class ViewHolder(view: View, adapter: FlexibleAdapter<*>) : FlexibleViewHolder(view, adapter), LayoutContainer {
|
class ViewHolder(view: View, adapter: FlexibleAdapter<*>) : FlexibleViewHolder(view, adapter),
|
||||||
override val containerView: View
|
LayoutContainer {
|
||||||
get() = contentView
|
|
||||||
|
override val containerView: View? get() = contentView
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="oval">
|
|
||||||
<solid android:color="@android:color/transparent" />
|
|
||||||
<stroke
|
|
||||||
android:width="3dp"
|
|
||||||
android:color="@color/colorPrimaryLight" />
|
|
||||||
</shape>
|
|
@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="oval">
|
|
||||||
<solid android:color="@android:color/transparent" />
|
|
||||||
<stroke
|
|
||||||
android:width="3dp"
|
|
||||||
android:color="@color/colorPrimary" />
|
|
||||||
</shape>
|
|
@ -226,7 +226,7 @@
|
|||||||
<!--About-->
|
<!--About-->
|
||||||
<string name="about_version">Wersja aplikacji</string>
|
<string name="about_version">Wersja aplikacji</string>
|
||||||
<string name="about_feedback">Zgłoś błąd</string>
|
<string name="about_feedback">Zgłoś błąd</string>
|
||||||
<string name="about_feedback_summary">Wyślij zgłoszenie o błedzię poprzez e-maila</string>
|
<string name="about_feedback_summary">Wyślij zgłoszenie o błędzie poprzez e-maila</string>
|
||||||
<string name="about_discord">Serwer discord</string>
|
<string name="about_discord">Serwer discord</string>
|
||||||
<string name="about_discord_summary">Dołącz do społeczności wulkanowego</string>
|
<string name="about_discord_summary">Dołącz do społeczności wulkanowego</string>
|
||||||
<string name="about_privacy">Polityka prywatności</string>
|
<string name="about_privacy">Polityka prywatności</string>
|
||||||
|
@ -4,6 +4,7 @@ buildscript {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
google()
|
google()
|
||||||
jcenter()
|
jcenter()
|
||||||
|
maven { url 'https://jitpack.io' }
|
||||||
maven { url "https://plugins.gradle.org/m2/" }
|
maven { url "https://plugins.gradle.org/m2/" }
|
||||||
maven { url 'https://maven.fabric.io/public' }
|
maven { url 'https://maven.fabric.io/public' }
|
||||||
}
|
}
|
||||||
@ -12,7 +13,7 @@ buildscript {
|
|||||||
classpath 'com.android.tools.build:gradle:3.5.0'
|
classpath 'com.android.tools.build:gradle:3.5.0'
|
||||||
classpath 'com.google.gms:google-services:4.3.1'
|
classpath 'com.google.gms:google-services:4.3.1'
|
||||||
classpath "io.fabric.tools:gradle:1.31.0"
|
classpath "io.fabric.tools:gradle:1.31.0"
|
||||||
classpath "com.github.triplet.gradle:play-publisher:2.3.0"
|
classpath "com.github.Triple-T:gradle-play-publisher:cdaeb61a87fedd1874e15e94eab7c6b80fda6727"
|
||||||
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7.1"
|
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7.1"
|
||||||
classpath "gradle.plugin.com.star-zero.gradle:githook:1.1.0"
|
classpath "gradle.plugin.com.star-zero.gradle:githook:1.1.0"
|
||||||
}
|
}
|
||||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.1-all.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
6
gradlew
vendored
6
gradlew
vendored
@ -7,7 +7,7 @@
|
|||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
# You may obtain a copy of the License at
|
# You may obtain a copy of the License at
|
||||||
#
|
#
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
#
|
#
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
@ -125,8 +125,8 @@ if $darwin; then
|
|||||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# For Cygwin, switch paths to Windows format before running java
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
if $cygwin ; then
|
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||||
|
2
gradlew.bat
vendored
2
gradlew.bat
vendored
@ -5,7 +5,7 @@
|
|||||||
@rem you may not use this file except in compliance with the License.
|
@rem you may not use this file except in compliance with the License.
|
||||||
@rem You may obtain a copy of the License at
|
@rem You may obtain a copy of the License at
|
||||||
@rem
|
@rem
|
||||||
@rem http://www.apache.org/licenses/LICENSE-2.0
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||||
@rem
|
@rem
|
||||||
@rem Unless required by applicable law or agreed to in writing, software
|
@rem Unless required by applicable law or agreed to in writing, software
|
||||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user