Skip to content

Commit c47d70f

Browse files
committed
update md
1 parent a284e57 commit c47d70f

File tree

4 files changed

+53
-4
lines changed

4 files changed

+53
-4
lines changed

.idea/codeStyles/Project.xml

+29
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

+16-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,22 @@ A menu style pop-up window that mimics WeChat。仿微信的长按菜单。
6060
List<String> list = new ArrayList<>();
6161
list.add("菜单1"); list.add("菜单2"); list.add("菜单3");
6262
floatMenu.items(list);
63-
64-
2.menu.xml设置
63+
64+
2.代码设置(范型继承MenuItem即可)
65+
66+
List<TestMenuItem> itemList = new ArrayList<>();
67+
TestMenuItem menuItem = new TestMenuItem();
68+
menuItem.setItem("菜单1");
69+
itemList.add(menuItem);
70+
TestMenuItem menuItem2 = new TestMenuItem();
71+
menuItem2.setItem("菜单2");
72+
itemList.add(menuItem2);
73+
TestMenuItem menuItem3 = new TestMenuItem();
74+
menuItem3.setItem("菜单2");
75+
itemList.add(menuItem3);
76+
floatMenu.items(itemList);
77+
78+
3.menu.xml设置
6579

6680
<menu xmlns:android="http://schemas.android.com/apk/res/android"
6781
xmlns:app="http://schemas.android.com/apk/res-auto">

app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ dependencies {
3434
testImplementation 'junit:junit:4.12'
3535
androidTestImplementation 'com.android.support.test:runner:1.0.1'
3636
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
37-
implementation 'com.noober.floatmenu:common:1.0.4'
38-
// implementation project(':menu')
37+
// implementation 'com.noober.floatmenu:common:1.0.4'
38+
implementation project(':menu')
3939
}

0 commit comments

Comments
 (0)