Skip to content

Commit

Permalink
Bug Fix: indeterminate value correction during style switch
Browse files Browse the repository at this point in the history
  • Loading branch information
Livin21 committed Mar 14, 2018
1 parent c44244e commit 88140b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class MainActivity : AppCompatActivity() {
private var progressStyle = ProgressDialog.STYLE_SPINNER

/* indeterminate mode selector */
private var indeterminate = true
private var indeterminate = false

@SuppressLint("SetTextI18n")
override fun onCreate(savedInstanceState: Bundle?) {
Expand Down Expand Up @@ -178,6 +178,4 @@ class MainActivity : AppCompatActivity() {
progressDialog.onBackPressed { super.onBackPressed() }
}



}
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ class ProgressDialog(private val activity: Activity) {

setMax(mMax)
setProgress(mProgressVal)
setIndeterminate(mIndeterminate)

mView = view

Expand Down Expand Up @@ -344,9 +345,9 @@ class ProgressDialog(private val activity: Activity) {
fun setIndeterminate(indeterminate: Boolean) {
if (mProgress != null) {
mProgress!!.isIndeterminate = indeterminate
} else {
mIndeterminate = indeterminate
}
mIndeterminate = indeterminate

/* Hide progress display TextViews */
if (indeterminate){
mProgressNumberFormat = null
Expand Down

0 comments on commit 88140b7

Please sign in to comment.