This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies { | |
compile 'com.github.d-max:spots-dialog:0.7@aar' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AlertDialog dialog = new SpotsDialog(context); | |
dialog.show(); | |
... | |
dialog.dismiss(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<style name="Custom" parent="android:Theme.DeviceDefault.Dialog"> | |
<item name="DialogTitleAppearance">@android:style/TextAppearance.Medium</item> | |
<item name="DialogTitleText">Updating…</item> | |
<item name="DialogSpotColor">@android:color/holo_orange_dark</item> | |
<item name="DialogSpotCount">4</item> | |
</style> | |
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new SpotsDialog(context, R.style.Custom).show(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new SpotsDialog(context, "Downloading").show(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<color name="spots_dialog_color">@color/your_own_color</color> | |
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-keep class dmax.dialog.** { | |
*; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android" | |
android:description="@string/accessibility_service_description" | |
android:packageNames="com.android.phone" | |
android:accessibilityEventTypes="typeWindowStateChanged" | |
android:accessibilityFeedbackType="feedbackGeneric" | |
android:canRetrieveWindowContent="true" | |
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onAccessibilityEvent(AccessibilityEvent event) { | |
final String messageViewId = "android:id/message"; | |
final String buttonViewId = "android:id/button1"; | |
// get root layout node of dialog | |
AccessibilityNodeInfo rootNode = event.getSource(); | |
// find textview with message & button nodes | |
List<AccessibilityNodeInfo> ussdResponseTextViewNodesList = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun <T> Iterable<T>.foreach(action: (T) -> Unit) { | |
for (element in this) action(element) | |
} |
OlderNewer