Skip to content

Commit

Permalink
Repakaging cards-recyclerview module
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielemariotti committed Oct 28, 2014
1 parent e169779 commit 248c59d
Show file tree
Hide file tree
Showing 36 changed files with 148 additions and 99 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Version 2.0.0 *(2014-XX-XX)*
----------------------------
* LIB: Added the new **CardViewNative**![(Learn how to migrate your cards)](/doc/MIGRATE)
* LIB: New aar modules. [(doc)[(BUILD.md#including-in-your-project-with-gradle)
* LIB-RECYCLERVIEW: Ner module with support for the new RecyclerView
* LIB: Added a CardRecyclerView and a CardArrayRecyclerViewAdapter [(doc)](/doc/CARDRECYCLERVIEW.md)
* LIB-CARDS: New module with built-in cards.
* LIB-CARDS: Material Cards [(doc)](/doc/MATERIALCARD.md)
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,17 @@ Card Library is pushed to Maven Central as an AAR, so you just need to add the f
//Core
compile 'com.github.gabrielemariotti.cards:cardslib-core:2.0.0'
//Optional for RecyclerView
compile 'com.github.gabrielemariotti.cards:cardslib-recyclerview:2.0.0'
//Optional for built-in cards
compile 'com.github.gabrielemariotti.cards:cardslib-cards:2.0.0'
//Optional for staggered grid view
compile 'com.github.gabrielemariotti.cards:cardslib-extra-staggeredgrid:2.0.0'
//Optional for twoway
compile 'com.github.gabrielemariotti.cards:cardslib-extra-twoway:2.0.0'
//Optional for twoway (coming soon)
//compile 'com.github.gabrielemariotti.cards:cardslib-extra-twoway:2.0.0'
//Optional for drag and drop
compile 'com.github.gabrielemariotti.cards:cardslib-extra-dragdrop:2.0.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
import it.gmariotti.cardslib.library.internal.CardHeader;
import it.gmariotti.cardslib.library.internal.CardThumbnail;
import it.gmariotti.cardslib.library.internal.base.BaseCard;
import it.gmariotti.cardslib.library.internal.recyclerview.CardArrayRecyclerViewAdapter;
import it.gmariotti.cardslib.library.view.CardRecyclerView;
import it.gmariotti.cardslib.library.recyclerview.internal.CardArrayRecyclerViewAdapter;
import it.gmariotti.cardslib.library.recyclerview.view.CardRecyclerView;

/**
* @author Gabriele Mariotti (gabri.mariotti@gmail.com)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ public void onActivityCreated(Bundle savedInstanceState) {
if (listView!=null){
listView.setAdapter(mCardArrayAdapter);
}
FloatingActionButton.FabOnScrollListener fabScrollListener = new FloatingActionButton.FabOnScrollListener();

FloatingActionButton floatingActionButton = (FloatingActionButton) getActivity().findViewById(R.id.button_floating_action);
floatingActionButton.attachToListView(listView);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
import it.gmariotti.cardslib.demo.extras.fragment.BaseListFragment;
import it.gmariotti.cardslib.library.extra.twoway.view.CardTwowayView;
import it.gmariotti.cardslib.library.internal.Card;
import it.gmariotti.cardslib.library.internal.recyclerview.CardArrayRecyclerViewAdapter;
import it.gmariotti.cardslib.library.recyclerview.internal.CardArrayRecyclerViewAdapter;


/**
* This example uses a staggered card with different different photos and text.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
import it.gmariotti.cardslib.library.internal.CardHeader;
import it.gmariotti.cardslib.library.internal.CardThumbnail;
import it.gmariotti.cardslib.library.internal.base.BaseCard;
import it.gmariotti.cardslib.library.internal.recyclerview.CardArrayRecyclerViewAdapter;
import it.gmariotti.cardslib.library.recyclerview.internal.CardArrayRecyclerViewAdapter;


/**
* This example uses a staggered card with different different photos and text.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
import it.gmariotti.cardslib.library.extra.twoway.view.CardTwowayView;
import it.gmariotti.cardslib.library.internal.Card;
import it.gmariotti.cardslib.library.internal.CardThumbnail;
import it.gmariotti.cardslib.library.internal.recyclerview.CardArrayRecyclerViewAdapter;
import it.gmariotti.cardslib.library.recyclerview.internal.CardArrayRecyclerViewAdapter;


/**
* This example uses a staggered card with different different photos and text.
Expand Down
28 changes: 28 additions & 0 deletions demo/extras/src/main/res/drawable/hd_fab_ripple.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>

<!--
~ *******************************************************************************
~ Copyright (c) 2013-2014 Gabriele Mariotti.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~ *****************************************************************************
-->

<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:exitFadeDuration="@android:integer/config_mediumAnimTime">
<item>
<shape android:shape="oval">
<solid android:color="#FFFFFF" />
</shape>
</item>
</selector>
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">

<it.gmariotti.cardslib.library.view.CardRecyclerView
<it.gmariotti.cardslib.library.recyclerview.view.CardRecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
card:list_card_layout_resourceID="@layout/carddemo_extras_list_card_progress_layout"
Expand Down
1 change: 1 addition & 0 deletions demo/stock/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ dependencies {
// Cards Library
compile project(':library-core')
compile project(':library-cards')
compile project(':library-recyclerview')
// Support Libraries
compile 'com.android.support:support-v4:21.0.0'
compile 'com.android.support:appcompat-v7:21.0.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@
import it.gmariotti.cardslib.library.internal.CardExpand;
import it.gmariotti.cardslib.library.internal.CardHeader;
import it.gmariotti.cardslib.library.internal.base.BaseCard;
import it.gmariotti.cardslib.library.internal.recyclerview.CardArrayRecyclerViewAdapter;
import it.gmariotti.cardslib.library.view.CardRecyclerView;
import it.gmariotti.cardslib.library.recyclerview.internal.CardArrayRecyclerViewAdapter;
import it.gmariotti.cardslib.library.recyclerview.view.CardRecyclerView;


/**
* @author Gabriele Mariotti (gabri.mariotti@gmail.com)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
import it.gmariotti.cardslib.library.internal.CardExpand;
import it.gmariotti.cardslib.library.internal.CardHeader;
import it.gmariotti.cardslib.library.internal.base.BaseCard;
import it.gmariotti.cardslib.library.internal.recyclerview.CardArrayRecyclerViewAdapter;
import it.gmariotti.cardslib.library.view.CardRecyclerView;
import it.gmariotti.cardslib.library.recyclerview.internal.CardArrayRecyclerViewAdapter;
import it.gmariotti.cardslib.library.recyclerview.view.CardRecyclerView;

/**
* @author Gabriele Mariotti (gabri.mariotti@gmail.com)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
android:paddingRight="12dp"
android:layout_height="match_parent">

<it.gmariotti.cardslib.library.view.CardRecyclerView
<it.gmariotti.cardslib.library.recyclerview.view.CardRecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
card:list_card_layout_resourceID="@layout/native_recyclerview_card_layout"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">

<it.gmariotti.cardslib.library.view.CardRecyclerView
<it.gmariotti.cardslib.library.recyclerview.view.CardRecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
card:list_card_layout_resourceID="@layout/list_card_layout"
Expand Down
2 changes: 1 addition & 1 deletion demo/stock/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,5 @@
<color name="navdrawer_scrim">#6000</color>

<color name="carddemo_halfcolored_color">#109D58</color>
<color name="carddemo_blackcolored_color">#000000</color>
<color name="carddemo_blackcolored_color">#272727</color>
</resources>
7 changes: 5 additions & 2 deletions doc/BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@ Card Library is pushed to Maven Central as a AAR, so you just need to add the fo
//Core card library
compile 'com.github.gabrielemariotti.cards:cardslib-core:2.0.0'
//Optional for RecyclerView
compile 'com.github.gabrielemariotti.cards:cardslib-recyclerview:2.0.0'
//Optional for built-in cards
compile 'com.github.gabrielemariotti.cards:cardslib-cards:2.0.0'
//Optional for staggered grid view support
compile 'com.github.gabrielemariotti.cards:cardslib-extra-staggeredgrid:2.0.0'
//Optional for twowayview support
compile 'com.github.gabrielemariotti.cards:cardslib-extra-twoway:2.0.0'
//Optional for twowayview support (coming soon)
//compile 'com.github.gabrielemariotti.cards:cardslib-extra-twoway:2.0.0'
//Optional for drag and drop support
compile 'com.github.gabrielemariotti.cards:cardslib-extra-dragdrop:2.0.0'
Expand Down
10 changes: 8 additions & 2 deletions doc/CARDRECYCLERVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,24 @@

In this page you can find info about:

* [Intro](#intro)
* [Creating a base CardRecyclerView](#creating-a-base-cardrecyclerview)
* [Use your custom layout for each row](#use-your-custom-layout-for-each-row)
* [Style](#style)

### Intro

> **PAY ATTENTION:** to use this feature you have to use the **library-recyclerview**.
> [for more info](GUIDE.md#including-in-your-project).
### Creating a base CardRecyclerView

Creating a `CardRecyclerView` is pretty simple.

First, you need an XML layout that will display the `CardRecyclerView`.

``` xml
<it.gmariotti.cardslib.library.view.CardRecyclerView
<it.gmariotti.cardslib.library.recyclerview.view.CardRecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
card:list_card_layout_resourceID="@layout/native_recyclerview_card_layout"
Expand Down Expand Up @@ -75,7 +81,7 @@ For the `CardView`:
You can customize the layout used for each item in the RecyclerView using the attr: `card:list_card_layout_resourceID="@layout/my_layout`

``` xml
<it.gmariotti.cardslib.library.view.CardRecyclerView
<it.gmariotti.cardslib.library.recyclerview.view.CardRecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/carddemo_list_gplaycard"
Expand Down
7 changes: 5 additions & 2 deletions doc/GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,17 @@ Card Library is pushed to Maven Central as an AAR, so you just need to add the f
//Core card library
compile 'com.github.gabrielemariotti.cards:cardslib-core:2.0.0'
//Optional for RecyclerView
compile 'com.github.gabrielemariotti.cards:cardslib-recyclerview:2.0.0'
//Optional for built-in cards
compile 'com.github.gabrielemariotti.cards:cardslib-cards:2.0.0'
//Optional for staggered grid view support
compile 'com.github.gabrielemariotti.cards:cardslib-extra-staggeredgrid:2.0.0'
//Optional for twowayview support
compile 'com.github.gabrielemariotti.cards:cardslib-extra-twoway:2.0.0'
//Optional for twowayview support (coming soon)
//compile 'com.github.gabrielemariotti.cards:cardslib-extra-twoway:2.0.0'
//Optional for drag and drop support
compile 'com.github.gabrielemariotti.cards:cardslib-extra-dragdrop:2.0.0'
Expand Down
2 changes: 1 addition & 1 deletion extra/extra-twoway/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ android {
dependencies {
// Cards Library
compile project(':library-core')
compile project(':library-recyclerview')

//Twowayview
compile 'com.android.support:recyclerview-v7:21.0.0'
compile 'org.lucasr.twowayview:core:1.0.0-SNAPSHOT@aar'
compile 'org.lucasr.twowayview:layouts:1.0.0-SNAPSHOT@aar'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.lucasr.twowayview.widget.TwoWayView;

import it.gmariotti.cardslib.library.extra.twoway.R;
import it.gmariotti.cardslib.library.internal.recyclerview.BaseRecyclerViewAdapter;
import it.gmariotti.cardslib.library.recyclerview.internal.BaseRecyclerViewAdapter;


/**
Expand Down
8 changes: 7 additions & 1 deletion library-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,14 @@ android {
}

dependencies {
//CardView
compile 'com.android.support:cardview-v7:21.0.0'
compile 'com.android.support:recyclerview-v7:21.0.0'

//Support lib
compile 'com.android.support:support-v4:21.0.0'

//Annotation
compile 'com.android.support:support-annotations:21.0.0'
}

// Used to update in Maven
Expand Down
15 changes: 0 additions & 15 deletions library-core/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -393,22 +393,7 @@
</style>


<!--Recycler view-->
<style name="native_recyclerview_card">
<item name="android:layout_marginLeft">@dimen/native_recyclerview_card_margin_left</item>
<item name="android:layout_marginRight">@dimen/native_recyclerview_card_margin_right</item>
<item name="android:layout_marginBottom">@dimen/native_recyclerview_card_margin_bottom</item>
<item name="android:layout_marginTop">@dimen/native_recyclerview_card_margin_top</item>
</style>

<style name="native_recyclerview_card.base" >

</style>

<!-- Thumbnail list -->
<style name="native_recyclerview_card.thumbnail">

</style>


<style name="grid_card">
Expand Down
3 changes: 0 additions & 3 deletions library-extra/gradle.properties

This file was deleted.

28 changes: 0 additions & 28 deletions library-extra/src/main/AndroidManifest.xml

This file was deleted.

File renamed without changes.
12 changes: 4 additions & 8 deletions library-extra/build.gradle → library-recyclerview/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,12 @@ android {

dependencies {
// Cards Library
compile project(':library')
compile project(':library-core')

//Annotation
compile 'com.android.support:support-annotations:21.0.0'
//StaggeredGrid
compile 'com.etsy.android.grid:library:1.0.5'
//DynamicList
compile ('com.nhaarman.listviewanimations:lib-core:3.1.0')
compile ('com.nhaarman.listviewanimations:lib-manipulation:3.1.0')


//Recycler View
compile 'com.android.support:recyclerview-v7:21.0.0'
}

// Used to update in Maven
Expand Down
3 changes: 3 additions & 0 deletions library-recyclerview/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
POM_NAME=Card Library
POM_ARTIFACT_ID=cardslib-recyclerview
POM_PACKAGING=aar
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ /*******************************************************************************
~ Copyright (c) 2014 Gabriele Mariotti.
~ *******************************************************************************
~ Copyright (c) 2013-2014 Gabriele Mariotti.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
Expand All @@ -14,10 +13,16 @@
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~ ******************************************************************************/
~ *****************************************************************************
-->

<lint>
<!-- Disable MissingTranslation: Incomplete translation -->
<issue id="MissingTranslation" severity="ignore" />
</lint>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="it.gmariotti.cardslib.library.recyclerview">

<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="19" />

<application>

</application>

</manifest>
Loading

0 comments on commit 248c59d

Please sign in to comment.