Skip to content

Commit

Permalink
fix freeze when theme changes (API <= 23)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattvchandler committed May 30, 2019
1 parent 21dc1bd commit 8c4e5d2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
12 changes: 6 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ android {
applicationId "org.mattvchandler.progressbars"
minSdkVersion 19
targetSdkVersion 28
versionName "2.0.2"
versionName "2.0.3"
// version code is <MIN_SDK>0<2-digit MAJOR><2-digit MINOR><2-digit PATCH>
versionCode 190020002
versionCode 190020003
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
Expand All @@ -28,10 +28,10 @@ android {
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.appcompat:appcompat:1.1.0-alpha04'
implementation 'com.google.android.material:material:1.1.0-alpha05'
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha04'
implementation 'androidx.preference:preference:1.1.0-alpha04'
implementation 'androidx.appcompat:appcompat:1.1.0-alpha05'
implementation 'com.google.android.material:material:1.1.0-alpha06'
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha05'
implementation 'androidx.preference:preference:1.1.0-alpha05'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
repositories {
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/java/util/Dynamic_theme_activity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ package org.mattvchandler.progressbars.util

import android.content.Context
import android.os.Bundle
import android.os.Handler
import android.preference.PreferenceManager
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.app.AppCompatDelegate
Expand Down Expand Up @@ -51,7 +52,7 @@ abstract class Dynamic_theme_activity: AppCompatActivity()

// has the theme changed? recreate this activity
if(new_theme != theme)
recreate()
Handler().postDelayed({recreate()}, 0)
}

companion object
Expand Down

0 comments on commit 8c4e5d2

Please sign in to comment.