Skip to content

Commit a1275fc

Browse files
Bug fixes related to menu divider.
1 parent a0a7af6 commit a1275fc

5 files changed

Lines changed: 44 additions & 19 deletions

File tree

BottomSheetMenu/build.gradle

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
plugins {
22
id 'com.android.library'
3-
id 'maven-publish'
43
}
54

65
android {
@@ -28,24 +27,11 @@ android {
2827

2928
dependencies {
3029

31-
implementation 'androidx.appcompat:appcompat:1.5.0'
30+
implementation 'androidx.appcompat:appcompat:1.5.1'
3231
implementation 'com.google.android.material:material:1.6.1'
3332
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
3433

3534
testImplementation 'junit:junit:4.13.2'
3635
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
3736
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
38-
}
39-
40-
afterEvaluate {
41-
publishing {
42-
publications {
43-
release(MavenPublication) {
44-
from components.release
45-
groupId = 'com.buggysofts'
46-
artifactId = 'bottomsheetmenu'
47-
version = '1.0.3'
48-
}
49-
}
50-
}
5137
}

BottomSheetMenu/src/main/java/com/buggysofts/bottomsheetmenu/BottomSheetMenu.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ public BottomSheetMenu(@NonNull Context context,
159159
headerViewSelector,
160160
footerViewSelector,
161161
menuTitle,
162-
dividerDrawable,
163162
menuIconPlaceHolder,
164163
menuExpandIcon,
164+
dividerDrawable,
165165
menuBackground,
166166
textColor,
167167
menuItemIconTint,

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Finally, add this dependency to your app/module level build.gradle file
3434
3535
dependencies {
3636
...
37-
implementation 'com.github.buggysofts-com:BottomSheetMenu:v1.0.4'
37+
implementation 'com.github.buggysofts-com:BottomSheetMenu:v1.0.5'
3838
}
3939
```
4040
And you are done importing the library.

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ android {
1010
minSdk 21
1111
targetSdk 32
1212
versionCode 4
13-
versionName "1.0.3"
13+
versionName "1.0.5"
1414

1515
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1616
}
@@ -29,7 +29,7 @@ android {
2929

3030
dependencies {
3131

32-
implementation 'androidx.appcompat:appcompat:1.5.0'
32+
implementation 'androidx.appcompat:appcompat:1.5.1'
3333
implementation 'com.google.android.material:material:1.6.1'
3434
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
3535

app/src/main/java/com/buggysofts/bottomsheetmenuimpl/MainActivity.java

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,45 @@ private void initialize() {
3535
new View.OnClickListener() {
3636
@Override
3737
public void onClick(View v) {
38+
showBuilderBasedMenu();
39+
}
40+
private void showFullConstructorBasedMenu(){
41+
try {
42+
new BottomSheetMenu(
43+
MainActivity.this,
44+
R.menu.data_package_restore_options_menu,
45+
new BottomSheetMenu.ViewSelector() {
46+
@Nullable
47+
@org.jetbrains.annotations.Nullable
48+
@Override
49+
public View getInitialView() {
50+
return null;
51+
}
52+
53+
@Nullable
54+
@org.jetbrains.annotations.Nullable
55+
@Override
56+
public View selectViewForItem(MenuItem item) {
57+
return null;
58+
}
59+
},
60+
null,
61+
"Installed app context menu",
62+
null, null,
63+
BottomSheetMenu.getSystemDefaultDivider(MainActivity.this),
64+
null, null, null, null,
65+
new BottomSheetMenu.MenuItemClickListener() {
66+
@Override
67+
public void onClick(MenuItem item) {
68+
69+
}
70+
}
71+
).show();
72+
} catch (Exception e) {
73+
e.printStackTrace();
74+
}
75+
}
76+
private void showBuilderBasedMenu(){
3877
try {
3978
new BottomSheetMenu(
4079
MainActivity.this,

0 commit comments

Comments
 (0)