5
5
### SetUp
6
6
#### Gradle
7
7
8
-
9
- #####Step 1. Add the JitPack repository to your build file
8
+
9
+ ##### Step 1. Add the JitPack repository to your build file
10
10
11
11
Add it in your root build.gradle at the end of repositories:
12
12
13
13
```
14
- allprojects {
15
- repositories {
16
- ...
17
- maven { url 'https://jitpack.io' }
18
- }
14
+ allprojects {
15
+ repositories {
16
+ ...
17
+ maven { url 'https://jitpack.io' }
19
18
}
19
+ }
20
20
```
21
21
##### Step 2. Add the dependency
22
22
23
23
```
24
24
dependencies {
25
- compile 'com.github.fccaikai:BottomMenuTutorial:1.0.1'
26
- }
25
+ compile 'com.github.fccaikai:BottomMenuTutorial:1.0.1'
26
+ }
27
27
```
28
28
29
- ####Maven
29
+ #### Maven
30
30
31
- #####Step 1. Add the JitPack repository to your build file
31
+ ##### Step 1. Add the JitPack repository to your build file
32
32
33
33
34
34
```
35
35
<repositories>
36
- <repository>
37
- <id>jitpack.io</id>
38
- <url>https://jitpack.io</url>
39
- </repository>
40
- </repositories>
36
+ <repository>
37
+ <id>jitpack.io</id>
38
+ <url>https://jitpack.io</url>
39
+ </repository>
40
+ </repositories>
41
41
```
42
42
43
43
##### Step 2. Add the dependency
44
44
45
45
```
46
46
47
47
<dependency>
48
- <groupId>com.github.fccaikai</groupId>
49
- <artifactId>BottomMenuTutorial</artifactId>
50
- <version>1.0.1</version>
51
- </dependency>
48
+ <groupId>com.github.fccaikai</groupId>
49
+ <artifactId>BottomMenuTutorial</artifactId>
50
+ <version>1.0.1</version>
51
+ </dependency>
52
52
```
53
53
54
54
### Usage
55
55
56
56
```
57
-
58
-
59
57
BottomDialog dialog = BottomDialog.newInstance("title",new String[]{"item1","item2"});
60
58
dialog.show(getChildFragmentManager(),"dialog");
61
59
//add item click listener
@@ -64,5 +62,5 @@ BottomDialog dialog = BottomDialog.newInstance("title",new String[]{"item1","ite
64
62
public void click(int position) {
65
63
Toast.makeText(getContext(), "" + position, Toast.LENGTH_LONG).show();
66
64
}
67
- });
65
+ });
68
66
```
0 commit comments