Skip to content

Commit 0ccb10d

Browse files
authored
Merge pull request #21 from gzeinnumer/dev-1
Dev 1
2 parents 28d7de6 + 14d44ba commit 0ccb10d

8 files changed

Lines changed: 46 additions & 43 deletions

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</h1>
77

88
<div align="center">
9-
<a><img src="https://img.shields.io/badge/Version-2.0.4-brightgreen.svg?style=flat"></a>
9+
<a><img src="https://img.shields.io/badge/Version-2.0.5-brightgreen.svg?style=flat"></a>
1010
<a><img src="https://img.shields.io/badge/ID-gzeinnumer-blue.svg?style=flat"></a>
1111
<a><img src="https://img.shields.io/badge/Java-Suport-green?logo=java&style=flat"></a>
1212
<a><img src="https://img.shields.io/badge/Koltin-Suport-green?logo=kotlin&style=flat"></a>
@@ -263,6 +263,8 @@ You can Customize your dialog UI. [**ReadMore**](https://github.com/gzeinnumer/M
263263
- First Release
264264
- **2.0.4**
265265
- Add animation and set custom animation show
266+
- **2.0.5**
267+
- Bug Style
266268

267269
---
268270

app/src/main/java/com/gzeinnumer/mylibsearchviewdialog/MainActivity.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
package com.gzeinnumer.mylibsearchviewdialog;
22

3-
import androidx.appcompat.app.AppCompatActivity;
4-
53
import android.os.Bundle;
64
import android.view.Gravity;
75
import android.view.View;
86
import android.widget.Button;
97
import android.widget.TextView;
108
import android.widget.Toast;
119

10+
import androidx.appcompat.app.AppCompatActivity;
11+
1212
import com.gzeinnumer.mylibsearchviewdialog.constant.ButtonStyle;
1313
import com.gzeinnumer.mylibsearchviewdialog.dialog.searchViewDialog.SearchViewDialogOldOld;
1414
import com.gzeinnumer.mylibsearchviewdialog.dialog.searchViewDialogNew.SearchViewDialog;
@@ -304,7 +304,7 @@ private void initDialogSingleGZeinNumer() {
304304
.onOkPressedCallBackSingle(new SearchViewDialog.OnOkPressedSingle<String>() {
305305
@Override
306306
public void onOkSingle(String data) {
307-
String temp = "Single Select : \n"+data.toString();
307+
String temp = "Single Select : \n" + data;
308308
tv.setText(temp);
309309
}
310310
})
@@ -338,7 +338,7 @@ private void initDialogSingleGZeinNumer2() {
338338
listObject.add(new ExampleModel(4, "Zein4", "Balbar4"));
339339

340340
new SearchViewDialog<ExampleModel>(getSupportFragmentManager())
341-
.setAnimationStyle(R.style.DialogStyle_In)
341+
.setAnimationStyle(R.style.LibSearchViewDialog_DialogStyle_In)
342342
.setItems(listObject)
343343
.setTitle("ini title")
344344
.setContent("ini content")

lib/src/main/java/com/gzeinnumer/mylibsearchviewdialog/dialog/BaseDialog.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public abstract class BaseDialog extends DialogFragment {
2727
protected double canvasWidth = 0.9;
2828
protected boolean isFullScreen = false;
2929

30-
protected int animationStyle = R.style.DialogStyle_Slide;
30+
protected int animationStyle = R.style.LibSearchViewDialog_DialogStyle_Slide;
3131

3232
@Override
3333
public void onActivityCreated(@Nullable Bundle savedInstanceState) {

lib/src/main/res/layout/item_rv_single.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<CheckedTextView
99
android:id="@+id/checked_text_item"
10-
style="@style/MyTextContent"
10+
style="@style/LibSearchViewDialog_MyTextContent"
1111
android:layout_width="match_parent"
1212
android:checkMark="?android:attr/listChoiceIndicatorSingle"
1313
android:checkMarkTint="@color/colorPrimary"
@@ -19,7 +19,7 @@
1919

2020
<View
2121
android:id="@+id/divider"
22-
style="@style/MyDivider"
22+
style="@style/LibSearchViewDialog_MyDivider"
2323
android:layout_marginTop="0dp" />
2424

2525
</LinearLayout>

lib/src/main/res/layout/select_dialog.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
<TextView
2020
android:id="@+id/tv_title"
21-
style="@style/MyTextHeader"
21+
style="@style/LibSearchViewDialog_MyTextHeader"
2222
android:layout_width="match_parent"
2323
android:layout_marginTop="0dp"
2424
android:layout_marginBottom="10dp"
@@ -27,7 +27,7 @@
2727

2828
<TextView
2929
android:id="@+id/tv_content"
30-
style="@style/MyTextContent"
30+
style="@style/LibSearchViewDialog_MyTextContent"
3131
android:layout_width="match_parent"
3232
android:layout_marginTop="0dp"
3333
android:layout_marginBottom="@dimen/text_margin"
@@ -36,7 +36,7 @@
3636

3737
<com.google.android.material.textfield.TextInputLayout
3838
android:id="@+id/parent_ed_search"
39-
style="@style/MyTextInputLayoutOutlinedBox"
39+
style="@style/LibSearchViewDialog_MyTextInputLayoutOutlinedBox"
4040
android:layout_width="match_parent"
4141
android:layout_marginTop="0dp"
4242
android:layout_marginBottom="10dp"
@@ -45,7 +45,7 @@
4545

4646
<com.google.android.material.textfield.TextInputEditText
4747
android:id="@+id/ed_search"
48-
style="@style/MyTextInputEditText" />
48+
style="@style/LibSearchViewDialog_MyTextInputEditText" />
4949

5050
</com.google.android.material.textfield.TextInputLayout>
5151

@@ -66,42 +66,42 @@
6666

6767
<Button
6868
android:id="@+id/d_btn_cancel_MBT"
69-
style="@style/MyButtonText"
69+
style="@style/LibSearchViewDialog_MyButtonText"
7070
android:layout_marginEnd="@dimen/def_margin"
7171
android:text="@string/cancel"
7272
android:visibility="gone"
7373
tools:visibility="visible" />
7474

7575
<Button
7676
android:id="@+id/d_btn_ok_MBT"
77-
style="@style/MyButtonText"
77+
style="@style/LibSearchViewDialog_MyButtonText"
7878
android:text="@string/ok"
7979
android:visibility="gone"
8080
tools:visibility="visible" />
8181

8282
<Button
8383
android:id="@+id/d_btn_cancel_MBO"
84-
style="@style/MyButtonOutlined"
84+
style="@style/LibSearchViewDialog_MyButtonOutlined"
8585
android:layout_marginEnd="@dimen/def_margin"
8686
android:text="@string/cancel"
8787
android:visibility="gone" />
8888

8989
<Button
9090
android:id="@+id/d_btn_ok_MBO"
91-
style="@style/MyButtonOutlined"
91+
style="@style/LibSearchViewDialog_MyButtonOutlined"
9292
android:text="@string/ok"
9393
android:visibility="gone" />
9494

9595
<Button
9696
android:id="@+id/d_btn_cancel_MBC"
97-
style="@style/MyButtonContained"
97+
style="@style/LibSearchViewDialog_MyButtonContained"
9898
android:layout_marginEnd="@dimen/def_margin"
9999
android:text="@string/cancel"
100100
android:visibility="gone" />
101101

102102
<Button
103103
android:id="@+id/d_btn_ok_MBC"
104-
style="@style/MyButtonContained"
104+
style="@style/LibSearchViewDialog_MyButtonContained"
105105
android:text="@string/ok"
106106
android:visibility="gone" />
107107

lib/src/main/res/layout/select_dialog_fullscreen.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
<TextView
2121
android:id="@+id/tv_title"
22-
style="@style/MyTextHeader"
22+
style="@style/LibSearchViewDialog_MyTextHeader"
2323
android:layout_width="match_parent"
2424
android:layout_marginTop="0dp"
2525
android:layout_marginBottom="10dp"
@@ -28,15 +28,15 @@
2828

2929
<TextView
3030
android:id="@+id/tv_content"
31-
style="@style/MyTextContent"
31+
style="@style/LibSearchViewDialog_MyTextContent"
3232
android:layout_width="match_parent"
3333
android:layout_marginTop="0dp"
3434
android:layout_marginBottom="@dimen/text_margin"
3535
android:text="@string/content_dialog" />
3636

3737
<com.google.android.material.textfield.TextInputLayout
3838
android:id="@+id/parent_ed_search"
39-
style="@style/MyTextInputLayoutOutlinedBox"
39+
style="@style/LibSearchViewDialog_MyTextInputLayoutOutlinedBox"
4040
android:layout_width="match_parent"
4141
android:layout_marginTop="0dp"
4242
android:layout_marginBottom="10dp"
@@ -45,7 +45,7 @@
4545

4646
<com.google.android.material.textfield.TextInputEditText
4747
android:id="@+id/ed_search"
48-
style="@style/MyTextInputEditText" />
48+
style="@style/LibSearchViewDialog_MyTextInputEditText" />
4949

5050
</com.google.android.material.textfield.TextInputLayout>
5151

@@ -67,42 +67,42 @@
6767

6868
<Button
6969
android:id="@+id/d_btn_cancel_MBT"
70-
style="@style/MyButtonText"
70+
style="@style/LibSearchViewDialog_MyButtonText"
7171
android:layout_marginEnd="@dimen/def_margin"
7272
android:text="@string/cancel"
7373
android:visibility="gone"
7474
tools:visibility="visible" />
7575

7676
<Button
7777
android:id="@+id/d_btn_ok_MBT"
78-
style="@style/MyButtonText"
78+
style="@style/LibSearchViewDialog_MyButtonText"
7979
android:text="@string/ok"
8080
android:visibility="gone"
8181
tools:visibility="visible" />
8282

8383
<Button
8484
android:id="@+id/d_btn_cancel_MBO"
85-
style="@style/MyButtonOutlined"
85+
style="@style/LibSearchViewDialog_MyButtonOutlined"
8686
android:layout_marginEnd="@dimen/def_margin"
8787
android:text="@string/cancel"
8888
android:visibility="gone" />
8989

9090
<Button
9191
android:id="@+id/d_btn_ok_MBO"
92-
style="@style/MyButtonOutlined"
92+
style="@style/LibSearchViewDialog_MyButtonOutlined"
9393
android:text="@string/ok"
9494
android:visibility="gone" />
9595

9696
<Button
9797
android:id="@+id/d_btn_cancel_MBC"
98-
style="@style/MyButtonContained"
98+
style="@style/LibSearchViewDialog_MyButtonContained"
9999
android:layout_marginEnd="@dimen/def_margin"
100100
android:text="@string/cancel"
101101
android:visibility="gone" />
102102

103103
<Button
104104
android:id="@+id/d_btn_ok_MBC"
105-
style="@style/MyButtonContained"
105+
style="@style/LibSearchViewDialog_MyButtonContained"
106106
android:text="@string/ok"
107107
android:visibility="gone" />
108108

lib/src/main/res/values/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<resources>
2-
<string name="app_name">MyLibDialog</string>
2+
<string name="app_name">MyLibSearchViewDialog</string>
33
<!-- TODO: Remove or change this placeholder text -->
44
<string name="hello_blank_fragment">Hello blank fragment</string>
55
<string name="title_dialog">Title</string>

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

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,46 @@
11
<resources>
22
<!-- Base application theme. -->
3-
<style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
3+
<style name="LibSearchViewDialog_AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
44
<!-- Customize your theme here. -->
55
<item name="colorPrimary">@color/colorPrimary</item>
66
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
77
<item name="colorAccent">@color/colorAccent</item>
88
</style>
99

10-
<style name="AppTheme2" parent="ThemeOverlay.MaterialComponents.MaterialCalendar">
10+
<style name="LibSearchViewDialog_AppTheme2" parent="ThemeOverlay.MaterialComponents.MaterialCalendar">
1111
<!-- Customize your theme here. -->
1212
<item name="colorPrimary">@color/green_600</item>
1313
<item name="colorPrimaryDark">@color/deep_orange_700</item>
1414
<item name="colorAccent">@color/lime_A100</item>
1515
</style>
16-
<style name="DialogStyle" parent="Theme.MaterialComponents.Light.Dialog">
16+
17+
<style name="LibSearchViewDialog_DialogStyle" parent="Theme.MaterialComponents.Light.Dialog">
1718
<item name="android:windowMinWidthMajor">80%</item>
1819
<item name="android:windowMinWidthMinor">80%</item>
1920
</style>
2021

21-
<style name="DialogStyle_In" parent="Theme.MaterialComponents.Light.Dialog">
22+
<style name="LibSearchViewDialog_DialogStyle_In" parent="Theme.MaterialComponents.Light.Dialog">
2223
<item name="android:windowMinWidthMajor">80%</item>
2324
<item name="android:windowMinWidthMinor">80%</item>
2425
<item name="android:windowEnterAnimation">@anim/anim_in</item>
2526
<item name="android:windowExitAnimation">@anim/anim_out</item>
2627
</style>
2728

28-
<style name="DialogStyle_Slide" parent="Theme.MaterialComponents.Light.Dialog">
29+
<style name="LibSearchViewDialog_DialogStyle_Slide" parent="Theme.MaterialComponents.Light.Dialog">
2930
<item name="android:windowMinWidthMajor">80%</item>
3031
<item name="android:windowMinWidthMinor">80%</item>
3132
<item name="android:windowEnterAnimation">@anim/slide_up</item>
3233
<item name="android:windowExitAnimation">@anim/slide_down</item>
3334
</style>
3435

35-
<style name="MyDivider">
36+
<style name="LibSearchViewDialog_MyDivider">
3637
<item name="android:layout_width">match_parent</item>
3738
<item name="android:layout_height">1dp</item>
3839
<item name="android:layout_marginTop">@dimen/text_margin</item>
3940
<item name="android:background">@color/divider</item>
4041
</style>
4142

42-
<style name="MyTextHeader">
43+
<style name="LibSearchViewDialog_MyTextHeader">
4344
<item name="android:layout_width">wrap_content</item>
4445
<item name="android:layout_height">wrap_content</item>
4546
<item name="android:alpha">1</item>
@@ -49,42 +50,42 @@
4950
<item name="android:layout_marginTop">@dimen/text_margin</item>
5051
</style>
5152

52-
<style name="MyTextContent">
53+
<style name="LibSearchViewDialog_MyTextContent">
5354
<item name="android:layout_width">wrap_content</item>
5455
<item name="android:layout_height">wrap_content</item>
5556
<item name="android:alpha">1</item>
5657
<item name="android:textColor">@color/text_content</item>
5758
<item name="android:textSize">@dimen/h3</item>
5859
</style>
5960

60-
<style name="MyButtonText" parent="Widget.MaterialComponents.Button.TextButton">
61+
<style name="LibSearchViewDialog_MyButtonText" parent="Widget.MaterialComponents.Button.TextButton">
6162
<item name="android:layout_height">@dimen/button_height</item>
6263
<item name="android:layout_width">wrap_content</item>
6364
<item name="android:textColor">@color/colorPrimary</item>
6465
</style>
6566

66-
<style name="MyButtonOutlined" parent="Widget.MaterialComponents.Button.OutlinedButton">
67+
<style name="LibSearchViewDialog_MyButtonOutlined" parent="Widget.MaterialComponents.Button.OutlinedButton">
6768
<item name="android:layout_height">@dimen/button_height</item>
6869
<item name="android:layout_width">wrap_content</item>
6970
</style>
7071

71-
<style name="MyButtonContained">
72+
<style name="LibSearchViewDialog_MyButtonContained">
7273
<item name="android:layout_height">@dimen/button_height</item>
7374
<item name="android:layout_width">wrap_content</item>
7475
</style>
7576

76-
<style name="MyButtonIcon" parent="Widget.MaterialComponents.Button.Icon">
77+
<style name="LibSearchViewDialog_MyButtonIcon" parent="Widget.MaterialComponents.Button.Icon">
7778
<item name="android:layout_height">@dimen/button_height</item>
7879
<item name="android:layout_width">wrap_content</item>
7980
</style>
8081

81-
<style name="MyTextInputLayoutOutlinedBox" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox">
82+
<style name="LibSearchViewDialog_MyTextInputLayoutOutlinedBox" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox">
8283
<item name="android:layout_width">match_parent</item>
8384
<item name="android:layout_height">wrap_content</item>
8485
<item name="android:layout_marginTop">@dimen/space_between_edittext</item>
8586
</style>
8687

87-
<style name="MyTextInputEditText">
88+
<style name="LibSearchViewDialog_MyTextInputEditText">
8889
<item name="android:layout_width">match_parent</item>
8990
<item name="android:layout_height">wrap_content</item>
9091
<item name="android:alpha">1</item>

0 commit comments

Comments
 (0)