Skip to content

Commit

Permalink
Release 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
armcha committed Sep 2, 2016
1 parent e88a721 commit 93f3b80
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 49 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,15 +245,22 @@ Now you can change centre button icon if space navigation view already set up

Also you can change item text and icon if space navigation view already set up
```java
spaceNavigationView.changeItemTextAtPosition(0,"NEW TEXT");
spaceNavigationView.changeItemIconAtPosition(0,R.drawable.yourDrawable);
spaceNavigationView.changeItemTextAtPosition(0, "NEW TEXT");
spaceNavigationView.changeItemIconAtPosition(1, R.drawable.yourDrawable);
```

Now you can change space navigation view background color if it already set up
```java
spaceNavigationView.changeSpaceBackgroundColor(ContextCompat.getColor(context,R.color.yourColor));
```
![](screens/gif3.gif)


##Versions

##1.3.0
* Added SpaceOnLongClickListener
* Added changeSpaceBackgroundColor method
* Fixed rendering problem when view is in edit mode

##1.2.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ protected void onCreate(Bundle savedInstanceState) {
spaceNavigationView.initWithSaveInstanceState(savedInstanceState);
spaceNavigationView.addSpaceItem(new SpaceItem("HOME", R.drawable.home));
spaceNavigationView.addSpaceItem(new SpaceItem("SEARCH", R.drawable.magnify));


//spaceNavigationView.addSpaceItem(new SpaceItem("LIKE", R.drawable.bell));
//spaceNavigationView.addSpaceItem(new SpaceItem("ACCOUNT", R.drawable.account));
//spaceNavigationView.showIconOnly();
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0-beta3'
classpath 'com.android.tools.build:gradle:2.2.0-rc1'
classpath 'com.novoda:bintray-release:0.3.4'
}
}
Expand Down
Binary file added screens/gif3.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion spacelib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies {
publish {
groupId = 'com.github.armcha'
artifactId = 'SpaceNavigationView'
publishVersion = '1.2.0'
publishVersion = '1.3.0'
desc = 'Spaces Navigation View'
licences = ['MIT']
website = 'https://github.com/armcha/Space-Navigation-View'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import android.graphics.drawable.shapes.OvalShape;
import android.os.Build;
import android.support.v4.view.ViewCompat;
import android.support.v4.view.ViewPropertyAnimatorListenerAdapter;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;
Expand All @@ -45,7 +46,7 @@ static void showBadge(RelativeLayout view, BadgeItem badgeItem) {
.setDuration(200)
.scaleX(1)
.scaleY(1)
.setListener(new SimpleViewAnimatorListener() {
.setListener(new ViewPropertyAnimatorListenerAdapter() {
@Override
public void onAnimationEnd(View view) {
Utils.changeViewVisibilityVisible(view);
Expand All @@ -64,7 +65,7 @@ static void hideBadge(View view) {
.setDuration(200)
.scaleX(0)
.scaleY(0)
.setListener(new SimpleViewAnimatorListener() {
.setListener(new ViewPropertyAnimatorListenerAdapter() {
@Override
public void onAnimationEnd(final View view) {
Utils.changeViewVisibilityGone(view);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

class BadgeItem implements Serializable {

private static final int BADGE_TEXT_MAX_NUMBER = 9;

private int badgeIndex;

private int badgeText;
Expand All @@ -46,10 +48,11 @@ int getIntBadgeText() {

String getBadgeText() {
String badgeStringText;
if (badgeText > 9)
badgeStringText = 9 + "+";
else
if (badgeText > BADGE_TEXT_MAX_NUMBER) {
badgeStringText = BADGE_TEXT_MAX_NUMBER + "+";
} else {
badgeStringText = String.valueOf(badgeText);
}

return badgeStringText;
}
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion spacelib/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<color name="default_active_item_color">#262626</color>
<color name="selected_item_color">#3fffffff</color>
<color name="badge_background_color">#f44336</color>

<color name="white_with_alpha">#bfffffff</color>
<color name="colorBackgroundHighlightWhite">#8dffffff</color>
</resources>

0 comments on commit 93f3b80

Please sign in to comment.