Skip to content

Commit b13f411

Browse files
icon bug fix
1 parent 34a9f32 commit b13f411

File tree

5 files changed

+22
-6
lines changed

5 files changed

+22
-6
lines changed

.idea/assetWizardSettings.xml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/src/main/res/values/styles.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88
<item name="colorAccent">@color/colorAccent</item>
99
</style>
1010

11+
1112
</resources>

selectionalertdialog/src/main/java/com/drapps/selectionalertdialog/SingleSelectionDialog.java

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
package com.drapps.selectionalertdialog;
22

3+
import android.annotation.SuppressLint;
34
import android.app.Dialog;
45
import android.content.Context;
56
import android.content.res.ColorStateList;
7+
import android.content.res.TypedArray;
8+
import android.graphics.Color;
69
import android.os.Bundle;
710
import android.text.Editable;
811
import android.text.TextWatcher;
@@ -40,7 +43,6 @@ public class SingleSelectionDialog extends AppCompatActivity {
4043
private int headerColor, textColor;
4144
SingleSelectionListener singleSelectionListener;
4245

43-
4446
@Override
4547
protected void onCreate(@Nullable Bundle savedInstanceState) {
4648
super.onCreate(savedInstanceState);
@@ -216,6 +218,13 @@ public void setSelectedField(String selectedField) {
216218
currentField = selectedField;
217219
}
218220

221+
public void dismiss() {
222+
if (dialog.isShowing()) {
223+
dialog.dismiss();
224+
}
225+
}
226+
227+
219228
public String getCurrentPosition(String field) {
220229
if (list != null && list.size() > 0) {
221230

@@ -239,10 +248,12 @@ public static class Builder {
239248
private String currentField = "", currentValue = "", currentPosition = "", tag = "", hintText = "Search here";
240249
private int headerColor, textColor;
241250
SingleSelectionListener singleSelectionListener;
251+
int style;
242252

243253
public Builder(Context ctx, String tag) {
244254
this.context = ctx;
245255
this.tag = tag;
256+
246257
}
247258

248259
public Builder setContent(ArrayList<String> contentProvide) {
@@ -280,7 +291,6 @@ public Builder setListener(SingleSelectionListener listener) {
280291
return this;
281292
}
282293

283-
284294
public Builder setSelectedField(String selectedField) {
285295
currentField = selectedField;
286296
return this;
@@ -291,5 +301,4 @@ public SingleSelectionDialog build() {
291301
}
292302
}
293303

294-
295304
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<vector android:height="24dp" android:tint="#FFFFFF"
2+
android:viewportHeight="24.0" android:viewportWidth="24.0"
3+
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
4+
<path android:fillColor="#FF000000" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM10,17l-5,-5 1.41,-1.41L10,14.17l7.59,-7.59L19,8l-9,9z"/>
5+
</vector>

selectionalertdialog/src/main/res/layout/single_selection_dialog.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
33
android:layout_width="match_parent"
4-
android:layout_height="match_parent">
4+
android:layout_height="match_parent"
5+
android:minHeight="150dp">
56

67
<LinearLayout
78
android:id="@+id/linear_single_dialog"

0 commit comments

Comments
 (0)