Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

professorDeveloper/Dialog-Library

Repository files navigation

Dialog-Library

platform API License

Dependency

Add this to your module's build.gradle file:

dependencies {
	
	 implementation 'com.github.professorDeveloper:Dialog-Library:1.0.3'
}

Material Dialog-Library

Wifi Dialog

 
 val dialog = WifiDialog()
 dialog.show(supportFragmentManager, "wifi_dialog")
 dialog.createDialog("Google wifi", "Pixel 2 A", "i929uui4ui", "Wpa2")
 dialog.setonButtonsCLickedListener(object : WifiDialog.WiFiDialogListeners {
 override fun okButtonClicked(password: String) {
 Toast.makeText(this@MainActivity, "$password", Toast.LENGTH_SHORT).show()
 }
 override fun cancelButtonClicked() {}
 })
 

Color Dialog

 val dialog = ColorDialog()
 dialog.show(supportFragmentManager, "color_dialog")
 dialog.setOnColorSelectedListener(object : ColorDialog.OnColorSelectListener {
 override fun OnColorSelected(color: Int) {
 binding.colorsheetDialog.setBackgroundColor(color)
 }
 })

Dialog Bassic

 val basicDialog = BasicDialog(this)
 basicDialog.createDialog(
 title = "Lorem ipsum?",
 mainTxt = "Lorem ipsum dolor sit amet, consectetur adipiscing elit," +
 "sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
 okBtnTxt = "Agree",
 cancelBtnTxt = "Disagree"
 )
 basicDialog.show(supportFragmentManager, "basic_dialog")
 basicDialog.setOnButtonClickListener(object : BasicDialog.BasicDialogListeners {
 override fun okButtonClicked() {
 Toast.makeText(this@MainActivity, "DISAGREE", Toast.LENGTH_SHORT).show()
 }
 override fun cancelButtonClicked() {
 Toast.makeText(this@MainActivity, "AGREE", Toast.LENGTH_SHORT).show()
 }
 })

Date Dialog

 val dialog = DateAndTimeDialog()
 dialog.show(supportFragmentManager, "date_dialog")
 dialog.setOnOkButtonClicked(object : DateAndTimeDialog.OnButtonClicked {
 @RequiresApi(Build.VERSION_CODES.M)
 override fun OnOkButtonClicked(datePicker: DatePicker, timePicker: TimePicker) {
 val date = "${datePicker.dayOfMonth}.${datePicker.month}.${datePicker.year} " +
 "${timePicker.hour}:${timePicker.minute}"
 Toast.makeText(this@MainActivity, date, Toast.LENGTH_SHORT).show()
 }
 })

Screenshot

Untitled (2)

License

Copyright 2020 ProfessorDveloper Library
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
 http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

AltStyle によって変換されたページ (->オリジナル) /