Преглед на файлове

Cleanup based on IntelliJ's project inspector

Aidan Follestad преди 6 години
родител
ревизия
a93f64b6b5

+ 4 - 4
core/src/main/java/com/afollestad/materialdialogs/callbacks/DialogCallbackExt.kt

@@ -4,7 +4,7 @@ import com.afollestad.materialdialogs.DialogCallback
 import com.afollestad.materialdialogs.MaterialDialog
 
 /**
- * Adds a listener that's invoked right before the dialog is [show]'n. If this is called
+ * Adds a listener that's invoked right before the dialog is [MaterialDialog.show]'n. If this is called
  * multiple times, it appends additional callbacks, rather than overwriting.
  */
 fun MaterialDialog.onPreShow(callback: DialogCallback): MaterialDialog {
@@ -13,7 +13,7 @@ fun MaterialDialog.onPreShow(callback: DialogCallback): MaterialDialog {
 }
 
 /**
- * Adds a listener that's invoked when the dialog is [show]'n. If this is called
+ * Adds a listener that's invoked when the dialog is [MaterialDialog.show]'n. If this is called
  * multiple times, it appends additional callbacks, rather than overwriting.
  *
  * If the dialog is already showing, the callback be will be invoked immediately.
@@ -29,7 +29,7 @@ fun MaterialDialog.onShow(callback: DialogCallback): MaterialDialog {
 }
 
 /**
- * Adds a listener that's invoked when the dialog is [dismiss]'d. If this is called
+ * Adds a listener that's invoked when the dialog is [MaterialDialog.dismiss]'d. If this is called
  * multiple times, it appends additional callbacks, rather than overwriting.
  */
 fun MaterialDialog.onDismiss(callback: DialogCallback): MaterialDialog {
@@ -39,7 +39,7 @@ fun MaterialDialog.onDismiss(callback: DialogCallback): MaterialDialog {
 }
 
 /**
- * Adds a listener that's invoked when the dialog is [cancel]'d. If this is called
+ * Adds a listener that's invoked when the dialog is [MaterialDialog.cancel]'d. If this is called
  * multiple times, it appends additional callbacks, rather than overwriting.
  */
 fun MaterialDialog.onCancel(callback: DialogCallback): MaterialDialog {

+ 1 - 1
core/src/main/java/com/afollestad/materialdialogs/internal/list/MultiChoiceDialogAdapter.kt

@@ -76,7 +76,7 @@ internal class MultiChoiceDialogAdapter(
         }
       }
     }
-  var disabledIndices: IntArray = disabledItems ?: IntArray(0)
+  private var disabledIndices: IntArray = disabledItems ?: IntArray(0)
 
   internal fun itemClicked(index: Int) {
     val newSelection = this.currentSelection.toMutableList()

+ 1 - 1
core/src/main/java/com/afollestad/materialdialogs/internal/list/SingleChoiceDialogAdapter.kt

@@ -66,7 +66,7 @@ internal class SingleChoiceDialogAdapter(
       notifyItemChanged(previousSelection)
       notifyItemChanged(value)
     }
-  var disabledIndices: IntArray = disabledItems ?: IntArray(0)
+  private var disabledIndices: IntArray = disabledItems ?: IntArray(0)
 
   internal fun itemClicked(index: Int) {
     this.currentSelection = index

+ 0 - 16
sample/src/main/java/com/afollestad/materialdialogssample/MainActivity.kt

@@ -753,22 +753,6 @@ class MainActivity : AppCompatActivity() {
     }
   }
 
-  private fun showFolderChooser() {
-    permission.request(arrayOf(READ_EXTERNAL_STORAGE)) { result ->
-      if (!result.allGranted()) {
-        toast("Storage permission is needed for file choosers")
-        return@request
-      }
-
-      MaterialDialog(this).show {
-        folderChooser { _, folder ->
-          toast("Selected folder: ${folder.absolutePath}")
-        }
-        debugMode(debugMode)
-      }
-    }
-  }
-
   private fun showFolderChooserButtons() {
     permission.request(arrayOf(READ_EXTERNAL_STORAGE)) { result ->
       if (!result.allGranted()) {