forked from github/wulkanowy-mirror
Update material design components (#587)
This commit is contained in:
parent
c708b0c20e
commit
2f18d42c86
@ -119,7 +119,6 @@ ext {
|
|||||||
|
|
||||||
configurations.all {
|
configurations.all {
|
||||||
resolutionStrategy.force "androidx.constraintlayout:constraintlayout:1.1.3"
|
resolutionStrategy.force "androidx.constraintlayout:constraintlayout:1.1.3"
|
||||||
resolutionStrategy.force "com.google.android.material:material:1.1.0-alpha07"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@ -140,7 +139,7 @@ dependencies {
|
|||||||
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha03"
|
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha03"
|
||||||
implementation "androidx.constraintlayout:constraintlayout:1.1.3"
|
implementation "androidx.constraintlayout:constraintlayout:1.1.3"
|
||||||
implementation "androidx.coordinatorlayout:coordinatorlayout:1.1.0-rc01"
|
implementation "androidx.coordinatorlayout:coordinatorlayout:1.1.0-rc01"
|
||||||
implementation "com.google.android.material:material:1.1.0-alpha07"
|
implementation "com.google.android.material:material:1.1.0-beta02"
|
||||||
implementation "com.github.wulkanowy:material-chips-input:2.0.1"
|
implementation "com.github.wulkanowy:material-chips-input:2.0.1"
|
||||||
implementation "com.github.PhilJay:MPAndroidChart:v3.1.0"
|
implementation "com.github.PhilJay:MPAndroidChart:v3.1.0"
|
||||||
implementation "me.zhanghai.android.materialprogressbar:library:1.6.1"
|
implementation "me.zhanghai.android.materialprogressbar:library:1.6.1"
|
||||||
|
@ -100,7 +100,7 @@ class MainActivity : BaseActivity<MainPresenter>(), MainView {
|
|||||||
override fun initView() {
|
override fun initView() {
|
||||||
with(mainToolbar) {
|
with(mainToolbar) {
|
||||||
if (SDK_INT >= LOLLIPOP) stateListAnimator = null
|
if (SDK_INT >= LOLLIPOP) stateListAnimator = null
|
||||||
setBackgroundColor(overlayProvider.get().getSurfaceColorWithOverlayIfNeeded(dpToPx(4f)))
|
setBackgroundColor(overlayProvider.get().compositeOverlayWithThemeSurfaceColorIfNeeded(dpToPx(4f)))
|
||||||
}
|
}
|
||||||
|
|
||||||
with(mainBottomNav) {
|
with(mainBottomNav) {
|
||||||
@ -113,7 +113,7 @@ class MainActivity : BaseActivity<MainPresenter>(), MainView {
|
|||||||
))
|
))
|
||||||
accentColor = getThemeAttrColor(R.attr.colorPrimary)
|
accentColor = getThemeAttrColor(R.attr.colorPrimary)
|
||||||
inactiveColor = ColorUtils.setAlphaComponent(getThemeAttrColor(R.attr.colorOnSurface), 153)
|
inactiveColor = ColorUtils.setAlphaComponent(getThemeAttrColor(R.attr.colorOnSurface), 153)
|
||||||
defaultBackgroundColor = overlayProvider.get().getSurfaceColorWithOverlayIfNeeded(dpToPx(8f))
|
defaultBackgroundColor = overlayProvider.get().compositeOverlayWithThemeSurfaceColorIfNeeded(dpToPx(8f))
|
||||||
titleState = ALWAYS_SHOW
|
titleState = ALWAYS_SHOW
|
||||||
currentItem = startMenuIndex
|
currentItem = startMenuIndex
|
||||||
isBehaviorTranslationEnabled = false
|
isBehaviorTranslationEnabled = false
|
||||||
|
@ -33,7 +33,7 @@ class MaterialLinearLayout : LinearLayout {
|
|||||||
if (SDK_INT >= LOLLIPOP) {
|
if (SDK_INT >= LOLLIPOP) {
|
||||||
setElevation(elevation)
|
setElevation(elevation)
|
||||||
} else {
|
} else {
|
||||||
setBackgroundColor(ElevationOverlayProvider(context).getSurfaceColorWithOverlayIfNeeded(elevation))
|
setBackgroundColor(ElevationOverlayProvider(context).compositeOverlayWithThemeSurfaceColorIfNeeded(elevation))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ open class MaterialTabLayout : TabLayout {
|
|||||||
if (SDK_INT >= LOLLIPOP) {
|
if (SDK_INT >= LOLLIPOP) {
|
||||||
setElevation(elevation)
|
setElevation(elevation)
|
||||||
} else {
|
} else {
|
||||||
setBackgroundColor(ElevationOverlayProvider(context).getSurfaceColorWithOverlayIfNeeded(elevation))
|
setBackgroundColor(ElevationOverlayProvider(context).compositeOverlayWithThemeSurfaceColorIfNeeded(elevation))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
android:visibility="invisible"
|
android:visibility="invisible"
|
||||||
app:tabMode="scrollable"
|
app:tabMode="scrollable"
|
||||||
app:tabSelectedTextColor="?colorPrimary"
|
app:tabSelectedTextColor="?colorPrimary"
|
||||||
app:tabTextColor="@color/mtrl_on_surface_emphasis_medium"
|
app:tabTextColor="@color/material_on_surface_emphasis_medium"
|
||||||
tools:ignore="UnusedAttribute"
|
tools:ignore="UnusedAttribute"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
app:tabMaxWidth="0dp"
|
app:tabMaxWidth="0dp"
|
||||||
app:tabMode="fixed"
|
app:tabMode="fixed"
|
||||||
app:tabSelectedTextColor="?colorPrimary"
|
app:tabSelectedTextColor="?colorPrimary"
|
||||||
app:tabTextColor="@color/mtrl_on_surface_emphasis_medium"
|
app:tabTextColor="@color/material_on_surface_emphasis_medium"
|
||||||
tools:ignore="UnusedAttribute"
|
tools:ignore="UnusedAttribute"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
@ -35,8 +35,8 @@
|
|||||||
android:layout_margin="16dp"
|
android:layout_margin="16dp"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:tint="?colorOnSecondary"
|
|
||||||
android:text="@string/send_message_title"
|
android:text="@string/send_message_title"
|
||||||
|
android:tint="?colorOnSecondary"
|
||||||
app:icon="@drawable/ic_menu_message_write" />
|
app:icon="@drawable/ic_menu_message_write" />
|
||||||
|
|
||||||
<me.zhanghai.android.materialprogressbar.MaterialProgressBar
|
<me.zhanghai.android.materialprogressbar.MaterialProgressBar
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
app:tabMaxWidth="0dp"
|
app:tabMaxWidth="0dp"
|
||||||
app:tabMode="fixed"
|
app:tabMode="fixed"
|
||||||
app:tabSelectedTextColor="?colorPrimary"
|
app:tabSelectedTextColor="?colorPrimary"
|
||||||
app:tabTextColor="@color/mtrl_on_surface_emphasis_medium"
|
app:tabTextColor="@color/material_on_surface_emphasis_medium"
|
||||||
tools:ignore="UnusedAttribute"
|
tools:ignore="UnusedAttribute"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
@ -6,6 +6,6 @@
|
|||||||
android:icon="@drawable/ic_menu_attendance_summary"
|
android:icon="@drawable/ic_menu_attendance_summary"
|
||||||
android:orderInCategory="1"
|
android:orderInCategory="1"
|
||||||
android:title="@string/attendance_summary_button"
|
android:title="@string/attendance_summary_button"
|
||||||
app:iconTint="@color/mtrl_on_surface_emphasis_medium"
|
app:iconTint="@color/material_on_surface_emphasis_medium"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="ifRoom" />
|
||||||
</menu>
|
</menu>
|
||||||
|
@ -6,6 +6,6 @@
|
|||||||
android:icon="@drawable/ic_menu_grade_semester"
|
android:icon="@drawable/ic_menu_grade_semester"
|
||||||
android:orderInCategory="1"
|
android:orderInCategory="1"
|
||||||
android:title="@string/grade_switch_semester"
|
android:title="@string/grade_switch_semester"
|
||||||
app:iconTint="@color/mtrl_on_surface_emphasis_medium"
|
app:iconTint="@color/material_on_surface_emphasis_medium"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="ifRoom" />
|
||||||
</menu>
|
</menu>
|
||||||
|
@ -6,6 +6,6 @@
|
|||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
android:orderInCategory="100"
|
android:orderInCategory="100"
|
||||||
android:title="@string/grade_menu_read"
|
android:title="@string/grade_menu_read"
|
||||||
app:iconTint="@color/mtrl_on_surface_emphasis_medium"
|
app:iconTint="@color/material_on_surface_emphasis_medium"
|
||||||
app:showAsAction="never" />
|
app:showAsAction="never" />
|
||||||
</menu>
|
</menu>
|
||||||
|
@ -6,6 +6,6 @@
|
|||||||
android:icon="@drawable/ic_all_account"
|
android:icon="@drawable/ic_all_account"
|
||||||
android:orderInCategory="2"
|
android:orderInCategory="2"
|
||||||
android:title="@string/main_account_picker"
|
android:title="@string/main_account_picker"
|
||||||
app:iconTint="@color/mtrl_on_surface_emphasis_medium"
|
app:iconTint="@color/material_on_surface_emphasis_medium"
|
||||||
app:showAsAction="always" />
|
app:showAsAction="always" />
|
||||||
</menu>
|
</menu>
|
||||||
|
@ -6,20 +6,20 @@
|
|||||||
android:icon="@drawable/ic_menu_message_reply"
|
android:icon="@drawable/ic_menu_message_reply"
|
||||||
android:orderInCategory="1"
|
android:orderInCategory="1"
|
||||||
android:title="@string/message_reply"
|
android:title="@string/message_reply"
|
||||||
app:iconTint="@color/mtrl_on_surface_emphasis_medium"
|
app:iconTint="@color/material_on_surface_emphasis_medium"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="ifRoom" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/messagePreviewMenuForward"
|
android:id="@+id/messagePreviewMenuForward"
|
||||||
android:icon="@drawable/ic_menu_message_forward"
|
android:icon="@drawable/ic_menu_message_forward"
|
||||||
android:orderInCategory="1"
|
android:orderInCategory="1"
|
||||||
android:title="@string/message_forward"
|
android:title="@string/message_forward"
|
||||||
app:iconTint="@color/mtrl_on_surface_emphasis_medium"
|
app:iconTint="@color/material_on_surface_emphasis_medium"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="ifRoom" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/messagePreviewMenuDelete"
|
android:id="@+id/messagePreviewMenuDelete"
|
||||||
android:icon="@drawable/ic_menu_message_delete"
|
android:icon="@drawable/ic_menu_message_delete"
|
||||||
android:orderInCategory="1"
|
android:orderInCategory="1"
|
||||||
android:title="@string/message_delete"
|
android:title="@string/message_delete"
|
||||||
app:iconTint="@color/mtrl_on_surface_emphasis_medium"
|
app:iconTint="@color/material_on_surface_emphasis_medium"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="ifRoom" />
|
||||||
</menu>
|
</menu>
|
||||||
|
@ -6,6 +6,6 @@
|
|||||||
android:icon="@drawable/ic_menu_message_send"
|
android:icon="@drawable/ic_menu_message_send"
|
||||||
android:orderInCategory="1"
|
android:orderInCategory="1"
|
||||||
android:title="@string/send_message_title"
|
android:title="@string/send_message_title"
|
||||||
app:iconTint="@color/mtrl_on_surface_emphasis_medium"
|
app:iconTint="@color/material_on_surface_emphasis_medium"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="ifRoom" />
|
||||||
</menu>
|
</menu>
|
||||||
|
@ -6,6 +6,6 @@
|
|||||||
android:icon="@drawable/ic_menu_timetable_lessons_completed"
|
android:icon="@drawable/ic_menu_timetable_lessons_completed"
|
||||||
android:orderInCategory="1"
|
android:orderInCategory="1"
|
||||||
android:title="@string/completed_lessons_button"
|
android:title="@string/completed_lessons_button"
|
||||||
app:iconTint="@color/mtrl_on_surface_emphasis_medium"
|
app:iconTint="@color/material_on_surface_emphasis_medium"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="ifRoom" />
|
||||||
</menu>
|
</menu>
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
# Project-wide Gradle settings.
|
# Project-wide Gradle settings.
|
||||||
|
|
||||||
# IDE (e.g. Android Studio) users:
|
# IDE (e.g. Android Studio) users:
|
||||||
# Gradle settings configured through the IDE *will override*
|
# Gradle settings configured through the IDE *will override*
|
||||||
# any settings specified in this file.
|
# any settings specified in this file.
|
||||||
|
|
||||||
# For more details on how to configure your build environment visit
|
# For more details on how to configure your build environment visit
|
||||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||||
|
|
||||||
@ -18,4 +16,4 @@ kapt.incremental.apt=true
|
|||||||
# When configured, Gradle will run in incubating parallel mode.
|
# When configured, Gradle will run in incubating parallel mode.
|
||||||
# This option should only be used with decoupled projects. More details, visit
|
# This option should only be used with decoupled projects. More details, visit
|
||||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||||
# org.gradle.parallel=true
|
# org.gradle.parallel=true
|
Loading…
x
Reference in New Issue
Block a user