Skip to content

Commit

Permalink
Merge pull request #90 from KakaoCup/clicks-artifact-doc
Browse files Browse the repository at this point in the history
note about separate artifact
  • Loading branch information
Vacxe authored Jul 10, 2023
2 parents deae63f + 1a9f84d commit cb92b84
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions kakao-ext-clicks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,38 @@ directly to View.

## How to use

Custom clicks distributed as separate artifact:

Maven

```xml

<dependency>
<groupId>io.github.kakaocup</groupId>
<artifactId>kakao-ext-clicks</artifactId>
<version>
<latest version>
</version>
<type>pom</type>
</dependency>
```

or Gradle:

```groovy
dependencies {
androidTestImplementation 'io.github.kakaocup:kakao-ext-clicks:<latest version>'
}
```

There are multiple ways to apply custom clicks:

### Apply KakaoClicksTestRule

If you want to apply it directly to single test class the TestRule is an obvious choice.

For example:

```
@Rule
@JvmField
Expand All @@ -49,7 +74,7 @@ var chain: TestRule = RuleChain.outerRule(ActivityScenarioRule(MyActivity::class

### Override Kakao clicks behaviour

If you need to change it globally, you can override static variables of kakao, like that:
If you need to change it globally, you can override static variables of kakao, like that:

```
Kakao {
Expand Down Expand Up @@ -126,8 +151,8 @@ to apply config to all types of clicks

## Global Center coordinates

There are some cases when standard espresso coordinates not working.
For example clicking on center of the view with applied property animations or transitions with help of `GeneralLocation.VISIBLE_CENTER`.
There are some cases when standard espresso coordinates not working.
For example clicking on center of the view with applied property animations or transitions with help of `GeneralLocation.VISIBLE_CENTER`.
See explanation on why it happens [here](https://github.com/avito-tech/avito-android/pull/308).

`VisibleCenterGlobalCoordinatesProvider` to the rescue.
Expand Down

0 comments on commit cb92b84

Please sign in to comment.