Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0c870d5

Browse files
authoredDec 23, 2022
Update snippets.md
1 parent 3a8f3a0 commit 0c870d5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎docs/snippets.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Starting From version 1.1.1 CodeView now have support for snippts.
44

55
In the CodeView library keywords and snippets are classes that implementing the Code interface.
66

7-
```
7+
``` java
88
public interface Code {
99
String getCodeTitle();
1010
String getCodePrefix();
@@ -22,17 +22,17 @@ This class has three attributes title, prefix and body, It’s important to know
2222

2323
Add Custom AutoComplete Adapter that support Snippets
2424

25-
```
25+
``` java
2626
List<Code> codes = new ArrayList<>();
2727
codes.add(new Snippet(..., ..., ...));
2828

2929
// Your language keywords
3030
String[] languageKeywords = .....
3131
// List item custom layout
3232
int layoutId = .....
33-
// TextView id on your custom layout to put suggestion on it
33+
// TextView id on your custom layout to put suggestion on it R.layout.yourlayout
3434
int viewId = .....
3535

3636
CodeViewAdapter codeAdapter = new CodeViewAdapter(context, layoutId, viewId, codes);
3737
codeView.setAdapter(codeAdapter);
38-
```
38+
```

0 commit comments

Comments
 (0)
Please sign in to comment.