-
Notifications
You must be signed in to change notification settings - Fork 551
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from veghtomi/tamas-vegh-add-other-shimmer-wit…
…h-other-features Add other shimmer implementation and remove application attributes from manifest
- Loading branch information
Showing
31 changed files
with
633 additions
and
1,254 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
app/src/main/java/com/cooltechworks/sample/utils/DemoConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package com.cooltechworks.sample.utils; | ||
|
||
|
||
import android.support.annotation.LayoutRes; | ||
import android.support.annotation.StringRes; | ||
import android.support.annotation.StyleRes; | ||
import android.support.v7.widget.RecyclerView; | ||
|
||
public class DemoConfiguration { | ||
@StyleRes | ||
private int styleResource; | ||
|
||
@LayoutRes | ||
private int layoutResource; | ||
|
||
@StringRes | ||
private int titleResource; | ||
|
||
private RecyclerView.LayoutManager layoutManager; | ||
|
||
private RecyclerView.ItemDecoration itemDecoration; | ||
|
||
public RecyclerView.ItemDecoration getItemDecoration() { | ||
return itemDecoration; | ||
} | ||
|
||
public void setItemDecoration(RecyclerView.ItemDecoration itemDecoration) { | ||
this.itemDecoration = itemDecoration; | ||
} | ||
|
||
public int getStyleResource() { | ||
return styleResource; | ||
} | ||
|
||
public void setStyleResource(int styleResource) { | ||
this.styleResource = styleResource; | ||
} | ||
|
||
public int getLayoutResource() { | ||
return layoutResource; | ||
} | ||
|
||
public void setLayoutResource(int layoutResource) { | ||
this.layoutResource = layoutResource; | ||
} | ||
|
||
public int getTitleResource() { | ||
return titleResource; | ||
} | ||
|
||
public void setTitleResource(int titleResource) { | ||
this.titleResource = titleResource; | ||
} | ||
|
||
public RecyclerView.LayoutManager getLayoutManager() { | ||
return layoutManager; | ||
} | ||
|
||
public void setLayoutManager(RecyclerView.LayoutManager layoutManager) { | ||
this.layoutManager = layoutManager; | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
app/src/main/java/com/cooltechworks/sample/utils/view/CardPaddingItemDecoration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.cooltechworks.sample.utils.view; | ||
|
||
|
||
import android.content.Context; | ||
import android.graphics.Rect; | ||
import android.support.v7.widget.RecyclerView; | ||
import android.util.TypedValue; | ||
import android.view.View; | ||
|
||
public class CardPaddingItemDecoration extends RecyclerView.ItemDecoration { | ||
|
||
private int paddingBetweenItems; | ||
|
||
public CardPaddingItemDecoration(Context context) { | ||
this.paddingBetweenItems = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 8, context.getResources().getDisplayMetrics()); | ||
} | ||
|
||
@Override | ||
public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) { | ||
outRect.set(0, 0, 0, paddingBetweenItems); | ||
} | ||
} |
Oops, something went wrong.