### Display Bottom Dialog with an Icon Source: https://github.com/javiersantos/bottomdialogs/blob/master/README.md Illustrates how to add an icon to the BottomDialog, which appears to the left of the title. It shows examples using both resource ID and ContextCompat.getDrawable. ```Java new BottomDialog.Builder(this) .setTitle("Awesome!") .setContent("What can we improve? Your feedback is always welcome.") .setIcon(R.drawable.ic_launcher) //.setIcon(ContextCompat.getDrawable(this, R.drawable.ic_launcher)) .show(); ``` -------------------------------- ### Display a Basic Bottom Dialog Source: https://github.com/javiersantos/bottomdialogs/blob/master/README.md Demonstrates two common ways to create and display a basic BottomDialog: directly showing it after building, or building it first and then calling show() separately. This allows for setting a title and content. ```Java new BottomDialog.Builder(this) .setTitle("Awesome!") .setContent("What can we improve? Your feedback is always welcome.") .show(); ``` ```Java BottomDialog bottomDialog = new BottomDialog.Builder(this) .setTitle("Awesome!") .setContent("What can we improve? Your feedback is always welcome.") .build(); ... bottomDialog.show(); ``` -------------------------------- ### Include Jitpack Repository in Project build.gradle Source: https://github.com/javiersantos/bottomdialogs/blob/master/README.md Instructions to add the Jitpack Maven repository to your project's top-level build.gradle file, which is necessary to resolve the BottomDialogs library dependency. ```Gradle repositories { maven { url "https://jitpack.io" } } ``` -------------------------------- ### Add BottomDialogs Library Dependency to Module build.gradle Source: https://github.com/javiersantos/bottomdialogs/blob/master/README.md Instructions to add the BottomDialogs library as a compile dependency in your module's build.gradle file, making it available for use in your Android application. ```Gradle dependencies { compile 'com.github.javiersantos:BottomDialogs:1.2.1' } ``` -------------------------------- ### Add Positive Button with Custom Styling and Callback Source: https://github.com/javiersantos/bottomdialogs/blob/master/README.md Demonstrates how to add a positive button to the BottomDialog, customize its text and background/text colors, and define an action to be performed via a ButtonCallback when the button is clicked. ```Java new BottomDialog.Builder(this) .setTitle("Awesome!") .setContent("What can we improve? Your feedback is always welcome.") .setPositiveText("OK") .setPositiveBackgroundColorResource(R.color.colorPrimary) //.setPositiveBackgroundColor(ContextCompat.getColor(this, R.color.colorPrimary) .setPositiveTextColorResource(android.R.color.white) //.setPositiveTextColor(ContextCompat.getColor(this, android.R.color.colorPrimary) .onPositive(new BottomDialog.ButtonCallback() { @Override public void onClick(BottomDialog dialog) { Log.d("BottomDialogs", "Do something!"); } }).show(); ``` -------------------------------- ### Add Negative Button with Custom Styling and Callback Source: https://github.com/javiersantos/bottomdialogs/blob/master/README.md Demonstrates how to add a negative button to the BottomDialog, customize its text and color, and define an action to be performed via a ButtonCallback when the button is clicked. ```Java new BottomDialog.Builder(this) .setTitle("Awesome!") .setContent("What can we improve? Your feedback is always welcome.") .setNegativeText("Exit") .setNegativeTextColorResource(R.color.colorAccent) //.setNegativeTextColor(ContextCompat.getColor(this, R.color.colorAccent) .onNegative(new BottomDialog.ButtonCallback() { @Override public void onClick(BottomDialog dialog) { Log.d("BottomDialogs", "Do something!"); } }).show(); ``` -------------------------------- ### Add a Custom View to Bottom Dialog Source: https://github.com/javiersantos/bottomdialogs/blob/master/README.md Shows how to integrate a custom layout into the BottomDialog using the setCustomView() method, allowing for highly customized dialog content. ```Java new BottomDialog.Builder(this) .setTitle("Awesome!") .setContent("What can we improve? Your feedback is always welcome.") .setCustomView(R.layout.my_custom_view) .show(); ``` -------------------------------- ### Control Bottom Dialog Dismissal on Outside Touch Source: https://github.com/javiersantos/bottomdialogs/blob/master/README.md Explains how to use the setCancelable() method to control whether the BottomDialog can be dismissed by tapping outside its window. Setting it to false prevents dismissal on outside touch. ```Java new BottomDialog.Builder(this) .setTitle("Awesome!") .setContent("What can we improve? Your feedback is always welcome.") .setCancelable(false) .show(); ``` -------------------------------- ### Customize BottomDialog Text Color and Font in Java Source: https://github.com/javiersantos/bottomdialogs/blob/master/README.md This snippet demonstrates how to apply custom colors and fonts to the title text view of a BottomDialog instance. It shows how to access the title text view using `getTitleTextView()` and then apply a custom color using `setTextColor()` and a custom font using `setTypeface()` before displaying the dialog. ```Java BottomDialog bottomDialog = BottomDialog.Builder(this) ... .build(); bottomDialog.getTitleTextView().setTextColor(Color.parseColor("#8f000000")); bottomDialog.getTitleTextView().setTypeface(BaseActivity.getFont(Fonts.SEMI_BOLD)); bottomDialog.show(); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.