├── .gitignore
├── ImageLoader.apk
├── LICENSE
├── README.md
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── hsalf
│ │ └── menuanim
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── hsalf
│ │ │ └── menuanim
│ │ │ ├── App.java
│ │ │ ├── MenuActivity.java
│ │ │ ├── adapter
│ │ │ └── MenuAdapter.java
│ │ │ ├── dto
│ │ │ └── Card.java
│ │ │ ├── utils
│ │ │ ├── BitmapHelper.java
│ │ │ ├── ImageCache.java
│ │ │ ├── ImageCacheImpl.java
│ │ │ └── ImageLoaderImpl.java
│ │ │ └── widgets
│ │ │ ├── CardColorLayout.java
│ │ │ ├── SliderDrawable.java
│ │ │ └── SliderImageView.java
│ └── res
│ │ ├── drawable
│ │ ├── antarctica.jpg
│ │ ├── bagan_myanmar.jpg
│ │ ├── bora_bora.jpg
│ │ ├── kauai_hawaii.jpg
│ │ ├── machu_picchu_peru.jpg
│ │ ├── neuschwanstein_castle_germany.jpg
│ │ ├── petra_jordan.jpg
│ │ ├── pyramids_giza_egypt.jpg
│ │ ├── railay_thailand.jpg
│ │ ├── rainbow_mountains.jpg
│ │ ├── rice_terrace_longsheng.jpg
│ │ ├── svalbard_norway.jpg
│ │ ├── ta_prohm_cambodia.jpg
│ │ ├── taj_mahal_india.jpg
│ │ ├── torres_del_paine_patagonia.jpg
│ │ ├── tracy_arm_fjord_alaska.jpg
│ │ ├── venice_italy.jpg
│ │ └── yellowstone_bison.jpg
│ │ ├── layout
│ │ ├── activity_menu.xml
│ │ └── inflater_menu_item.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-w820dp
│ │ └── dimens.xml
│ │ └── values
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── hsalf
│ └── menuanim
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | ##
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | gradle/
9 | gradlew
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata
19 | *.xccheckout
20 | *.moved-aside
21 | DerivedData
22 | *.hmap
23 | *.ipa
24 | *.xcuserstate
25 | project.xcworkspace
26 | *.*~
27 | ap_
28 | *.bat
29 |
30 | # Android/IJ
31 | #
32 | .idea
33 | *.iml
34 | .gradle
35 | local.properties
36 | #gradle.properties
37 |
38 | # node.js
39 | #
40 | node_modules/
41 | npm-debug.log
42 |
--------------------------------------------------------------------------------
/ImageLoader.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sujithkanna/MenuCardAnimation/b74938fd5bda66120b1556473c783d4807bde613/ImageLoader.apk
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "{}"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright {yyyy} {name of copyright owner}
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # MenuCardAnimation
2 | A simple list with card reveal animation
3 | Download this apk for demo. [Apk](https://raw.githubusercontent.com/sujithkanna/MenuCardAnimation/master/ImageLoader.apk)
4 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion "25.0.2"
6 | defaultConfig {
7 | applicationId "com.example.imageloader"
8 | minSdkVersion 21
9 | targetSdkVersion 25
10 | versionCode 1
11 | versionName "1.0"
12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
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 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
25 | exclude group: 'com.android.support', module: 'support-annotations'
26 | })
27 | compile 'com.android.support:appcompat-v7:25.2.0'
28 | testCompile 'junit:junit:4.12'
29 | compile 'com.android.support:cardview-v7:25.2.0'
30 | compile 'com.android.support:recyclerview-v7:25.2.0'
31 | }
32 |
--------------------------------------------------------------------------------
/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 /home/sujith/data/data/AndroidStudio/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/androidTest/java/com/hsalf/menuanim/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.hsalf.menuanim;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.example.imageloader", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
15 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/app/src/main/java/com/hsalf/menuanim/App.java:
--------------------------------------------------------------------------------
1 | package com.hsalf.menuanim;
2 |
3 | import android.app.Application;
4 |
5 | import com.hsalf.menuanim.utils.ImageCache;
6 | import com.hsalf.menuanim.utils.ImageCacheImpl;
7 |
8 | public class App extends Application {
9 |
10 | private static final String TAG = "App";
11 |
12 | private static App sApp;
13 |
14 | private ImageCache mImageCacheImpl;
15 |
16 | @Override
17 | public void onCreate() {
18 | super.onCreate();
19 | sApp = this;
20 | mImageCacheImpl = new ImageCacheImpl();
21 | }
22 |
23 | public static App getInstance() {
24 | return sApp;
25 | }
26 |
27 | public ImageCache getImageCache() {
28 | return mImageCacheImpl;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/java/com/hsalf/menuanim/MenuActivity.java:
--------------------------------------------------------------------------------
1 | package com.hsalf.menuanim;
2 |
3 | import android.os.Bundle;
4 | import android.support.annotation.Nullable;
5 | import android.support.v7.app.AppCompatActivity;
6 | import android.support.v7.widget.LinearLayoutManager;
7 | import android.support.v7.widget.RecyclerView;
8 |
9 | import com.hsalf.menuanim.adapter.MenuAdapter;
10 | import com.hsalf.menuanim.dto.Card;
11 |
12 | import java.util.ArrayList;
13 | import java.util.List;
14 |
15 | public class MenuActivity extends AppCompatActivity {
16 |
17 | private static final String TAG = "MenuActivity";
18 |
19 | private MenuAdapter mMenuAdapter;
20 | private RecyclerView mRecyclerView;
21 |
22 | @Override
23 | protected void onCreate(@Nullable Bundle savedInstanceState) {
24 | super.onCreate(savedInstanceState);
25 | setContentView(R.layout.activity_menu);
26 | mRecyclerView = (RecyclerView) findViewById(R.id.menu_list);
27 | mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
28 | mMenuAdapter = new MenuAdapter(getList());
29 | mRecyclerView.setAdapter(mMenuAdapter);
30 | mRecyclerView.setOnScrollListener(new RecyclerView.OnScrollListener() {
31 | @Override
32 | public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
33 | super.onScrollStateChanged(recyclerView, newState);
34 | }
35 |
36 | @Override
37 | public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
38 | super.onScrolled(recyclerView, dx, dy);
39 | int count = mRecyclerView.getChildCount();
40 | for (int i = 0; i < count; i++) {
41 | MenuAdapter.MenuViewHolder holder = (MenuAdapter.MenuViewHolder)
42 | mRecyclerView.getChildViewHolder(mRecyclerView.getChildAt(i));
43 | mMenuAdapter.invalidateSlider(holder);
44 | }
45 | }
46 | });
47 | }
48 |
49 | private List getList() {
50 | List images = new ArrayList<>();
51 | images.add(new Card(R.drawable.kauai_hawaii, "Kauai, Hawaii"));
52 | images.add(new Card(R.drawable.bora_bora, "Bora Bora, French Polynesia"));
53 | images.add(new Card(R.drawable.taj_mahal_india, "Taj Mahal, India"));
54 | images.add(new Card(R.drawable.rice_terrace_longsheng,
55 | "Rice terrace fields of Longsheng, China"));
56 | images.add(new Card(R.drawable.rainbow_mountains,
57 | "Rainbow Mountains of Zhangye Danxia, China"));
58 | images.add(new Card(R.drawable.railay_thailand, "Railay, Thailand"));
59 | images.add(new Card(R.drawable.neuschwanstein_castle_germany,
60 | "Neuschwanstein Castle, Germany"));
61 | images.add(new Card(R.drawable.antarctica, "Antarctica"));
62 | images.add(new Card(R.drawable.tracy_arm_fjord_alaska,
63 | "Tracy Arm Fjord, Alaska"));
64 | images.add(new Card(R.drawable.torres_del_paine_patagonia,
65 | "Torres Del Paine Patagonia, Chile"));
66 | images.add(new Card(R.drawable.svalbard_norway,
67 | "Svalbard, Norway "));
68 | images.add(new Card(R.drawable.bagan_myanmar, "Temples of Bagan, Burma (Myanmar) "));
69 | images.add(new Card(R.drawable.petra_jordan, "Petra, Jordan"));
70 | images.add(new Card(R.drawable.machu_picchu_peru, "Machu Picchu, Peru"));
71 | images.add(new Card(R.drawable.venice_italy, "Venice, Italy"));
72 | images.add(new Card(R.drawable.pyramids_giza_egypt, "Giza Pyramids, Egypt"));
73 | images.add(new Card(R.drawable.ta_prohm_cambodia, "Ta Prohm, Cambodia"));
74 | images.add(Card.createDummy());
75 | return images;
76 | }
77 |
78 | }
79 |
--------------------------------------------------------------------------------
/app/src/main/java/com/hsalf/menuanim/adapter/MenuAdapter.java:
--------------------------------------------------------------------------------
1 | package com.hsalf.menuanim.adapter;
2 |
3 | import android.animation.IntEvaluator;
4 | import android.graphics.Bitmap;
5 | import android.support.v7.widget.CardView;
6 | import android.support.v7.widget.RecyclerView;
7 | import android.view.LayoutInflater;
8 | import android.view.View;
9 | import android.view.ViewGroup;
10 | import android.view.animation.AccelerateDecelerateInterpolator;
11 | import android.view.animation.Interpolator;
12 | import android.widget.TextView;
13 |
14 | import com.hsalf.menuanim.App;
15 | import com.hsalf.menuanim.utils.ImageCacheImpl;
16 | import com.hsalf.menuanim.R;
17 | import com.hsalf.menuanim.dto.Card;
18 | import com.hsalf.menuanim.widgets.SliderImageView;
19 |
20 | import java.util.ArrayList;
21 | import java.util.HashSet;
22 | import java.util.List;
23 | import java.util.Set;
24 |
25 | public class MenuAdapter extends RecyclerView.Adapter implements ImageCacheImpl.Callback {
26 |
27 | private static final String TAG = "MenuAdapter";
28 | private List mImages = new ArrayList<>();
29 | private IntEvaluator mIntEvaluator = new IntEvaluator();
30 | private Interpolator mInterpolator = new AccelerateDecelerateInterpolator();
31 | private Set mReferences = new HashSet<>();
32 |
33 | public MenuAdapter(List images) {
34 | mImages = images;
35 | }
36 |
37 | @Override
38 | public MenuViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
39 | /*return new MenuViewHolder(View.inflate(App.getInstance(),
40 | R.layout.inflater_menu_item, null));*/
41 | return new MenuViewHolder(LayoutInflater.from(parent.getContext())
42 | .inflate(R.layout.inflater_menu_item, parent, false));
43 |
44 | }
45 |
46 | @Override
47 | public void onBindViewHolder(MenuViewHolder holder, int position) {
48 | Card card = mImages.get(position);
49 | if (card.isDummy()) {
50 | holder.itemView.setVisibility(View.INVISIBLE);
51 | return;
52 | }
53 | holder.itemView.setVisibility(View.VISIBLE);
54 | holder.imageCard.setImageBitmap(null);
55 | holder.content.setText(card.content);
56 | holder.card = card;
57 | mReferences.add(holder);
58 | Bitmap bitmap = App.getInstance().getImageCache().getBitmap(holder.imageCard,
59 | card.image, this);
60 | if (bitmap != null) {
61 | holder.imageCard.setImageBitmap(bitmap);
62 | }
63 | }
64 |
65 | @Override
66 | public int getItemCount() {
67 | return mImages.size();
68 | }
69 |
70 | @Override
71 | public void onGotBitmap(int res, Bitmap value) {
72 | for (MenuViewHolder holder : new HashSet<>(mReferences)) {
73 | if (holder.card.image == res) {
74 | holder.imageCard.setImageBitmap(value);
75 | mReferences.remove(holder);
76 | return;
77 | }
78 | }
79 | }
80 |
81 | public void invalidateSlider(MenuViewHolder holder) {
82 | SliderImageView imageCard = holder.imageCard;
83 | float top = holder.itemView.getTop() + holder.itemView.getMeasuredHeight();
84 | float height = App.getInstance().getResources().getDisplayMetrics().heightPixels
85 | + holder.itemView.getMeasuredHeight();
86 | float containerFraction = 0;
87 | if (top > height / 2) {
88 | containerFraction = mInterpolator.getInterpolation((top - height / 2) / (height / 2));
89 | }
90 | int end = App.getInstance()
91 | .getResources().getDimensionPixelSize(R.dimen.dp_25);
92 | int start = (holder.itemView.getMeasuredWidth() / 2) - (imageCard.getMeasuredWidth() / 2);
93 | imageCard.setX(mIntEvaluator.evaluate(1f - containerFraction, start,
94 | holder.itemView.getMeasuredWidth() - imageCard.getMeasuredWidth() - end));
95 | holder.contentView.setX(mIntEvaluator.evaluate(1f - containerFraction, start, end));
96 | imageCard.setAnimationFactor(1f - containerFraction);
97 | }
98 |
99 | public static class MenuViewHolder extends RecyclerView.ViewHolder {
100 | public Card card;
101 | public TextView content;
102 | public CardView contentView;
103 | public SliderImageView imageCard;
104 |
105 | public MenuViewHolder(View itemView) {
106 | super(itemView);
107 | content = (TextView) itemView.findViewById(R.id.content);
108 | contentView = (CardView) itemView.findViewById(R.id.contentView);
109 | imageCard = (SliderImageView) itemView.findViewById(R.id.sliderImageView);
110 | }
111 | }
112 | }
113 |
--------------------------------------------------------------------------------
/app/src/main/java/com/hsalf/menuanim/dto/Card.java:
--------------------------------------------------------------------------------
1 | package com.hsalf.menuanim.dto;
2 |
3 | import android.support.annotation.DrawableRes;
4 |
5 | public class Card {
6 |
7 | public int image;
8 | public String content;
9 | private boolean dummy;
10 |
11 | private Card() {
12 | dummy = true;
13 | }
14 |
15 | public Card(@DrawableRes int res, String content) {
16 | this.image = res;
17 | this.content = content;
18 | }
19 |
20 | public boolean isDummy() {
21 | return dummy;
22 | }
23 |
24 | public static Card createDummy() {
25 | return new Card();
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/hsalf/menuanim/utils/BitmapHelper.java:
--------------------------------------------------------------------------------
1 | package com.hsalf.menuanim.utils;
2 |
3 | import android.content.Context;
4 | import android.graphics.Bitmap;
5 | import android.graphics.BitmapFactory;
6 | import android.support.annotation.IntDef;
7 |
8 | import java.lang.annotation.Retention;
9 | import java.lang.annotation.RetentionPolicy;
10 |
11 | public class BitmapHelper {
12 |
13 | private static final String TAG = "BitmapHelper";
14 |
15 | public static final int FIT = 0;
16 | public static final int FILL = 1;
17 |
18 | @Retention(RetentionPolicy.SOURCE)
19 | @IntDef({FIT, FILL})
20 | public @interface Mode {
21 |
22 | }
23 |
24 | public static Bitmap getBitmapFromRes(Context context, Builder builder) {
25 | BitmapFactory.Options op = prepareOptions(context, builder);
26 | op.inPreferredConfig = Bitmap.Config.ARGB_8888;
27 | return BitmapFactory.decodeResource(context.getResources(), builder.res, op);
28 | }
29 |
30 | public static BitmapFactory.Options prepareOptions(Context context, Builder builder) {
31 | BitmapFactory.Options options = new BitmapFactory.Options();
32 | BitmapFactory.Options dimensOptions = getDimensions(context, builder.res);
33 | int scale = 1;
34 | boolean fit = FIT == builder.mode; // Currently always in fill mode
35 | if (builder.forHeight < 1 || builder.forWidth < 1) {
36 | options.inSampleSize = scale;
37 | return options;
38 | }
39 | if (dimensOptions.outHeight > dimensOptions.outWidth) {
40 | scale = getScaleFactor(fit ? dimensOptions.outWidth : dimensOptions.outHeight,
41 | fit ? builder.forWidth : builder.forHeight);
42 | } else {
43 | scale = getScaleFactor(fit ? dimensOptions.outHeight : dimensOptions.outWidth,
44 | fit ? builder.forHeight : builder.forWidth);
45 | }
46 | options.inSampleSize = scale;
47 | options.inScaled = true;
48 | options.inDensity = fit ? dimensOptions.outWidth : dimensOptions.outHeight;
49 | options.inTargetDensity = (fit ? builder.forWidth : builder.forHeight) * options.inSampleSize;
50 | return options;
51 | }
52 |
53 | public static int getScaleFactor(int originalDimen, int targetDimen) {
54 | int scale = 1;
55 | if (originalDimen > targetDimen) {
56 | int halfDimen = originalDimen / 2;
57 | while (halfDimen / scale > targetDimen) {
58 | scale *= 2;
59 | }
60 | }
61 | return scale;
62 | }
63 |
64 | public static BitmapFactory.Options getDimensions(Context context, int res) {
65 | BitmapFactory.Options options = new BitmapFactory.Options();
66 | options.inJustDecodeBounds = true;
67 | BitmapFactory.decodeResource(context.getResources(), res, options);
68 | return options;
69 | }
70 |
71 | public static class Builder {
72 | public final int res;
73 | @Mode
74 | public int mode = FILL;
75 | public int forWidth;
76 | public int forHeight;
77 |
78 | public Builder(int res) {
79 | this.res = res;
80 | }
81 | }
82 |
83 | }
84 |
--------------------------------------------------------------------------------
/app/src/main/java/com/hsalf/menuanim/utils/ImageCache.java:
--------------------------------------------------------------------------------
1 | package com.hsalf.menuanim.utils;
2 |
3 |
4 | import android.graphics.Bitmap;
5 | import android.view.View;
6 |
7 | public interface ImageCache {
8 | Bitmap getBitmap(int res, ImageCacheImpl.Callback callback);
9 |
10 | Bitmap getBitmap(int res, ImageCacheImpl.Callback callback,
11 | int width, int height);
12 |
13 | Bitmap getBitmap(View target, int res, ImageCacheImpl.Callback callback);
14 | }
15 |
--------------------------------------------------------------------------------
/app/src/main/java/com/hsalf/menuanim/utils/ImageCacheImpl.java:
--------------------------------------------------------------------------------
1 | package com.hsalf.menuanim.utils;
2 |
3 | import android.graphics.Bitmap;
4 | import android.util.Log;
5 | import android.util.LruCache;
6 | import android.view.View;
7 |
8 | import java.util.HashMap;
9 | import java.util.Map;
10 |
11 | public class ImageCacheImpl extends ImageLoaderImpl implements ImageCache {
12 |
13 | private static final String TAG = "ImageCacheImpl";
14 |
15 | private LruCache mLruCache;
16 | private Map mTasks = new HashMap<>();
17 |
18 | public ImageCacheImpl() {
19 | int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024);
20 | Log.i(TAG, "Allocated memory: " + maxMemory);
21 | mLruCache = new LruCache(maxMemory) {
22 | @Override
23 | protected int sizeOf(Integer res, Bitmap bitmap) {
24 | // Just returning image size in kb
25 | return bitmap.getByteCount() / 1024;
26 | }
27 | };
28 | }
29 |
30 | public boolean isBitmapAvailable(int res) {
31 | return mLruCache.get(res) != null;
32 | }
33 |
34 | public Bitmap getBitmap(int res, Callback callback) {
35 | return getBitmap(res, callback, -1, -1);
36 | }
37 |
38 | public Bitmap getBitmap(int res, Callback callback, int width, int height) {
39 | if (isBitmapAvailable(res)) {
40 | return mLruCache.get(res);
41 | }
42 | mTasks.put(res, callback);
43 | loadBitmap(res, width, height);
44 | return null;
45 | }
46 |
47 | @Override
48 | public Bitmap getBitmap(final View target, final int res, final Callback callback) {
49 | if (isBitmapAvailable(res)) {
50 | return mLruCache.get(res);
51 | }
52 | target.post(new Runnable() {
53 | @Override
54 | public void run() {
55 | getBitmap(res, callback, target.getMeasuredWidth(), target.getMeasuredHeight());
56 | }
57 | });
58 | return null;
59 | }
60 |
61 | @Override
62 | protected void onGotBitmap(int res, Bitmap bitmap) {
63 | if (bitmap == null) {
64 | Log.w(TAG, "No bitmap available for: " + res);
65 | return;
66 | }
67 | mLruCache.put(res, bitmap);
68 | if (mTasks.containsKey(res)) {
69 | mTasks.get(res).onGotBitmap(res, bitmap);
70 | mTasks.remove(res);
71 | }
72 | }
73 |
74 | public interface Callback {
75 | void onGotBitmap(int res, Bitmap value);
76 | }
77 |
78 | }
79 |
--------------------------------------------------------------------------------
/app/src/main/java/com/hsalf/menuanim/utils/ImageLoaderImpl.java:
--------------------------------------------------------------------------------
1 | package com.hsalf.menuanim.utils;
2 |
3 | import android.graphics.Bitmap;
4 | import android.os.Handler;
5 | import android.os.HandlerThread;
6 | import android.os.Looper;
7 | import android.os.Message;
8 | import android.util.Log;
9 |
10 | import com.hsalf.menuanim.App;
11 |
12 | import java.util.concurrent.Executor;
13 | import java.util.concurrent.Executors;
14 |
15 | public abstract class ImageLoaderImpl extends HandlerThread {
16 |
17 | private static final String TAG = "ImageLoaderImpl";
18 | private static final int LOAD_BITMAP = 90;
19 |
20 | private Handler mMainHandler;
21 | private Handler mThreadHandler;
22 | private Executor mThreadPoolExecutor = Executors.newFixedThreadPool(20);
23 |
24 | protected ImageLoaderImpl() {
25 | super(TAG);
26 | start();
27 | mThreadHandler = new Handler(getLooper()) {
28 | @Override
29 | public void handleMessage(Message msg) {
30 | super.handleMessage(msg);
31 | processMessage(msg);
32 | }
33 | };
34 | mMainHandler = new Handler(Looper.getMainLooper());
35 | }
36 |
37 | private void processMessage(final Message msg) {
38 | if (LOAD_BITMAP == msg.what) {
39 | Log.i(TAG, "Fetch: " + msg.obj);
40 | final BitmapHelper.Builder builder = new BitmapHelper.Builder((int) msg.obj);
41 | builder.forWidth = msg.arg1;
42 | builder.forHeight = msg.arg2;
43 | mThreadPoolExecutor.execute(new Runnable() {
44 | @Override
45 | public void run() {
46 | final Bitmap loadBitmap = BitmapHelper.getBitmapFromRes(App.getInstance(),
47 | builder);
48 | mMainHandler.post(new Runnable() {
49 | @Override
50 | public void run() {
51 | onGotBitmap(builder.res, loadBitmap);
52 | }
53 | });
54 | }
55 | });
56 | }
57 | }
58 |
59 | protected abstract void onGotBitmap(int res, Bitmap bitmap);
60 |
61 | protected void loadBitmap(int res, int width, int height) {
62 | mThreadHandler.sendMessage(mThreadHandler.obtainMessage(LOAD_BITMAP, width, height, res));
63 | }
64 |
65 | }
66 |
--------------------------------------------------------------------------------
/app/src/main/java/com/hsalf/menuanim/widgets/CardColorLayout.java:
--------------------------------------------------------------------------------
1 | package com.hsalf.menuanim.widgets;
2 |
3 | import android.content.Context;
4 | import android.graphics.Canvas;
5 | import android.graphics.Paint;
6 | import android.support.v4.content.ContextCompat;
7 | import android.util.AttributeSet;
8 | import android.widget.RelativeLayout;
9 |
10 | import com.hsalf.menuanim.R;
11 |
12 | public class CardColorLayout extends RelativeLayout {
13 |
14 | private static final String TAG = "CardColorLayout";
15 |
16 | private Paint mFillPaint = new Paint();
17 |
18 | public CardColorLayout(Context context) {
19 | super(context);
20 | }
21 |
22 | public CardColorLayout(Context context, AttributeSet attrs) {
23 | super(context, attrs);
24 | }
25 |
26 | public CardColorLayout(Context context, AttributeSet attrs, int defStyleAttr) {
27 | super(context, attrs, defStyleAttr);
28 | }
29 |
30 | @Override
31 | protected void onFinishInflate() {
32 | super.onFinishInflate();
33 | setWillNotDraw(false);
34 | mFillPaint.setAntiAlias(true);
35 | mFillPaint.setStyle(Paint.Style.FILL);
36 | mFillPaint.setColor(ContextCompat.getColor(getContext(), R.color.cardColor));
37 | }
38 |
39 | @Override
40 | protected void onDraw(Canvas canvas) {
41 | super.onDraw(canvas);
42 | canvas.drawRect(0, getMeasuredHeight() * 0.25f, getMeasuredWidth(), getMeasuredHeight(), mFillPaint);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/app/src/main/java/com/hsalf/menuanim/widgets/SliderDrawable.java:
--------------------------------------------------------------------------------
1 | package com.hsalf.menuanim.widgets;
2 |
3 | import android.graphics.Bitmap;
4 | import android.graphics.Canvas;
5 | import android.graphics.ColorFilter;
6 | import android.graphics.PixelFormat;
7 | import android.graphics.drawable.Drawable;
8 |
9 | public class SliderDrawable extends Drawable {
10 |
11 | private static final String TAG = "SliderDrawable";
12 |
13 | private Bitmap mBitmap;
14 |
15 | @Override
16 | public void draw(Canvas canvas) {
17 |
18 | }
19 |
20 | @Override
21 | public void setAlpha(int alpha) {
22 |
23 | }
24 |
25 | @Override
26 | public void setColorFilter(ColorFilter colorFilter) {
27 |
28 | }
29 |
30 | public void setImage(Bitmap bitmap) {
31 | mBitmap = bitmap;
32 | invalidateSelf();
33 | }
34 |
35 | @Override
36 | public int getOpacity() {
37 | return PixelFormat.TRANSLUCENT;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/app/src/main/java/com/hsalf/menuanim/widgets/SliderImageView.java:
--------------------------------------------------------------------------------
1 | package com.hsalf.menuanim.widgets;
2 |
3 | import android.animation.IntEvaluator;
4 | import android.content.Context;
5 | import android.graphics.Bitmap;
6 | import android.graphics.Canvas;
7 | import android.graphics.Paint;
8 | import android.graphics.Rect;
9 | import android.support.v7.widget.CardView;
10 | import android.util.AttributeSet;
11 | import android.view.View;
12 |
13 | public class SliderImageView extends CardView {
14 |
15 | private static final String TAG = "SliderImageView";
16 |
17 | private Bitmap mBitmapImage;
18 | private float mAnimateFactor = 0f;
19 | private Rect mSrcBounds = new Rect();
20 | private Rect mDrawBounds = new Rect();
21 | private Paint mBitmapPaint = new Paint();
22 | private IntEvaluator mIntEvaluator = new IntEvaluator();
23 |
24 | public SliderImageView(Context context) {
25 | super(context);
26 | init();
27 | }
28 |
29 | public SliderImageView(Context context, AttributeSet attrs) {
30 | super(context, attrs);
31 | init();
32 | }
33 |
34 | public SliderImageView(Context context, AttributeSet attrs, int defStyleAttr) {
35 | super(context, attrs, defStyleAttr);
36 | init();
37 | }
38 |
39 | private void init() {
40 |
41 | }
42 |
43 | public void setImageBitmap(Bitmap bitmap) {
44 | mBitmapImage = bitmap;
45 | invalidate();
46 | }
47 |
48 | public void setAnimationFactor(float factor) {
49 | if (factor < 0 || factor > 1) {
50 | return;
51 | }
52 | mAnimateFactor = 1 - factor;
53 | invalidate();
54 | }
55 |
56 | @Override
57 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
58 | super.onMeasure(widthMeasureSpec, heightMeasureSpec);
59 | mSrcBounds.set(0, 0, getMeasuredWidth(), getMeasuredHeight());
60 | mDrawBounds.set(0, 0, mSrcBounds.right, mSrcBounds.bottom);
61 | invalidate();
62 | }
63 |
64 | @Override
65 | protected void onDraw(Canvas canvas) {
66 | super.onDraw(canvas);
67 | if (mBitmapImage != null) {
68 | int range = mBitmapImage.getWidth() - mDrawBounds.width();
69 | mSrcBounds.left = Math.round(mAnimateFactor * range);
70 | mSrcBounds.right = mDrawBounds.width() + mSrcBounds.left;
71 | canvas.drawBitmap(mBitmapImage, mSrcBounds, mDrawBounds, mBitmapPaint);
72 | }
73 | }
74 |
75 | }
76 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/antarctica.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sujithkanna/MenuCardAnimation/b74938fd5bda66120b1556473c783d4807bde613/app/src/main/res/drawable/antarctica.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bagan_myanmar.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sujithkanna/MenuCardAnimation/b74938fd5bda66120b1556473c783d4807bde613/app/src/main/res/drawable/bagan_myanmar.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bora_bora.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sujithkanna/MenuCardAnimation/b74938fd5bda66120b1556473c783d4807bde613/app/src/main/res/drawable/bora_bora.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/kauai_hawaii.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sujithkanna/MenuCardAnimation/b74938fd5bda66120b1556473c783d4807bde613/app/src/main/res/drawable/kauai_hawaii.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/machu_picchu_peru.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sujithkanna/MenuCardAnimation/b74938fd5bda66120b1556473c783d4807bde613/app/src/main/res/drawable/machu_picchu_peru.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/neuschwanstein_castle_germany.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sujithkanna/MenuCardAnimation/b74938fd5bda66120b1556473c783d4807bde613/app/src/main/res/drawable/neuschwanstein_castle_germany.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/petra_jordan.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sujithkanna/MenuCardAnimation/b74938fd5bda66120b1556473c783d4807bde613/app/src/main/res/drawable/petra_jordan.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/pyramids_giza_egypt.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sujithkanna/MenuCardAnimation/b74938fd5bda66120b1556473c783d4807bde613/app/src/main/res/drawable/pyramids_giza_egypt.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/railay_thailand.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sujithkanna/MenuCardAnimation/b74938fd5bda66120b1556473c783d4807bde613/app/src/main/res/drawable/railay_thailand.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/rainbow_mountains.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sujithkanna/MenuCardAnimation/b74938fd5bda66120b1556473c783d4807bde613/app/src/main/res/drawable/rainbow_mountains.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/rice_terrace_longsheng.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sujithkanna/MenuCardAnimation/b74938fd5bda66120b1556473c783d4807bde613/app/src/main/res/drawable/rice_terrace_longsheng.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/svalbard_norway.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sujithkanna/MenuCardAnimation/b74938fd5bda66120b1556473c783d4807bde613/app/src/main/res/drawable/svalbard_norway.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ta_prohm_cambodia.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sujithkanna/MenuCardAnimation/b74938fd5bda66120b1556473c783d4807bde613/app/src/main/res/drawable/ta_prohm_cambodia.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/taj_mahal_india.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sujithkanna/MenuCardAnimation/b74938fd5bda66120b1556473c783d4807bde613/app/src/main/res/drawable/taj_mahal_india.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/torres_del_paine_patagonia.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sujithkanna/MenuCardAnimation/b74938fd5bda66120b1556473c783d4807bde613/app/src/main/res/drawable/torres_del_paine_patagonia.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/tracy_arm_fjord_alaska.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sujithkanna/MenuCardAnimation/b74938fd5bda66120b1556473c783d4807bde613/app/src/main/res/drawable/tracy_arm_fjord_alaska.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/venice_italy.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sujithkanna/MenuCardAnimation/b74938fd5bda66120b1556473c783d4807bde613/app/src/main/res/drawable/venice_italy.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/yellowstone_bison.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sujithkanna/MenuCardAnimation/b74938fd5bda66120b1556473c783d4807bde613/app/src/main/res/drawable/yellowstone_bison.jpg
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
14 |
15 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/inflater_menu_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
19 |
20 |
29 |
30 |
31 |
32 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sujithkanna/MenuCardAnimation/b74938fd5bda66120b1556473c783d4807bde613/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sujithkanna/MenuCardAnimation/b74938fd5bda66120b1556473c783d4807bde613/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sujithkanna/MenuCardAnimation/b74938fd5bda66120b1556473c783d4807bde613/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sujithkanna/MenuCardAnimation/b74938fd5bda66120b1556473c783d4807bde613/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sujithkanna/MenuCardAnimation/b74938fd5bda66120b1556473c783d4807bde613/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #b8e478
5 | #303F9F
6 | #FF4081
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 | 25dp
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | ImageLoader
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/test/java/com/hsalf/menuanim/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.hsalf.menuanim;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/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.2.3'
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.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------