Skip to content

Commit

Permalink
v1.1.0 beta
Browse files Browse the repository at this point in the history
  • Loading branch information
davideas committed Nov 3, 2015
1 parent 87ce499 commit 8a3978a
Show file tree
Hide file tree
Showing 14 changed files with 309 additions and 171 deletions.
21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Flip View

###### Gmail like View & beyond - Master branch: v1 of 2015.11.01
###### Gmail like View & beyond - Master branch: v1.1 of 2015.11.03

#### Concept
FlipView is a ViewGroup (FrameLayout) that is designed to display 2 views/layouts by flipping
Expand All @@ -23,7 +23,7 @@ Please, refer to those attributes documentation for more details.
- Custom layout, ImageView for rear layout.
- Custom background Drawable & color.
- Custom rear ImageView animation.
- Properties customizable at design time and at run time.
- Properties customizable at design time and at run time with some limitations.

# Showcase
![Showcase1](/showcase/showcase1.gif) ![Showcase2](/showcase/showcase2.gif)
Expand All @@ -32,7 +32,7 @@ Please, refer to those attributes documentation for more details.
Import the library into your project using Gradle with JCenter
```
dependencies {
compile 'eu.davidea:flipview:1.0.0'
compile 'eu.davidea:flipview:1.1.0'
}
```
Using bintray.com
Expand All @@ -41,7 +41,7 @@ repositories {
maven { url "http://dl.bintray.com/davideas/maven" }
}
dependencies {
compile 'eu.davidea:flipview:1.0.0@aar'
compile 'eu.davidea:flipview:1.1.0@aar'
}
```
#### Pull requests / Issues / Improvement requests
Expand Down Expand Up @@ -86,13 +86,24 @@ Supported attributes with default values:
- `app:rearImagePadding="0dp"` - Rear image padding.
- `app:rearImageAnimation="@anim/scale_up"` - Rear image animation.
- `app:rearImageAnimationDuration="150"` - Rear image animation duration.
- `app:rearImageAnimationDelay="duration"` - Rear image animation delay (depends the animation/duration it can be smart setting a custom delay).

**Not changable values** (in ms)
**Not changeable values** (in ms)
- `DEFAULT_INITIAL_DELAY = 500` - This gives time to the activity to load.
- `SCALE_STEP_DELAY = 35` - This gives an acceptable nice loading effect.
- `STOP_LAYOUT_ANIMATION_DELAY = 1500` - This gives the time to perform all entry animations but to stop further animations when screen is fully rendered.

# Change Log
###### v1.1.0 - 2015.11.03
- New attribute `rearImageAnimationDelay`.
- Fixed bugs #4 #5 #6.
- Overridden `showNext()`. Now it performs the flip accordingly with the existing settings and register its state.
- Since the FlipView uses shapes to define its border and shadows One can use `frontBackground` & `rearBackground`
which always override any custom color set with `frontBackgroundColor` & `rearBackgroundColor`:
To give a color with a transparency and custom shape you should assign a Drawable resource with the desired shape
and color (#2 #3) or to assign this resource to the background of the custom layout.
- Desired color with a transparency of the inner drawable (OvalShape) can be assigned at design time & runtime (#2 #3).

###### v1.0.0 - 2015.11.01 (Initial release)
- Initial LayoutAnimation & Initial LayoutAnimationDuration
Reset & stop LayoutAnimationDelay
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ ext {

//Library
libraryCode = 1
libraryVersion = '1.0.0'
libraryDate = " of 2015.11.01"
libraryVersion = '1.1.0'
libraryDate = " of 2015.11.03"
libraryDescription = 'Flipping image like Gmail & beyond'
libraryName = 'FlipView'

Expand Down
3 changes: 2 additions & 1 deletion flipview-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ android {

dependencies {
//See main build.gradle for values & versions
//compile 'eu.davidea:flipview:1.0.0@aar'
//compile 'eu.davidea:flipview:1.1.0'
//compile 'eu.davidea:flipview:1.1.0@aar'
compile project (':flipview')
compile (supportDependencies.appcompat) {
transitive = true;
Expand Down
2 changes: 1 addition & 1 deletion flipview-app/src/main/res/drawable/circle_light.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@android:color/holo_red_light"/>
<solid android:color="@color/colorPrimary"/>
</shape>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/accentTransparent"/>
</shape>
2 changes: 1 addition & 1 deletion flipview-app/src/main/res/drawable/square_light.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/colorPrimary" />
<solid android:color="#3F51B5" />
<corners android:radius="4dp"/>
</shape>
25 changes: 10 additions & 15 deletions flipview-app/src/main/res/layout/content_flipviews.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
app:frontLayout="@layout/flipview_front_custom"
app:frontBackgroundColor="@color/colorPrimary"
app:frontImage="@drawable/ic_add_shopping_cart_white_24dp"
app:rearLayout="@layout/flipview_rear_custom"
app:rearBackgroundColor="#49814B"/>
app:rearLayout="@layout/flipview_rear_custom"/>

<!-- FlipView like GMail with Text!
- Inner default initial animation (scale up)
Expand All @@ -66,7 +65,6 @@
app:frontBackground="@drawable/square_light"
app:rearLayout="@layout/flipview_rear_custom"
app:rearBackground="@drawable/square_light"
app:rearBackgroundColor="#49814B"
app:rearImageAnimation="@anim/grow_from_start_x_axis"/>

<!-- As "@+id/flip_horizontal_oval_view_big"
Expand All @@ -79,15 +77,15 @@
android:layout_height="52dp"
android:layout_gravity="center_horizontal"
android:clickable="true"
app:checked="false"
app:checked="true"
app:enableInitialAnimation="true"
app:animationDuration="1000"
app:animationDuration="100"
app:frontLayout="@layout/flipview_front_custom"
app:frontBackgroundColor="@color/colorPrimary"
app:frontBackground="@drawable/circle_light"
app:frontImage="@drawable/ic_github_circle_white_24dp"
app:rearLayout="@layout/flipview_rear_custom"
app:rearBackgroundColor="#49814B"
app:rearImageAnimationDuration="1000"/>
app:rearBackground="@drawable/circle_light_transparent"
app:rearImageAnimationDuration="200"/>

</LinearLayout>

Expand Down Expand Up @@ -119,7 +117,7 @@
app:checked="false"
app:enableInitialAnimation="true"
app:animationDuration="200"
app:frontBackgroundColor="@color/colorPrimary"
app:frontBackground="@drawable/circle_light"
app:frontImage="@drawable/ic_account_circle_white_24dp"
app:rearImageAnimationDuration="200"/>

Expand All @@ -145,10 +143,10 @@
app:enableInitialAnimation="true"
app:initialLayoutAnimation="@anim/fade_in"
app:initialLayoutAnimationDuration="1000"
app:frontBackgroundColor="@color/colorPrimary"
app:frontImage="@drawable/ic_cached_white_24dp"
app:rearBackgroundColor="@android:color/holo_red_dark"
app:frontBackground="@drawable/circle_light"
app:rearImage="@drawable/ic_cancel_white_24dp"
app:rearBackgroundColor="@color/colorAccent"
app:rearImageAnimationDuration="200"/>

<!--
Expand All @@ -175,9 +173,8 @@
app:anticipateInAnimationTime="120"
app:initialLayoutAnimation="@anim/fade_in"
app:initialLayoutAnimationDuration="1000"
app:frontBackgroundColor="@color/colorPrimary"
app:frontImage="@drawable/ic_favorite_outline_white_24dp"
app:rearBackgroundColor="@android:color/holo_red_dark"
app:frontBackground="@drawable/circle_light"
app:rearImage="@drawable/ic_favorite_white_24dp"
app:animateRearImage="false"/>

Expand Down Expand Up @@ -234,10 +231,8 @@
app:animationDuration="500"
app:anticipateInAnimationTime="150"
app:frontBackground="@drawable/square_light"
app:frontBackgroundColor="@color/colorPrimary"
app:frontImage="@drawable/ic_exit_to_app_white_24dp"
app:rearBackground="@drawable/square_light"
app:rearBackgroundColor="@color/colorPrimary"
app:animateRearImage="false"/>

<!--
Expand Down
2 changes: 1 addition & 1 deletion flipview-app/src/main/res/layout/flipview_front_custom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:contentDescription="@null"
android:gravity="center_horizontal"/>
android:gravity="center"/>

</FrameLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:contentDescription="@null"
android:gravity="center_horizontal"
android:gravity="center"
style="@style/TextAppearance.AppCompat.Large.Inverse"
android:text="Aa"/>

Expand Down
3 changes: 1 addition & 2 deletions flipview-app/src/main/res/layout/flipview_rear_custom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="40dp"
android:layout_height="40dp"
android:padding="4dp"
android:elevation="4dp">

<ImageView
Expand All @@ -12,6 +11,6 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:contentDescription="@null"
android:gravity="center_horizontal"/>
android:gravity="center"/>

</FrameLayout>
2 changes: 1 addition & 1 deletion flipview-app/src/main/res/layout/recycler_view_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
app:frontLayout="@layout/flipview_front_custom_text"
app:frontBackgroundColor="@color/colorPrimary"
app:rearLayout="@layout/flipview_rear_custom"
app:rearBackgroundColor="#49814B"/>
app:rearBackgroundColor="@color/colorAccent"/>

</FrameLayout>
9 changes: 5 additions & 4 deletions flipview-app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#49814B</color>
</resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#49814B</color>
<color name="accentTransparent">#DD49814B</color>
</resources>
Loading

0 comments on commit 8a3978a

Please sign in to comment.