Skip to content

Commit

Permalink
v1.0.0 commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tompee committed Apr 28, 2017
1 parent 833609c commit 1259592
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Change Log
==========

## Version 1.0.0
- Initial release
- 3 layout adapters (Simple, Bubble, Pop)
20 changes: 20 additions & 0 deletions License.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright (C) 2017 tompee

MIT License

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ An efficient tablayout for Android with added FUN!
- Supports multiple tab view animations

## Getting started
Still a work in progress. Will update when binary is already hosted.
In your build.gradle:

```
dependencies {
compile 'com.tompee:funtablayout:1.0.0'
}
```

Define `FunTabLayout` and ViewPager in xml layout with custom attributes.
```xml
Expand Down Expand Up @@ -149,6 +155,9 @@ tabLayout.setUpWithAdapter(builder.build());
The RecyclerView approach in FunTabLayout is an extension of nshmura's RecyclerTabLayout
https://github.com/nshmura/RecyclerTabLayout

## Coming soon!
More tablayout adapters. Watch out!

## License
```
MIT License
Expand Down
9 changes: 9 additions & 0 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,12 @@ dependencies {
compile 'com.android.support:appcompat-v7:25.3.0'
compile 'com.android.support:recyclerview-v7:25.3.0'
}

// ext is a gradle closure allowing the declaration of global properties
ext {
PUBLISH_GROUP_ID = 'com.tompee'
PUBLISH_ARTIFACT_ID = 'funtablayout'
PUBLISH_VERSION = '1.0.0'
}

apply from: 'https://raw.githubusercontent.com/blundell/release-android-library/master/android-release-aar.gradle'
Original file line number Diff line number Diff line change
Expand Up @@ -364,11 +364,11 @@ public void onPageScrolled(int position, float positionOffset, int positionOffse
mFunTabLayout.scrollToTab(position, positionOffset, false);
BubbleTabView view = (BubbleTabView) mLinearLayoutManager.findViewByPosition(position);
if (view != null) {
view.setAlpha(positionOffset);
view.setViewAlpha(positionOffset);
}
BubbleTabView nextView = (BubbleTabView) mLinearLayoutManager.findViewByPosition(position + 1);
if (nextView != null) {
nextView.setAlpha(1 - positionOffset);
nextView.setViewAlpha(1 - positionOffset);
}
mTabPositionOffset = positionOffset;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ public BubbleTabView(Context context) {
addView(mTitleView);
}

@Override
public void setAlpha(float alpha) {
public void setViewAlpha(float alpha) {
for (int index = 0; index < getChildCount(); index++) {
ViewCompat.setAlpha(getChildAt(index), alpha);
}
Expand Down

0 comments on commit 1259592

Please sign in to comment.