Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

Commit

Permalink
Merge pull request #7 from florent37/develop
Browse files Browse the repository at this point in the history
v1.0.1
  • Loading branch information
florent37 authored Feb 23, 2017
2 parents cab15bb + b65802b commit 3525c1e
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 16 deletions.
31 changes: 25 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ new ExpectAnim()

.expect(bottomLayout)
.toBe(
atHisOriginalPosition()
atItsOriginalPosition()
)

.expect(content)
.toBe(
atHisOriginalPosition(),
atItsOriginalPosition(),
visible()
)

Expand Down Expand Up @@ -140,6 +140,14 @@ new ExpectAnim()
.setNow();
```

## Reset

Use `reset` to return to the initial state of views

```java
expectAnim.reset():
```

# List of expectations

```
Expand All @@ -156,7 +164,7 @@ new ExpectAnim()
belowOf(view)
aboveOf(view)
atHisOriginalPosition()
atItsOriginalPosition()
sameCenterAs(view, horizontal, vertical)
Expand Down Expand Up @@ -189,7 +197,7 @@ new ExpectAnim()
//.keepRatio()
//.withGravity(horizontalGravity, verticalGravity)
atHisOriginalScale()
atItsOriginalScale()
scale(scaleX, scaleY)
height(height)
Expand All @@ -202,11 +210,22 @@ new ExpectAnim()
toHaveTextColor(textColor)
toHaveBackgroundAlpha(alpha)
rotated(rotation)
vertical(bottomOfViewAtLeft)
atItsOriginalRotation()
)
```
````
# Changelog
##1.0.1
Added `rotations`
[![gif](https://raw.githubusercontent.com/florent37/ExpectAnim/master/media/rotations.gif)](https://github.com/florent37/ExpectAnim)
#Credits
# Credits
Author: Florent Champigny
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@
import static com.github.florent37.expectanim.core.Expectations.alignTop;
import static com.github.florent37.expectanim.core.Expectations.belowOf;
import static com.github.florent37.expectanim.core.Expectations.leftOfParent;
import static com.github.florent37.expectanim.core.Expectations.toLeftOf;
import static com.github.florent37.expectanim.core.Expectations.toRightOf;
import static com.github.florent37.expectanim.core.Expectations.topOfParent;
import static com.github.florent37.expectanim.core.Expectations.withRotation;
import static com.github.florent37.expectanim.core.Expectations.rotated;

public class RotationActivity extends AppCompatActivity {

Expand All @@ -44,7 +43,7 @@ protected void onCreate(Bundle savedInstanceState) {
.toBe(
topOfParent(),
leftOfParent(),
withRotation(90)
rotated(90)
)

.expect(text2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import butterknife.OnClick;

import static com.github.florent37.expectanim.core.Expectations.aboveOf;
import static com.github.florent37.expectanim.core.Expectations.atHisOriginalPosition;
import static com.github.florent37.expectanim.core.Expectations.atItsOriginalPosition;
import static com.github.florent37.expectanim.core.Expectations.bottomOfParent;
import static com.github.florent37.expectanim.core.Expectations.invisible;
import static com.github.florent37.expectanim.core.Expectations.leftOfParent;
Expand Down Expand Up @@ -105,12 +105,12 @@ protected void onCreate(Bundle savedInstanceState) {

.expect(bottomLayout)
.toBe(
atHisOriginalPosition()
atItsOriginalPosition()
)

.expect(content)
.toBe(
atHisOriginalPosition(),
atItsOriginalPosition(),
visible()
)

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ ext {
sdk = 24
buildTools = "24.0.2"
minSdk = 14
libraryVersion = "1.0.0"
libraryVersion = "1.0.1"
supportVersion = "24.0.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public static PositionAnimExpectation aboveOf(View view) {
return new PositionAnimExpectationAboveOf(view);
}

public static PositionAnimExpectation atHisOriginalPosition() {
public static PositionAnimExpectation atItsOriginalPosition() {
return new PositionAnimExpectationOriginal();
}

Expand Down Expand Up @@ -171,7 +171,7 @@ public static AlphaAnimExpectation invisible() {
public @interface GravityScaleHorizontalIntDef {
}

public static ScaleAnimExpectation atHisOriginalScale() {
public static ScaleAnimExpectation atItsOriginalScale() {
return new ScaleAnimExpectationOriginalScale();
}

Expand Down Expand Up @@ -228,7 +228,7 @@ public static CustomAnimExpectation toHaveBackgroundAlpha(float alpha) {

//region rotation

public static RotationExpectation withRotation(float rotation) {
public static RotationExpectation rotated(float rotation) {
return new RotationExpectationValue(rotation);
}

Expand All @@ -240,6 +240,10 @@ public static RotationExpectation vertical(boolean bottomOfViewAtLeft) {
}
}

public static RotationExpectation atItsOriginalRotation() {
return new RotationExpectationValue(0);
}

//endregion

}
Binary file added media/rotations.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/rotations.mp4
Binary file not shown.

0 comments on commit 3525c1e

Please sign in to comment.