Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is there no way to hide cancel button ? #4

Closed
IanLaFlair opened this issue Sep 6, 2022 · 3 comments
Closed

is there no way to hide cancel button ? #4

IanLaFlair opened this issue Sep 6, 2022 · 3 comments

Comments

@IanLaFlair
Copy link

No description provided.

iamageo added a commit that referenced this issue Sep 6, 2022
@iamageo
Copy link
Owner

iamageo commented Sep 6, 2022

Hi @IanLaFlair, thanks for your problem! ❤

I updated the library to support your problem, now you can call .hideNegativeButton(hide = true)
you must use version 1.0.2

//Simple example
  BeautifulDialog.build(this)
      .title("Title success", titleColor = R.color.black)
      .body("Description success", color = R.color.black)
      .type(type = BeautifulDialog.TYPE.SUCCESS)
      .position(BeautifulDialog.POSITIONS.CENTER)
      .onPositive("Confirm") {
          Toast.makeText(this, "confirm", Toast.LENGTH_SHORT).show()
      }
      .onNegative("Cancel") {
          Toast.makeText(this, "cancel", Toast.LENGTH_SHORT).show()
      }
      .hideNegativeButton(hide = true)

will have the following result

image

@iamageo iamageo pinned this issue Sep 6, 2022
@iamageo iamageo closed this as completed Sep 6, 2022
@IanLaFlair
Copy link
Author

sorry, if i upgrade to 1.0.2, beautifuldialog turn into unresolved reference

@iamageo
Copy link
Owner

iamageo commented Sep 12, 2022

try this, I removed the release prefix:

implementation 'com.github.iamageo:beautiful-dialog:1.0.2'

see on Jitpack: https://jitpack.io/#iamageo/beautiful-dialog/1.0.2

@iamageo iamageo reopened this Sep 12, 2022
@iamageo iamageo closed this as completed Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants