Skip to content

Commit

Permalink
Functional interfaces were added
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoscgdev committed Sep 17, 2020
1 parent d1eeea4 commit d1edfdd
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 10 deletions.
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
18 changes: 18 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation project(':dialogsheet')
testImplementation 'junit:junit:4.12'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ class MainActivity : AppCompatActivity() {
.setMessage(R.string.lorem)
.setSingleLineTitle(true)
.setColoredNavigationBar(true) //.setButtonsColorRes(R.color.colorAccent) // You can use dialogSheetAccent style attribute instead
.setPositiveButton(android.R.string.ok, object: DialogSheet.OnPositiveClickListener {
override fun onClick(v: View?) {
Toast.makeText(this@MainActivity, "Positive button clicked!", Toast.LENGTH_SHORT).show()
}
})
.setPositiveButton(android.R.string.ok) {
Toast.makeText(this@MainActivity, "Positive button clicked!", Toast.LENGTH_SHORT).show()
}
.setNegativeButton(android.R.string.cancel)
.setNeutralButton("Neutral")
//.setNeutralButtonColor(Color.BLACK)
Expand Down
2 changes: 1 addition & 1 deletion dialogsheet/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ android {

dependencies {
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ class DialogSheet(private val context: Context, private val useNewStyle: Boolean
var inflatedView: View? = null
private set

interface OnPositiveClickListener {
fun interface OnPositiveClickListener {
fun onClick(v: View?)
}

interface OnNegativeClickListener {
fun interface OnNegativeClickListener {
fun onClick(v: View?)
}

interface OnNeutralClickListener {
fun interface OnNeutralClickListener {
fun onClick(v: View?)
}

Expand Down

0 comments on commit d1edfdd

Please sign in to comment.