55The goal of this project is to make texts in TextView clickable and also translatable easily.
66
77User separates each special word with separator characters like ` "__" `
8- and then when tapping all the custom words inside the TextView The ` .setOnTextClickListener `
9- function is called with the index of the touched word. In this way, sentences can be translated into
10- other languages more easily and The locations of tactile sentences remain fixed in all languages.
8+ and then when tapping all the custom words inside the TextView The ` .setOnTextClickListener ` (InteractiveTextMaker) or
9+ ` addOnSpecialWordClickListener ` (InteractiveTextView) function is called with the index of the touched word.
10+ In this way, sentences can be translated into other languages more easily and The locations of tactile sentences
11+ remain fixed in all languages.
1112
1213Medium Article: https://medium.com/p/2b70e2072453
1314
@@ -17,7 +18,7 @@ You can copy the **InteractiveTextMaker** class or add as a dependency to your p
1718
1819Step 1. Add the JitPack repository to your build file
1920
20- ```
21+ ``` gradle
2122allprojects {
2223 repositories {
2324 ...
@@ -28,7 +29,7 @@ allprojects {
2829
2930Step 2. Add The InteractiveTextMaker Dependency
3031
31- ```
32+ ``` gradle
3233dependencies {
3334 implementation 'com.github.Alonew0lfxx:InteractiveTextMaker:1.0.3'
3435}
@@ -38,7 +39,7 @@ dependencies {
3839## NEW! InteractiveTextView
3940##### You can also see the preview of your text with your special words processed.
4041
41- ```
42+ ``` xml
4243<com .alonew0lfxx.interactivetextmaker.InteractiveTextView
4344 android : layout_width =" wrap_content"
4445 android : layout_height =" wrap_content"
@@ -54,7 +55,7 @@ dependencies {
5455
5556## Example Usage of InteractiveTextMaker
5657
57- ``` bash
58+ ``` kotlin
5859class MainActivity : AppCompatActivity () {
5960 private lateinit var binding: ActivityMainBinding
6061 override fun onCreate (savedInstanceState : Bundle ? ) {
0 commit comments