├── .idea
├── .name
├── compiler.xml
├── copyright
│ └── profiles_settings.xml
├── encodings.xml
├── gradle.xml
├── misc.xml
├── modules.xml
├── runConfigurations.xml
└── vcs.xml
├── README.md
├── app
├── build.gradle
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── com
│ │ └── rajatpunkstaa
│ │ └── cardview
│ │ ├── Album.java
│ │ ├── AlbumsAdapter.java
│ │ └── MainActivity.java
│ └── res
│ ├── drawable-hdpi
│ └── ic_dots.png
│ ├── drawable-mdpi
│ └── ic_dots.png
│ ├── drawable-xhdpi
│ └── ic_dots.png
│ ├── drawable-xxhdpi
│ └── ic_dots.png
│ ├── drawable
│ ├── album1.png
│ ├── album10.png
│ ├── album11.png
│ ├── album2.PNG
│ ├── album3.png
│ ├── album4.png
│ ├── album5.png
│ ├── album6.png
│ ├── album7.png
│ ├── album8.png
│ ├── album9.png
│ └── cover.jpg
│ ├── layout
│ ├── activity_main.xml
│ ├── album_card.xml
│ └── content_main.xml
│ ├── menu
│ ├── menu_album.xml
│ └── menu_main.xml
│ ├── mipmap-hdpi
│ └── ic_launcher.png
│ ├── mipmap-mdpi
│ └── ic_launcher.png
│ ├── mipmap-xhdpi
│ └── ic_launcher.png
│ ├── mipmap-xxhdpi
│ └── ic_launcher.png
│ ├── mipmap-xxxhdpi
│ └── ic_launcher.png
│ ├── values-v21
│ └── styles.xml
│ ├── values-w820dp
│ └── dimens.xml
│ └── values
│ ├── colors.xml
│ ├── dimens.xml
│ ├── strings.xml
│ └── styles.xml
├── build.gradle
└── gradle
└── wrapper
├── gradle-wrapper.jar
└── gradle-wrapper.properties
/.idea/.name:
--------------------------------------------------------------------------------
1 | CardView
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | 1.8
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
Cards
2 | Android Material Design CardView general template designed by Rajat Gupta
3 |
4 |
5 |
6 |
7 |
8 | A card is a sheet of material that serves as an entry point to more detailed information.
9 | Cards may contain a photo, text, and a link about a single subject. They may display content containing elements of varying size, such as photos with captions of variable length.
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | Usage
18 | Cards are a convenient means of displaying content composed of different elements. They’re also well-suited for showcasing elements whose size or supported actions vary, like photos with captions of variable length.
19 |
20 | Content
21 | Cards provide context and an entry point to more robust information and views, and their content and quantity can vary greatly. Cards within a card collection can each contain a unique data set, such as a checklist with an action, a note with an action, and a note with a photo.
22 |
23 |
24 |
25 |
26 | Don't overload cards with extraneous information or actions.
27 |
28 | Content hierarchy
29 | Use hierarchy within the card to direct users’ attention to the most important information. For example, place primary content at the top of the card, or use typography to emphasize primary content.
30 |
31 | Images can reinforce other content in a card. However, their size and placement within the card depends on whether images are the primary content or are being used to supplement other content on the card.
32 |
33 |
34 | Text is most legible when placed on a solid color background with a sufficient contrast ratio to the text. Text placed on image backgrounds should preserve text legibility.
35 |
36 |
37 |
38 | Behavior
39 |
40 | Cards have a constant width and variable height. The maximum height is limited to the height of the available space on a platform, but it can temporarily expand (for example, to display a comment field).
41 |
42 | Cards do not flip over to reveal information on the back.
43 |
44 |
45 | Supported gestures
46 | Card gestures should be consistently implemented within a card collection.
47 |
48 | Supported gestures include:
49 |
50 | The swipe gesture may be used on a per-card basis. Limit swipe gestures within a view so that they don’t overlap with one another. For example, a swipeable card should not contain a swipeable image carousel, so that only a single action occurs when the card is swiped.
51 | The pick-up-and-move gesture may be used if it is important for the user to be able to sort cards within a collection. But consider if filtering or sorting would better organize the content.
52 |
53 |
54 |
55 |
56 | Card collection filtering and sorting
57 |
58 |
59 | Card collections can be programmatically sorted or filtered by date, file size, alphabetical order, or other parameters.
60 |
61 | The first item in the collection is positioned at the top left.
62 | The order proceeds left to right and top to bottom.
63 |
64 |
65 |
66 |
67 | Scrolling
68 | Card collections only scroll vertically.
69 |
70 | Card content that exceeds the maximum card height is truncated and does not scroll, but the card can be expanded. Once expanded, the card may exceed the maximum height of the view. In this case, the card will scroll with the card collection.
71 |
72 |
73 |
74 |
75 |
76 | Find out more at the Android Developer Documentation. Keep me posted for any suggestions
77 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 23
5 | buildToolsVersion "23.0.2"
6 |
7 | defaultConfig {
8 | applicationId "com.delaroystudios.cardview"
9 | minSdkVersion 16
10 | targetSdkVersion 23
11 | versionCode 1
12 | versionName "1.0"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | testCompile 'junit:junit:4.12'
25 | compile 'com.android.support:appcompat-v7:23.3.0'
26 | compile 'com.android.support:design:23.3.0'
27 |
28 | // RecyclerView
29 | compile 'com.android.support:recyclerview-v7:23.3.+'
30 |
31 | // CardView
32 | compile 'com.android.support:cardview-v7:23.3.+'
33 |
34 | // Glide
35 | compile 'com.github.bumptech.glide:glide:3.7.0'
36 | }
37 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/apple/Softwares/adt-bundle-mac-x86_64-20140702/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/java/com/rajatpunkstaa/cardview/Album.java:
--------------------------------------------------------------------------------
1 | package com.rajatpunkstaa.cardview;
2 |
3 | /**
4 | * Created by Rajat Gupta on 18/05/16.
5 | */
6 | public class Album {
7 | private String name;
8 | private Boolean isFavorite;
9 | private int numOfSongs;
10 | private int thumbnail;
11 |
12 | public Album() {
13 | }
14 |
15 | public Album(String name, int numOfSongs, int thumbnail) {
16 | this.name = name;
17 | this.numOfSongs = numOfSongs;
18 | this.thumbnail = thumbnail;
19 | }
20 |
21 | public String getName() {
22 | return name;
23 | }
24 |
25 | public void setName(String name) {
26 | this.name = name;
27 | }
28 |
29 | public int getNumOfSongs() {
30 | return numOfSongs;
31 | }
32 |
33 | public void setNumOfSongs(int numOfSongs) {
34 | this.numOfSongs = numOfSongs;
35 | }
36 |
37 | public int getThumbnail() {
38 | return thumbnail;
39 | }
40 |
41 | public void setThumbnail(int thumbnail) {
42 | this.thumbnail = thumbnail;
43 | }
44 | public boolean isFavorite(){
45 | return isFavorite;
46 | }
47 |
48 | public void setFavorite(boolean favorite){
49 | isFavorite = favorite
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/app/src/main/java/com/rajatpunkstaa/cardview/AlbumsAdapter.java:
--------------------------------------------------------------------------------
1 | package com.rajatpunkstaa.cardview;
2 |
3 | import android.content.Context;
4 | import android.support.v7.widget.PopupMenu;
5 | import android.support.v7.widget.RecyclerView;
6 | import android.view.LayoutInflater;
7 | import android.view.MenuInflater;
8 | import android.view.MenuItem;
9 | import android.view.View;
10 | import android.view.ViewGroup;
11 | import android.widget.ImageView;
12 | import android.widget.TextView;
13 | import android.widget.Toast;
14 |
15 | import com.bumptech.glide.Glide;
16 |
17 | import java.util.List;
18 |
19 | /**
20 | * Created by Rajat Gupta on 18/05/16.
21 | */
22 | public class AlbumsAdapter extends RecyclerView.Adapter {
23 |
24 | private Context mContext;
25 | private List albumList;
26 |
27 | public class MyViewHolder extends RecyclerView.ViewHolder {
28 | public TextView title, count;
29 | public ImageView thumbnail, overflow;
30 |
31 | public MyViewHolder(View view) {
32 | super(view);
33 | title = (TextView) view.findViewById(R.id.title);
34 | count = (TextView) view.findViewById(R.id.count);
35 | thumbnail = (ImageView) view.findViewById(R.id.thumbnail);
36 | overflow = (ImageView) view.findViewById(R.id.overflow);
37 | }
38 | }
39 |
40 |
41 | public AlbumsAdapter(Context mContext, List albumList) {
42 | this.mContext = mContext;
43 | this.albumList = albumList;
44 | }
45 |
46 | @Override
47 | public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
48 | View itemView = LayoutInflater.from(parent.getContext())
49 | .inflate(R.layout.album_card, parent, false);
50 |
51 | return new MyViewHolder(itemView);
52 | }
53 |
54 | @Override
55 | public void onBindViewHolder(final MyViewHolder holder, int position) {
56 | Album album = albumList.get(position);
57 | holder.title.setText(album.getName());
58 | holder.count.setText(album.getNumOfSongs() + " songs");
59 |
60 | // loading album cover using Glide library
61 | Glide.with(mContext).load(album.getThumbnail()).into(holder.thumbnail);
62 |
63 | holder.overflow.setOnClickListener(new View.OnClickListener() {
64 | @Override
65 | public void onClick(View view) {
66 | showPopupMenu(holder.overflow);
67 | Toast.makeText(this, "Thank you for trying this app, Find out more...",Toast.LENGTH_SHORT).show();
68 | }
69 | });
70 | }
71 |
72 | /**
73 | * Showing popup menu when tapping on 3 dots
74 | */
75 | private void showPopupMenu(View view) {
76 | // inflate menu
77 | PopupMenu popup = new PopupMenu(mContext, view);
78 | MenuInflater inflater = popup.getMenuInflater();
79 | inflater.inflate(R.menu.menu_album, popup.getMenu());
80 | popup.setOnMenuItemClickListener(new MyMenuItemClickListener());
81 | popup.show();
82 | Glide.with(mContext).load(album.getThumbnail()).into(holder.thumbnail);
83 | }
84 |
85 | /**
86 | * Click listener for popup menu items
87 | */
88 | class MyMenuItemClickListener implements PopupMenu.OnMenuItemClickListener {
89 |
90 | public MyMenuItemClickListener() {
91 | }
92 |
93 | @Override
94 | public boolean onMenuItemClick(MenuItem menuItem) {
95 | switch (menuItem.getItemId()) {
96 | case R.id.action_add_favourite:
97 | Toast.makeText(mContext, "Add to favourite", Toast.LENGTH_SHORT).show();
98 | return true;
99 | case R.id.action_play_next:
100 | Toast.makeText(mContext, "Play next", Toast.LENGTH_SHORT).show();
101 | return true;
102 | default:
103 | }
104 | return false;
105 | }
106 | }
107 |
108 | @Override
109 | public int getItemCount() {
110 | return albumList.size();
111 | }
112 | }
113 |
--------------------------------------------------------------------------------
/app/src/main/java/com/rajatpunkstaa/cardview/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.rajatpunkstaa.cardview;
2 |
3 | import android.content.res.Resources;
4 | import android.graphics.Rect;
5 | import android.os.Bundle;
6 | import android.support.design.widget.AppBarLayout;
7 | import android.support.design.widget.CollapsingToolbarLayout;
8 | import android.support.v7.app.AppCompatActivity;
9 | import android.support.v7.widget.DefaultItemAnimator;
10 | import android.support.v7.widget.GridLayoutManager;
11 | import android.support.v7.widget.RecyclerView;
12 | import android.support.v7.widget.Toolbar;
13 | import android.util.TypedValue;
14 | import android.view.View;
15 | import android.widget.ImageView;
16 |
17 | import com.bumptech.glide.Glide;
18 |
19 | import java.util.ArrayList;
20 | import java.util.List;
21 |
22 | public class MainActivity extends AppCompatActivity {
23 | //Created by Rajat Gupta on 18/08/16
24 |
25 | private RecyclerView recyclerView;
26 | private AlbumsAdapter adapter;
27 | private List albumList;
28 |
29 | @Override
30 | protected void onCreate(Bundle savedInstanceState) {
31 | super.onCreate(savedInstanceState);
32 | setContentView(R.layout.activity_main);
33 | Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
34 | setSupportActionBar(toolbar);
35 |
36 | initCollapsingToolbar();
37 |
38 | recyclerView = (RecyclerView) findViewById(R.id.recycler_view);
39 |
40 | albumList = new ArrayList<>();
41 | adapter = new AlbumsAdapter(this, albumList);
42 |
43 | RecyclerView.LayoutManager mLayoutManager = new GridLayoutManager(this, 2);
44 | recyclerView.setLayoutManager(mLayoutManager);
45 | recyclerView.addItemDecoration(new GridSpacingItemDecoration(2, dpToPx(10), true));
46 | recyclerView.setItemAnimator(new DefaultItemAnimator());
47 | recyclerView.setAdapter(adapter);
48 |
49 | prepareAlbums();
50 |
51 | try {
52 | Glide.with(this).load(R.drawable.cover).into((ImageView) findViewById(R.id.backdrop));
53 | } catch (Exception e) {
54 | e.printStackTrace();
55 | }
56 | }
57 |
58 | /**
59 | * Initializing collapsing toolbar
60 | * Will show and hide the toolbar title on scroll
61 | */
62 | private void initCollapsingToolbar() {
63 | final CollapsingToolbarLayout collapsingToolbar =
64 | (CollapsingToolbarLayout) findViewById(R.id.collapsing_toolbar);
65 | collapsingToolbar.setTitle(" ");
66 | AppBarLayout appBarLayout = (AppBarLayout) findViewById(R.id.appbar);
67 | appBarLayout.setExpanded(true);
68 |
69 | // hiding & showing the title when toolbar expanded & collapsed
70 | appBarLayout.addOnOffsetChangedListener(new AppBarLayout.OnOffsetChangedListener() {
71 | boolean isShow = false;
72 | int scrollRange = -1;
73 |
74 | @Override
75 | public void onOffsetChanged(AppBarLayout appBarLayout, int verticalOffset) {
76 | if (scrollRange == -1) {
77 | scrollRange = appBarLayout.getTotalScrollRange();
78 | }
79 | if (scrollRange + verticalOffset == 0) {
80 | collapsingToolbar.setTitle(getString(R.string.app_name));
81 | isShow = true;
82 | } else if (isShow) {
83 | collapsingToolbar.setTitle(" ");
84 | isShow = false;
85 | }
86 | }
87 | });
88 | }
89 |
90 | /**
91 | * Adding few albums for testing
92 | */
93 | private void prepareAlbums() {
94 | int[] covers = new int[]{
95 | R.drawable.album1,
96 | R.drawable.album2,
97 | R.drawable.album3,
98 | R.drawable.album4,
99 | R.drawable.album5,
100 | R.drawable.album6,
101 | R.drawable.album7,
102 | R.drawable.album8,
103 | R.drawable.album9,
104 | R.drawable.album10,
105 | R.drawable.album11};
106 |
107 | Album a = new Album("Maroon5", 13, covers[0]);
108 | albumList.add(a);
109 |
110 | a = new Album("Sugar Ray", 8, covers[1]);
111 | albumList.add(a);
112 |
113 | a = new Album("Bon Jovi", 11, covers[2]);
114 | albumList.add(a);
115 |
116 | a = new Album("The Corrs", 12, covers[3]);
117 | albumList.add(a);
118 |
119 | a = new Album("The Cranberries", 14, covers[4]);
120 | albumList.add(a);
121 |
122 | a = new Album("Westlife", 1, covers[5]);
123 | albumList.add(a);
124 |
125 | a = new Album("Black Eyed Peas", 11, covers[6]);
126 | albumList.add(a);
127 |
128 | a = new Album("VivaLaVida", 14, covers[7]);
129 | albumList.add(a);
130 |
131 | a = new Album("The Cardigans", 11, covers[8]);
132 | albumList.add(a);
133 |
134 | a = new Album("Pussycat Dolls", 17, covers[9]);
135 | albumList.add(a);
136 |
137 | adapter.notifyDataSetChanged();
138 | }
139 |
140 | /**
141 | * RecyclerView item decoration - give equal margin around grid item
142 | */
143 | public class GridSpacingItemDecoration extends RecyclerView.ItemDecoration {
144 |
145 | private int spanCount;
146 | private int spacing;
147 | private boolean includeEdge;
148 |
149 | public GridSpacingItemDecoration(int spanCount, int spacing, boolean includeEdge) {
150 | this.spanCount = spanCount;
151 | this.spacing = spacing;
152 | this.includeEdge = includeEdge;
153 | }
154 |
155 | @Override
156 | public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
157 | int position = parent.getChildAdapterPosition(view); // item position
158 | int column = position % spanCount; // item column
159 |
160 | if (includeEdge) {
161 | outRect.left = spacing - column * spacing / spanCount; // spacing - column * ((1f / spanCount) * spacing)
162 | outRect.right = (column + 1) * spacing / spanCount; // (column + 1) * ((1f / spanCount) * spacing)
163 |
164 | if (position < spanCount) { // top edge
165 | outRect.top = spacing;
166 | }
167 | outRect.bottom = spacing; // item bottom
168 | } else {
169 | outRect.left = column * spacing / spanCount; // column * ((1f / spanCount) * spacing)
170 | outRect.right = spacing - (column + 1) * spacing / spanCount; // spacing - (column + 1) * ((1f / spanCount) * spacing)
171 | if (position >= spanCount) {
172 | outRect.top = spacing; // item top
173 | }
174 | }
175 | }
176 | }
177 |
178 | /**
179 | * Converting dp to pixel
180 | */
181 | private int dpToPx(int dp) {
182 | Resources r = getResources();
183 | return Math.round(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, r.getDisplayMetrics()));
184 | }
185 | }
186 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_dots.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7rajatgupta/CardView/720e8550567712ab6eaa9e9884472dc43f1840bc/app/src/main/res/drawable-hdpi/ic_dots.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_dots.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7rajatgupta/CardView/720e8550567712ab6eaa9e9884472dc43f1840bc/app/src/main/res/drawable-mdpi/ic_dots.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_dots.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7rajatgupta/CardView/720e8550567712ab6eaa9e9884472dc43f1840bc/app/src/main/res/drawable-xhdpi/ic_dots.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_dots.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7rajatgupta/CardView/720e8550567712ab6eaa9e9884472dc43f1840bc/app/src/main/res/drawable-xxhdpi/ic_dots.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/album1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7rajatgupta/CardView/720e8550567712ab6eaa9e9884472dc43f1840bc/app/src/main/res/drawable/album1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/album10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7rajatgupta/CardView/720e8550567712ab6eaa9e9884472dc43f1840bc/app/src/main/res/drawable/album10.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/album11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7rajatgupta/CardView/720e8550567712ab6eaa9e9884472dc43f1840bc/app/src/main/res/drawable/album11.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/album2.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7rajatgupta/CardView/720e8550567712ab6eaa9e9884472dc43f1840bc/app/src/main/res/drawable/album2.PNG
--------------------------------------------------------------------------------
/app/src/main/res/drawable/album3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7rajatgupta/CardView/720e8550567712ab6eaa9e9884472dc43f1840bc/app/src/main/res/drawable/album3.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/album4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7rajatgupta/CardView/720e8550567712ab6eaa9e9884472dc43f1840bc/app/src/main/res/drawable/album4.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/album5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7rajatgupta/CardView/720e8550567712ab6eaa9e9884472dc43f1840bc/app/src/main/res/drawable/album5.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/album6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7rajatgupta/CardView/720e8550567712ab6eaa9e9884472dc43f1840bc/app/src/main/res/drawable/album6.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/album7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7rajatgupta/CardView/720e8550567712ab6eaa9e9884472dc43f1840bc/app/src/main/res/drawable/album7.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/album8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7rajatgupta/CardView/720e8550567712ab6eaa9e9884472dc43f1840bc/app/src/main/res/drawable/album8.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/album9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7rajatgupta/CardView/720e8550567712ab6eaa9e9884472dc43f1840bc/app/src/main/res/drawable/album9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/cover.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7rajatgupta/CardView/720e8550567712ab6eaa9e9884472dc43f1840bc/app/src/main/res/drawable/cover.jpg
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
16 |
17 |
27 |
28 |
31 |
32 |
39 |
40 |
46 |
47 |
54 |
55 |
61 |
62 |
63 |
64 |
65 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/album_card.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
14 |
15 |
18 |
19 |
26 |
27 |
37 |
38 |
47 |
48 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/content_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_album.xml:
--------------------------------------------------------------------------------
1 |
4 |
8 |
9 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
5 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7rajatgupta/CardView/720e8550567712ab6eaa9e9884472dc43f1840bc/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7rajatgupta/CardView/720e8550567712ab6eaa9e9884472dc43f1840bc/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7rajatgupta/CardView/720e8550567712ab6eaa9e9884472dc43f1840bc/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7rajatgupta/CardView/720e8550567712ab6eaa9e9884472dc43f1840bc/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7rajatgupta/CardView/720e8550567712ab6eaa9e9884472dc43f1840bc/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #F50057
4 | #F50057
5 | #FF4081
6 | #f1f5f8
7 | #4c4c4c
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 | 16dp
6 | 10dp
7 | 250dp
8 | 30dp
9 | 18dp
10 | 5dp
11 | 0dp
12 | 160dp
13 | 10dp
14 | 15dp
15 | 5dp
16 | 12dp
17 | 20dp
18 | 30dp
19 | 10dp
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Card View
3 | Settings
4 | Add to Favourites
5 | Play Next
6 | LOVE MUSICS
7 | This season top 20 music
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.1.0'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/7rajatgupta/CardView/720e8550567712ab6eaa9e9884472dc43f1840bc/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Dec 28 10:00:20 PST 2015
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
7 |
--------------------------------------------------------------------------------