├── .gitignore
├── .idea
├── compiler.xml
├── copyright
│ └── profiles_settings.xml
├── encodings.xml
├── gradle.xml
├── misc.xml
├── modules.xml
├── runConfigurations.xml
└── vcs.xml
├── README.md
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── allandroidprojects
│ │ └── ecomsample
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── allandroidprojects
│ │ │ └── ecomsample
│ │ │ ├── cache
│ │ │ ├── FileCache.java
│ │ │ ├── FileUtils.java
│ │ │ └── ImagePipelineConfigFactory.java
│ │ │ ├── fragments
│ │ │ ├── HackyViewPager.java
│ │ │ ├── ImageListFragment.java
│ │ │ └── ViewPagerActivity.java
│ │ │ ├── log
│ │ │ ├── LogManager.java
│ │ │ ├── Logger.java
│ │ │ └── LoggerDefault.java
│ │ │ ├── miscellaneous
│ │ │ ├── CustomProgressbarDrawable.java
│ │ │ ├── EmptyActivity.java
│ │ │ └── ImageDownloadListener.java
│ │ │ ├── notification
│ │ │ ├── BadgeDrawable.java
│ │ │ ├── NotificationCountSetClass.java
│ │ │ └── SetNotificationCount.java
│ │ │ ├── options
│ │ │ ├── CartListActivity.java
│ │ │ ├── SearchResultActivity.java
│ │ │ └── WishlistActivity.java
│ │ │ ├── photoview
│ │ │ ├── gestures
│ │ │ │ ├── CupcakeGestureDetector.java
│ │ │ │ ├── EclairGestureDetector.java
│ │ │ │ ├── FroyoGestureDetector.java
│ │ │ │ ├── GestureDetector.java
│ │ │ │ ├── OnGestureListener.java
│ │ │ │ └── VersionedGestureDetector.java
│ │ │ ├── scrollerproxy
│ │ │ │ ├── GingerScroller.java
│ │ │ │ ├── IcsScroller.java
│ │ │ │ ├── PreGingerScroller.java
│ │ │ │ └── ScrollerProxy.java
│ │ │ └── view
│ │ │ │ ├── Compat.java
│ │ │ │ ├── DefaultOnDoubleTapListener.java
│ │ │ │ ├── IPhotoView.java
│ │ │ │ ├── PhotoView.java
│ │ │ │ └── PhotoViewAttacher.java
│ │ │ ├── product
│ │ │ └── ItemDetailsActivity.java
│ │ │ ├── startup
│ │ │ ├── FrescoApplication.java
│ │ │ ├── MainActivity.java
│ │ │ ├── SplashActivity.java
│ │ │ └── WelcomeActivity.java
│ │ │ └── utility
│ │ │ ├── ImageUrlUtils.java
│ │ │ └── PrefManager.java
│ └── res
│ │ ├── anim
│ │ └── animation_fade_in.xml
│ │ ├── drawable-hdpi
│ │ ├── ic_account_circle_black_48dp.png
│ │ ├── ic_book_black_24dp.png
│ │ ├── ic_card_giftcard_black_24dp.png
│ │ ├── ic_clear_black_18dp.png
│ │ ├── ic_delete_black_24dp.png
│ │ ├── ic_discount.png
│ │ ├── ic_favorite_black_18dp.png
│ │ ├── ic_favorite_black_24dp.png
│ │ ├── ic_favorite_border_black_18dp.png
│ │ ├── ic_filter_none_black_18dp.png
│ │ ├── ic_food.png
│ │ ├── ic_local_dining_black_24dp.png
│ │ ├── ic_local_offer_black_24dp.png
│ │ ├── ic_mode_edit_black_18dp.png
│ │ ├── ic_more_black_24dp.png
│ │ ├── ic_movie.png
│ │ ├── ic_notifications_white_24dp.png
│ │ ├── ic_person_black_24dp.png
│ │ ├── ic_search_white_24dp.png
│ │ ├── ic_share_black_18dp.png
│ │ ├── ic_shopping_basket_black_24dp.png
│ │ ├── ic_shopping_cart_black_24dp.png
│ │ ├── ic_shopping_cart_white_24dp.png
│ │ ├── ic_smartphone_black_24dp.png
│ │ ├── ic_travel.png
│ │ └── ic_wc_black_24dp.png
│ │ ├── drawable-mdpi
│ │ ├── ic_account_circle_black_48dp.png
│ │ ├── ic_book_black_24dp.png
│ │ ├── ic_card_giftcard_black_24dp.png
│ │ ├── ic_clear_black_18dp.png
│ │ ├── ic_delete_black_24dp.png
│ │ ├── ic_discount.png
│ │ ├── ic_favorite_black_18dp.png
│ │ ├── ic_favorite_black_24dp.png
│ │ ├── ic_favorite_border_black_18dp.png
│ │ ├── ic_filter_none_black_18dp.png
│ │ ├── ic_food.png
│ │ ├── ic_local_dining_black_24dp.png
│ │ ├── ic_local_offer_black_24dp.png
│ │ ├── ic_mode_edit_black_18dp.png
│ │ ├── ic_more_black_24dp.png
│ │ ├── ic_movie.png
│ │ ├── ic_notifications_white_24dp.png
│ │ ├── ic_person_black_24dp.png
│ │ ├── ic_search_white_24dp.png
│ │ ├── ic_share_black_18dp.png
│ │ ├── ic_shopping_basket_black_24dp.png
│ │ ├── ic_shopping_cart_black_24dp.png
│ │ ├── ic_shopping_cart_white_24dp.png
│ │ ├── ic_smartphone_black_24dp.png
│ │ ├── ic_travel.png
│ │ └── ic_wc_black_24dp.png
│ │ ├── drawable-v21
│ │ ├── ic_menu_camera.xml
│ │ ├── ic_menu_gallery.xml
│ │ ├── ic_menu_manage.xml
│ │ ├── ic_menu_send.xml
│ │ ├── ic_menu_share.xml
│ │ └── ic_menu_slideshow.xml
│ │ ├── drawable-xhdpi
│ │ ├── ic_account_circle_black_48dp.png
│ │ ├── ic_book_black_24dp.png
│ │ ├── ic_card_giftcard_black_24dp.png
│ │ ├── ic_clear_black_18dp.png
│ │ ├── ic_delete_black_24dp.png
│ │ ├── ic_discount.png
│ │ ├── ic_favorite_black_18dp.png
│ │ ├── ic_favorite_black_24dp.png
│ │ ├── ic_favorite_border_black_18dp.png
│ │ ├── ic_filter_none_black_18dp.png
│ │ ├── ic_food.png
│ │ ├── ic_local_dining_black_24dp.png
│ │ ├── ic_local_offer_black_24dp.png
│ │ ├── ic_mode_edit_black_18dp.png
│ │ ├── ic_more_black_24dp.png
│ │ ├── ic_movie.png
│ │ ├── ic_notifications_white_24dp.png
│ │ ├── ic_person_black_24dp.png
│ │ ├── ic_search_white_24dp.png
│ │ ├── ic_share_black_18dp.png
│ │ ├── ic_shopping_basket_black_24dp.png
│ │ ├── ic_shopping_cart_black_24dp.png
│ │ ├── ic_shopping_cart_white_24dp.png
│ │ ├── ic_smartphone_black_24dp.png
│ │ ├── ic_travel.png
│ │ └── ic_wc_black_24dp.png
│ │ ├── drawable-xxhdpi
│ │ ├── ic_account_circle_black_48dp.png
│ │ ├── ic_apps_black_48dp.png
│ │ ├── ic_book_black_24dp.png
│ │ ├── ic_card_giftcard_black_24dp.png
│ │ ├── ic_clear_black_18dp.png
│ │ ├── ic_delete_black_24dp.png
│ │ ├── ic_discount.png
│ │ ├── ic_favorite_black_18dp.png
│ │ ├── ic_favorite_black_24dp.png
│ │ ├── ic_favorite_border_black_18dp.png
│ │ ├── ic_filter_none_black_18dp.png
│ │ ├── ic_food.png
│ │ ├── ic_local_dining_black_24dp.png
│ │ ├── ic_local_offer_black_24dp.png
│ │ ├── ic_more_black_24dp.png
│ │ ├── ic_movie.png
│ │ ├── ic_notifications_white_24dp.png
│ │ ├── ic_person_black_24dp.png
│ │ ├── ic_search_white_24dp.png
│ │ ├── ic_share_black_18dp.png
│ │ ├── ic_shopping_basket_black_24dp.png
│ │ ├── ic_shopping_cart_black_24dp.png
│ │ ├── ic_shopping_cart_white_24dp.png
│ │ ├── ic_smartphone_black_24dp.png
│ │ ├── ic_travel.png
│ │ └── ic_wc_black_24dp.png
│ │ ├── drawable-xxxhdpi
│ │ ├── ic_discount.png
│ │ ├── ic_food.png
│ │ ├── ic_movie.png
│ │ └── ic_travel.png
│ │ ├── drawable
│ │ └── ic_menu_notifications.xml
│ │ ├── layout
│ │ ├── activity_cart_list.xml
│ │ ├── activity_empty.xml
│ │ ├── activity_item_details.xml
│ │ ├── activity_main.xml
│ │ ├── activity_search_result.xml
│ │ ├── activity_splash.xml
│ │ ├── activity_view_pager.xml
│ │ ├── activity_welcome.xml
│ │ ├── app_bar_main.xml
│ │ ├── content_main.xml
│ │ ├── empty_message_layout_action.xml
│ │ ├── layout_cartlist_item.xml
│ │ ├── layout_recylerview_list.xml
│ │ ├── layout_wishlist_item.xml
│ │ ├── list_item.xml
│ │ ├── nav_header_main.xml
│ │ ├── welcome_slide1.xml
│ │ ├── welcome_slide2.xml
│ │ ├── welcome_slide3.xml
│ │ └── welcome_slide4.xml
│ │ ├── menu
│ │ ├── activity_main_drawer.xml
│ │ ├── main.xml
│ │ └── search_menu.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_bag.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_bag.png
│ │ ├── mipmap-xhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_bag.png
│ │ ├── mipmap-xxxhdpi
│ │ └── ic_launcher.png
│ │ ├── values-v21
│ │ └── styles.xml
│ │ ├── values-w820dp
│ │ └── dimens.xml
│ │ ├── values
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── drawables.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ │ └── xml
│ │ └── searchable.xml
│ └── test
│ └── java
│ └── com
│ └── allandroidprojects
│ └── ecomsample
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── screenshots
├── Screenshot_2016-11-04-11-15-57-793_com.allandroidprojects.ecomsample.jpg
├── Screenshot_2016-11-04-11-16-39-455_com.allandroidprojects.ecomsample.jpg
├── Screenshot_2016-11-04-11-17-25-951_com.allandroidprojects.ecomsample.png
├── Screenshot_2016-11-04-11-17-56-774_com.allandroidprojects.ecomsample.png
├── Screenshot_2016-11-04-11-18-40-835_com.allandroidprojects.ecomsample.png
└── Screenshot_2016-11-04-11-20-58-621_com.allandroidprojects.ecomsample.png
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 | .externalNativeBuild
10 |
--------------------------------------------------------------------------------
/.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 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
18 |
19 |
--------------------------------------------------------------------------------
/.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 |
51 |
52 |
53 | 1.8
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/.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 | ##EcomSample - Sample e-commerce Online Shopping App like flipkart, snapdeal, amazon
2 |
3 | When ever I used to open any online shopping app, I wanted to know the the mechanism behind loading items, images, data which are not in some limited size. As an Android developer I can understand that many beginners would be thinking to make android app like flipkart, snapdeal or amazon etc. So here is the EcomSample app with complete source code available in github. Sample app is available on PlayStore.
4 |
5 | Application has been designed using [fresco](https://github.com/facebook/fresco) library for image loading and caching. All new features like top eCommerce app have been added in this app. This app is best practice for Android Developers.
6 |
7 | [Find my more tutorials here ](http://allandroidprojects.blogspot.in/2016/11/ecomsample-sample-e-commerce-online.html)
8 |
9 | [Install EcomSample ](https://play.google.com/store/apps/details?id=com.allandroidprojects.ecomsample&hl=en)
10 |
11 |
12 | ###This app has below features:
13 |
14 | 1. Loading and caching images with RecyclerView and CardView.
15 | 2. Add to Cart and Wishlist, manage cart and wishlist.
16 | 3. Category wise items/products loading and caching in list.
17 | 4. Detailed item description.
18 | 5. All other options available in side Navigation Drawer.
19 | 6. Introslider at starting of application.
20 | 6. Material design based app.
21 |
22 |
23 | Note: Please consider the below points
24 |
25 | 1.The images are downloading from this site: https://www.pexels.com, But you can provide your own server urls to load the image.
26 |
27 | 2.Item description I have just hard coded only for showcase.
28 |
29 | Please feel free to comment for any clarification or suggestion.
30 |
31 | ###Screen shots:
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 24
5 | buildToolsVersion "24.0.1"
6 | defaultConfig {
7 | applicationId "com.allandroidprojects.ecomsample"
8 | minSdkVersion 15
9 | targetSdkVersion 24
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:24.2.1'
28 | compile 'com.android.support:design:24.2.1'
29 | testCompile 'junit:junit:4.12'
30 | compile 'com.android.support:cardview-v7:24.2.1'
31 | compile 'com.android.support:recyclerview-v7:24.2.1'
32 | compile 'com.facebook.fresco:fresco:0.14.1'
33 | }
34 |
--------------------------------------------------------------------------------
/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 E:\AndroidStudio1.4\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/allandroidprojects/ecomsample/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.allandroidprojects.ecomsample;
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.allandroidprojects.ecomsample", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
26 |
27 |
30 |
31 |
35 |
36 |
37 |
38 |
39 |
42 |
43 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/cache/FileCache.java:
--------------------------------------------------------------------------------
1 | package com.allandroidprojects.ecomsample.cache;
2 |
3 | /**
4 | * Created by 06peng on 2015-07-03.
5 | */
6 |
7 | import android.content.Context;
8 |
9 | import java.io.File;
10 |
11 | public class FileCache {
12 |
13 | private File cacheDir;
14 |
15 | public FileCache(Context context) {
16 | //Find the dir to save cached images
17 | if (android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED)) {
18 | cacheDir = new File(android.os.Environment.getExternalStorageDirectory(), "fresco_cache");
19 | } else {
20 | cacheDir = context.getCacheDir();
21 | }
22 | if (!cacheDir.exists()) {
23 | cacheDir.mkdirs();
24 | }
25 | }
26 |
27 | public File getCacheDir() {
28 | return cacheDir;
29 | }
30 |
31 | public File getFile(String url) {
32 | String filename = String.valueOf(url.hashCode());
33 | File f = new File(cacheDir, filename);
34 | if (f.exists()) {
35 | return f;
36 | }
37 | return null;
38 | }
39 |
40 | public void clear() {
41 | File[] files = cacheDir.listFiles();
42 | if (files == null) {
43 | return;
44 | }
45 | for (File f : files) {
46 | f.delete();
47 | }
48 | }
49 | }
50 |
51 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/cache/FileUtils.java:
--------------------------------------------------------------------------------
1 | package com.allandroidprojects.ecomsample.cache;
2 |
3 | /**
4 | * Created by 06peng on 2015-07-03.
5 | */
6 |
7 | import java.io.InputStream;
8 | import java.io.OutputStream;
9 |
10 | public class FileUtils {
11 | public static void CopyStream(InputStream is, OutputStream os) {
12 | final int buffer_size = 1024;
13 | try {
14 | byte[] bytes = new byte[buffer_size];
15 | for (; ; ) {
16 | int count = is.read(bytes, 0, buffer_size);
17 | if (count == -1)
18 | break;
19 | os.write(bytes, 0, count);
20 | }
21 | } catch (Exception ex) {
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/cache/ImagePipelineConfigFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file provided by Facebook is for non-commercial testing and evaluation
3 | * purposes only. Facebook reserves all rights not expressly granted.
4 | *
5 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
6 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
7 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
8 | * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
9 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
10 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 | */
12 |
13 | package com.allandroidprojects.ecomsample.cache;
14 |
15 |
16 | import android.content.Context;
17 | import android.os.Build;
18 | import android.os.Environment;
19 |
20 | import com.facebook.cache.disk.DiskCacheConfig;
21 | import com.facebook.common.internal.Supplier;
22 | import com.facebook.common.util.ByteConstants;
23 | import com.facebook.imagepipeline.cache.MemoryCacheParams;
24 | import com.facebook.imagepipeline.core.ImagePipelineConfig;
25 |
26 | import java.io.File;
27 |
28 | /**
29 | * Creates ImagePipeline configuration for the sample app
30 | */
31 | public class ImagePipelineConfigFactory {
32 | private static final String IMAGE_PIPELINE_CACHE_DIR = "imagepipeline_cache";
33 |
34 | private static ImagePipelineConfig sImagePipelineConfig;
35 | // private static ImagePipelineConfig sOkHttpImagePipelineConfig;
36 |
37 | private static final int MAX_HEAP_SIZE = (int) Runtime.getRuntime().maxMemory();
38 |
39 | public static final int MAX_DISK_CACHE_SIZE = 300 * ByteConstants.MB;
40 | public static final int MAX_MEMORY_CACHE_SIZE = MAX_HEAP_SIZE / 3;
41 |
42 | /**
43 | * Creates config using android http stack as network backend.
44 | */
45 | public static ImagePipelineConfig getImagePipelineConfig(Context context) {
46 | if (sImagePipelineConfig == null) {
47 | ImagePipelineConfig.Builder configBuilder = ImagePipelineConfig.newBuilder(context);
48 | configureCaches(configBuilder, context);
49 | sImagePipelineConfig = configBuilder.build();
50 | }
51 | return sImagePipelineConfig;
52 | }
53 |
54 | /**
55 | * Creates config using OkHttp as network backed.
56 | */
57 | /* public static ImagePipelineConfig getOkHttpImagePipelineConfig(Context context) {
58 | if (sOkHttpImagePipelineConfig == null) {
59 | OkHttpClient okHttpClient = new OkHttpClient();
60 | ImagePipelineConfig.Builder configBuilder =
61 | OkHttpImagePipelineConfigFactory.newBuilder(context, okHttpClient);
62 | configureCaches(configBuilder, context);
63 | sOkHttpImagePipelineConfig = configBuilder.build();
64 | }
65 | return sOkHttpImagePipelineConfig;
66 | }*/
67 |
68 | /**
69 | * Configures disk and memory cache not to exceed common limits
70 | */
71 | private static void configureCaches(ImagePipelineConfig.Builder configBuilder, Context context) {
72 | final MemoryCacheParams bitmapCacheParams = new MemoryCacheParams(
73 | MAX_MEMORY_CACHE_SIZE, // Max total size of elements in the cache
74 | Integer.MAX_VALUE, // Max entries in the cache
75 | MAX_MEMORY_CACHE_SIZE, // Max total size of elements in eviction queue
76 | Integer.MAX_VALUE, // Max length of eviction queue
77 | Integer.MAX_VALUE); // Max cache entry size
78 | configBuilder
79 | .setBitmapMemoryCacheParamsSupplier(
80 | new Supplier() {
81 | public MemoryCacheParams get() {
82 | return bitmapCacheParams;
83 | }
84 | })
85 | .setMainDiskCacheConfig(DiskCacheConfig.newBuilder(context)
86 | .setBaseDirectoryPath(getExternalCacheDir(context))
87 | .setBaseDirectoryName(IMAGE_PIPELINE_CACHE_DIR)
88 | .setMaxCacheSize(MAX_DISK_CACHE_SIZE)
89 | .build());
90 | }
91 |
92 | public static File getExternalCacheDir(final Context context) {
93 | if (hasExternalCacheDir())
94 | return context.getExternalCacheDir();
95 |
96 | // Before Froyo we need to construct the external cache dir ourselves
97 | final String cacheDir = "/Android/data/" + context.getPackageName() + "/cache/";
98 | return createFile(Environment.getExternalStorageDirectory().getPath() + cacheDir, "");
99 | }
100 |
101 | public static boolean hasExternalCacheDir() {
102 | return Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO;
103 | }
104 |
105 | public static File createFile(String folderPath, String fileName) {
106 | File destDir = new File(folderPath);
107 | if (!destDir.exists()) {
108 | destDir.mkdirs();
109 | }
110 | return new File(folderPath, fileName);
111 | }
112 |
113 |
114 | }
115 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/fragments/HackyViewPager.java:
--------------------------------------------------------------------------------
1 | package com.allandroidprojects.ecomsample.fragments;
2 |
3 | import android.content.Context;
4 | import android.support.v4.view.ViewPager;
5 | import android.util.AttributeSet;
6 | import android.view.MotionEvent;
7 |
8 | /**
9 | * Found at http://stackoverflow.com/questions/7814017/is-it-possible-to-disable-scrolling-on-a-viewpager.
10 | * Convenient way to temporarily disable ViewPager navigation while interacting with ImageView.
11 | *
12 | * Julia Zudikova
13 | */
14 |
15 | /**
16 | * Hacky fix for Issue #4 and
17 | * http://code.google.com/p/android/issues/detail?id=18990
18 | *
19 | * ScaleGestureDetector seems to mess up the touch events, which means that
20 | * ViewGroups which make use of onInterceptTouchEvent throw a lot of
21 | * IllegalArgumentException: pointerIndex out of range.
22 | *
23 | * There's not much I can do in my code for now, but we can mask the result by
24 | * just catching the problem and ignoring it.
25 | *
26 | * @author Chris Banes
27 | */
28 | public class HackyViewPager extends ViewPager {
29 |
30 | private boolean isLocked;
31 |
32 | public HackyViewPager(Context context) {
33 | super(context);
34 | isLocked = false;
35 | }
36 |
37 | public HackyViewPager(Context context, AttributeSet attrs) {
38 | super(context, attrs);
39 | isLocked = false;
40 | }
41 |
42 | @Override
43 | public boolean onInterceptTouchEvent(MotionEvent ev) {
44 | if (!isLocked) {
45 | try {
46 | return super.onInterceptTouchEvent(ev);
47 | } catch (IllegalArgumentException e) {
48 | return false;
49 | }
50 | }
51 | return false;
52 | }
53 |
54 | @Override
55 | public boolean onTouchEvent(MotionEvent event) {
56 | return !isLocked && super.onTouchEvent(event);
57 | }
58 |
59 | public void toggleLock() {
60 | isLocked = !isLocked;
61 | }
62 |
63 | public void setLocked(boolean isLocked) {
64 | this.isLocked = isLocked;
65 | }
66 |
67 | public boolean isLocked() {
68 | return isLocked;
69 | }
70 |
71 | }
72 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/fragments/ViewPagerActivity.java:
--------------------------------------------------------------------------------
1 | /**
2 | * ****************************************************************************
3 | * Copyright 2011, 2012 Chris Banes.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | * *****************************************************************************
17 | */
18 | package com.allandroidprojects.ecomsample.fragments;
19 |
20 | import android.app.Activity;
21 | import android.os.Build;
22 | import android.os.Bundle;
23 | import android.support.annotation.NonNull;
24 | import android.support.v4.view.PagerAdapter;
25 | import android.support.v4.view.ViewPager;
26 | import android.view.View;
27 | import android.view.ViewGroup;
28 | import android.view.ViewGroup.LayoutParams;
29 |
30 | import com.allandroidprojects.ecomsample.R;
31 | import com.allandroidprojects.ecomsample.photoview.view.PhotoView;
32 | import com.allandroidprojects.ecomsample.utility.ImageUrlUtils;
33 |
34 | /**
35 | * Lock/Unlock button is added to the ActionBar.
36 | * Use it to temporarily disable ViewPager navigation in order to correctly interact with ImageView by gestures.
37 | * Lock/Unlock state of ViewPager is saved and restored on configuration changes.
38 | *
39 | * Julia Zudikova
40 | */
41 |
42 | public class ViewPagerActivity extends Activity {
43 |
44 | private static final String ISLOCKED_ARG = "isLocked";
45 | private ViewPager mViewPager;
46 | private int position;
47 |
48 | @Override
49 | public void onCreate(Bundle savedInstanceState) {
50 | super.onCreate(savedInstanceState);
51 | setContentView(R.layout.activity_view_pager);
52 | mViewPager = (HackyViewPager) findViewById(R.id.view_pager);
53 | setContentView(mViewPager);
54 |
55 | mViewPager.setAdapter(new SamplePagerAdapter());
56 | if (getIntent() != null) {
57 | position = getIntent().getIntExtra("position", 0);
58 | mViewPager.setCurrentItem(position);
59 | }
60 |
61 | if (savedInstanceState != null) {
62 | boolean isLocked = savedInstanceState.getBoolean(ISLOCKED_ARG, false);
63 | ((HackyViewPager) mViewPager).setLocked(isLocked);
64 | }
65 |
66 | if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) return;
67 | getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE
68 | | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
69 | | View.SYSTEM_UI_FLAG_FULLSCREEN
70 | | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
71 | }
72 |
73 | static class SamplePagerAdapter extends PagerAdapter {
74 | /* Here I'm adding the demo pics, but you can add your Item related pics , just get your pics based on itemID (use asynctask) and
75 | fill the urls in arraylist*/
76 | private static final String[] sDrawables = ImageUrlUtils.getImageUrls();
77 |
78 | @Override
79 | public int getCount() {
80 | return sDrawables.length;
81 | }
82 |
83 | @Override
84 | public View instantiateItem(ViewGroup container, int position) {
85 | PhotoView photoView = new PhotoView(container.getContext());
86 | photoView.setImageUri(sDrawables[position]);
87 |
88 | // Now just add PhotoView to ViewPager and return it
89 | container.addView(photoView, LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
90 |
91 | return photoView;
92 | }
93 |
94 | @Override
95 | public void destroyItem(ViewGroup container, int position, Object object) {
96 | container.removeView((View) object);
97 | }
98 |
99 | @Override
100 | public boolean isViewFromObject(View view, Object object) {
101 | return view == object;
102 | }
103 |
104 | }
105 |
106 | private boolean isViewPagerActive() {
107 | return (mViewPager != null && mViewPager instanceof HackyViewPager);
108 | }
109 |
110 | @Override
111 | protected void onSaveInstanceState(@NonNull Bundle outState) {
112 | if (isViewPagerActive()) {
113 | outState.putBoolean(ISLOCKED_ARG, ((HackyViewPager) mViewPager).isLocked());
114 | }
115 | super.onSaveInstanceState(outState);
116 | }
117 |
118 | }
119 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/log/LogManager.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.allandroidprojects.ecomsample.log;
17 |
18 | import android.util.Log;
19 |
20 | /**
21 | * class that holds the {@link Logger} for this library, defaults to {@link LoggerDefault} to send logs to android {@link Log}
22 | */
23 | public final class LogManager {
24 |
25 | private static Logger logger = new LoggerDefault();
26 |
27 | public static void setLogger(Logger newLogger) {
28 | logger = newLogger;
29 | }
30 |
31 | public static Logger getLogger() {
32 | return logger;
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/log/Logger.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.allandroidprojects.ecomsample.log;
17 |
18 | /**
19 | * interface for a logger class to replace the static calls to {@link android.util.Log}
20 | */
21 | public interface Logger {
22 | /**
23 | * Send a {@link android.util.Log#VERBOSE} log message.
24 | *
25 | * @param tag Used to identify the source of a log message. It usually identifies
26 | * the class or activity where the log call occurs.
27 | * @param msg The message you would like logged.
28 | */
29 | int v(String tag, String msg);
30 |
31 | /**
32 | * Send a {@link android.util.Log#VERBOSE} log message and log the exception.
33 | *
34 | * @param tag Used to identify the source of a log message. It usually identifies
35 | * the class or activity where the log call occurs.
36 | * @param msg The message you would like logged.
37 | * @param tr An exception to log
38 | */
39 | int v(String tag, String msg, Throwable tr);
40 |
41 | /**
42 | * Send a {@link android.util.Log#DEBUG} log message.
43 | *
44 | * @param tag Used to identify the source of a log message. It usually identifies
45 | * the class or activity where the log call occurs.
46 | * @param msg The message you would like logged.
47 | */
48 | int d(String tag, String msg);
49 |
50 | /**
51 | * Send a {@link android.util.Log#DEBUG} log message and log the exception.
52 | *
53 | * @param tag Used to identify the source of a log message. It usually identifies
54 | * the class or activity where the log call occurs.
55 | * @param msg The message you would like logged.
56 | * @param tr An exception to log
57 | */
58 | int d(String tag, String msg, Throwable tr);
59 |
60 | /**
61 | * Send an {@link android.util.Log#INFO} log message.
62 | *
63 | * @param tag Used to identify the source of a log message. It usually identifies
64 | * the class or activity where the log call occurs.
65 | * @param msg The message you would like logged.
66 | */
67 | int i(String tag, String msg);
68 |
69 | /**
70 | * Send a {@link android.util.Log#INFO} log message and log the exception.
71 | *
72 | * @param tag Used to identify the source of a log message. It usually identifies
73 | * the class or activity where the log call occurs.
74 | * @param msg The message you would like logged.
75 | * @param tr An exception to log
76 | */
77 | int i(String tag, String msg, Throwable tr);
78 |
79 | /**
80 | * Send a {@link android.util.Log#WARN} log message.
81 | *
82 | * @param tag Used to identify the source of a log message. It usually identifies
83 | * the class or activity where the log call occurs.
84 | * @param msg The message you would like logged.
85 | */
86 | int w(String tag, String msg);
87 |
88 | /**
89 | * Send a {@link android.util.Log#WARN} log message and log the exception.
90 | *
91 | * @param tag Used to identify the source of a log message. It usually identifies
92 | * the class or activity where the log call occurs.
93 | * @param msg The message you would like logged.
94 | * @param tr An exception to log
95 | */
96 | int w(String tag, String msg, Throwable tr);
97 |
98 | /**
99 | * Send an {@link android.util.Log#ERROR} log message.
100 | *
101 | * @param tag Used to identify the source of a log message. It usually identifies
102 | * the class or activity where the log call occurs.
103 | * @param msg The message you would like logged.
104 | */
105 | int e(String tag, String msg);
106 |
107 | /**
108 | * Send a {@link android.util.Log#ERROR} log message and log the exception.
109 | *
110 | * @param tag Used to identify the source of a log message. It usually identifies
111 | * the class or activity where the log call occurs.
112 | * @param msg The message you would like logged.
113 | * @param tr An exception to log
114 | */
115 | int e(String tag, String msg, Throwable tr);
116 | }
117 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/log/LoggerDefault.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.allandroidprojects.ecomsample.log;
17 |
18 | import android.util.Log;
19 |
20 | /**
21 | * Helper class to redirect {@link LogManager#logger} to {@link Log}
22 | */
23 | public class LoggerDefault implements Logger {
24 |
25 | @Override
26 | public int v(String tag, String msg) {
27 | return Log.v(tag, msg);
28 | }
29 |
30 | @Override
31 | public int v(String tag, String msg, Throwable tr) {
32 | return Log.v(tag, msg, tr);
33 | }
34 |
35 | @Override
36 | public int d(String tag, String msg) {
37 | return Log.d(tag, msg);
38 | }
39 |
40 | @Override
41 | public int d(String tag, String msg, Throwable tr) {
42 | return Log.d(tag, msg, tr);
43 | }
44 |
45 | @Override
46 | public int i(String tag, String msg) {
47 | return Log.i(tag, msg);
48 | }
49 |
50 | @Override
51 | public int i(String tag, String msg, Throwable tr) {
52 | return Log.i(tag, msg, tr);
53 | }
54 |
55 | @Override
56 | public int w(String tag, String msg) {
57 | return Log.w(tag, msg);
58 | }
59 |
60 | @Override
61 | public int w(String tag, String msg, Throwable tr) {
62 | return Log.w(tag, msg, tr);
63 | }
64 |
65 | @Override
66 | public int e(String tag, String msg) {
67 | return Log.e(tag, msg);
68 | }
69 |
70 | @Override
71 | public int e(String tag, String msg, Throwable tr) {
72 | return Log.e(tag, msg, tr);
73 | }
74 |
75 |
76 | }
77 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/miscellaneous/CustomProgressbarDrawable.java:
--------------------------------------------------------------------------------
1 | package com.allandroidprojects.ecomsample.miscellaneous;
2 |
3 | import android.graphics.Canvas;
4 | import android.graphics.ColorFilter;
5 | import android.graphics.drawable.Drawable;
6 |
7 | /**
8 | * Created by 06peng on 15/6/26.
9 | */
10 | public class CustomProgressbarDrawable extends Drawable {
11 |
12 | private ImageDownloadListener mListener;
13 |
14 | public CustomProgressbarDrawable(ImageDownloadListener listener) {
15 | mListener = listener;
16 | }
17 |
18 | @Override
19 | public void draw(Canvas canvas) {
20 |
21 | }
22 |
23 | @Override
24 | public void setAlpha(int alpha) {
25 |
26 | }
27 |
28 | @Override
29 | public void setColorFilter(ColorFilter cf) {
30 |
31 | }
32 |
33 | @Override
34 | public int getOpacity() {
35 | return 0;
36 | }
37 |
38 | @Override
39 | protected boolean onLevelChange(int level) {
40 | int progress = (int) ((level / 10000.0) * 100);
41 | if (mListener != null) {
42 | mListener.onUpdate(progress);
43 | }
44 | return super.onLevelChange(level);
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/miscellaneous/EmptyActivity.java:
--------------------------------------------------------------------------------
1 | package com.allandroidprojects.ecomsample.miscellaneous;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 | import android.os.Bundle;
5 |
6 | import com.allandroidprojects.ecomsample.R;
7 |
8 | public class EmptyActivity extends AppCompatActivity {
9 | @Override
10 | protected void onCreate(Bundle savedInstanceState) {
11 | super.onCreate(savedInstanceState);
12 | setContentView(R.layout.activity_empty);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/miscellaneous/ImageDownloadListener.java:
--------------------------------------------------------------------------------
1 | package com.allandroidprojects.ecomsample.miscellaneous;
2 |
3 | /**
4 | * Created by 06peng on 15/6/26.
5 | */
6 | public interface ImageDownloadListener {
7 | void onUpdate(int progress);
8 | }
9 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/notification/BadgeDrawable.java:
--------------------------------------------------------------------------------
1 | package com.allandroidprojects.ecomsample.notification;
2 |
3 | import android.content.Context;
4 | import android.graphics.Canvas;
5 | import android.graphics.Color;
6 | import android.graphics.ColorFilter;
7 | import android.graphics.Paint;
8 | import android.graphics.Rect;
9 | import android.graphics.Typeface;
10 | import android.graphics.drawable.Drawable;
11 | import android.support.v4.content.ContextCompat;
12 |
13 | import com.allandroidprojects.ecomsample.R;
14 |
15 | /**
16 | * Created by priyankam on 4/13/2016.
17 | */
18 | public class BadgeDrawable extends Drawable {
19 |
20 | private float mTextSize;
21 | private Paint mBadgePaint;
22 | private Paint mTextPaint;
23 | private Rect mTxtRect = new Rect();
24 |
25 | private String mCount = "";
26 | private boolean mWillDraw = false;
27 |
28 | public BadgeDrawable(Context context) {
29 | // mTextSize = 10dp;
30 | mTextSize = context.getResources().getDimension(R.dimen.text_size_small);
31 |
32 | mBadgePaint = new Paint();
33 | mBadgePaint.setColor(ContextCompat.getColor(context,R.color.colorAccent));
34 | mBadgePaint.setAntiAlias(true);
35 | mBadgePaint.setStyle(Paint.Style.FILL);
36 |
37 | mTextPaint = new Paint();
38 | mTextPaint.setColor(Color.WHITE);
39 | mTextPaint.setTypeface(Typeface.DEFAULT_BOLD);
40 | mTextPaint.setTextSize(mTextSize);
41 | mTextPaint.setAntiAlias(true);
42 | mTextPaint.setTextAlign(Paint.Align.CENTER);
43 | }
44 |
45 | @Override
46 | public void draw(Canvas canvas) {
47 | if (!mWillDraw) {
48 | return;
49 | }
50 |
51 | Rect bounds = getBounds();
52 | float width = bounds.right - bounds.left;
53 | float height = bounds.bottom - bounds.top;
54 |
55 | // Position the badge in the top-right quadrant of the icon.
56 | float radius = ((Math.min(width, height) / 2) - 1) / (float) 1.6;
57 | float centerX = width - radius - 1;
58 | float centerY = radius + 1;
59 |
60 | // Draw badge circle.
61 | canvas.drawCircle(centerX, centerY, radius, mBadgePaint);
62 |
63 | // Draw badge count text inside the circle.
64 | mTextPaint.getTextBounds(mCount, 0, mCount.length(), mTxtRect);
65 | float textHeight = mTxtRect.bottom - mTxtRect.top;
66 | float textY = centerY + (textHeight / 2f);
67 | canvas.drawText(mCount, centerX, textY, mTextPaint);
68 | }
69 |
70 | /*
71 | Sets the count (i.e notifications) to display.
72 | */
73 | public void setCount(int count) {
74 | mCount = Integer.toString(count);
75 |
76 | // Only draw a badge if there are notifications.
77 | mWillDraw = count > 0;
78 | invalidateSelf();
79 | }
80 |
81 | @Override
82 | public void setAlpha(int alpha) {
83 | // do nothing
84 | }
85 |
86 | @Override
87 | public int getOpacity() {
88 | // TODO Auto-generated method stub
89 | return 0;
90 | }
91 |
92 |
93 | @Override
94 | public void setColorFilter(ColorFilter cf) {
95 | // TODO Auto-generated method stub
96 |
97 | }
98 | }
99 |
100 |
101 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/notification/NotificationCountSetClass.java:
--------------------------------------------------------------------------------
1 | package com.allandroidprojects.ecomsample.notification;
2 |
3 | import android.app.Activity;
4 | import android.content.Context;
5 | import android.graphics.drawable.LayerDrawable;
6 | import android.view.MenuItem;
7 |
8 | /**
9 | * Created by priyankam on 19-07-2016.
10 | */
11 | public class NotificationCountSetClass extends Activity {
12 | private static LayerDrawable icon;
13 | public NotificationCountSetClass() {
14 | //constructor
15 | }
16 |
17 | public static void setAddToCart(Context context, MenuItem item, int numMessages) {
18 | icon = (LayerDrawable) item.getIcon();
19 | SetNotificationCount.setBadgeCount(context, icon, NotificationCountSetClass.setNotifyCount(numMessages));
20 |
21 | }
22 |
23 | public static int setNotifyCount(int numMessages) {
24 | int count=numMessages;
25 | return count;
26 |
27 | }
28 |
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/notification/SetNotificationCount.java:
--------------------------------------------------------------------------------
1 | package com.allandroidprojects.ecomsample.notification;
2 |
3 | import android.content.Context;
4 | import android.graphics.drawable.Drawable;
5 | import android.graphics.drawable.LayerDrawable;
6 |
7 | import com.allandroidprojects.ecomsample.R;
8 |
9 | /**
10 | * Created by priyankam on 4/13/2016.
11 | */
12 | public class SetNotificationCount {
13 | public static void setBadgeCount(Context context, LayerDrawable icon, int count) {
14 |
15 | BadgeDrawable badge;
16 |
17 | // Reuse drawable if possible
18 | Drawable reuse = icon.findDrawableByLayerId(R.id.ic_badge);
19 | if (reuse != null && reuse instanceof BadgeDrawable) {
20 | badge = (BadgeDrawable) reuse;
21 | } else {
22 | badge = new BadgeDrawable(context);
23 | }
24 |
25 | badge.setCount(count);
26 | icon.mutate();
27 | icon.setDrawableByLayerId(R.id.ic_badge, badge);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/options/CartListActivity.java:
--------------------------------------------------------------------------------
1 | package com.allandroidprojects.ecomsample.options;
2 |
3 | import android.content.Context;
4 | import android.content.Intent;
5 | import android.net.Uri;
6 | import android.support.v7.app.AppCompatActivity;
7 | import android.os.Bundle;
8 | import android.support.v7.widget.LinearLayoutManager;
9 | import android.support.v7.widget.RecyclerView;
10 | import android.view.LayoutInflater;
11 | import android.view.View;
12 | import android.view.ViewGroup;
13 | import android.widget.Button;
14 | import android.widget.ImageView;
15 | import android.widget.LinearLayout;
16 |
17 | import com.allandroidprojects.ecomsample.R;
18 | import com.allandroidprojects.ecomsample.product.ItemDetailsActivity;
19 | import com.allandroidprojects.ecomsample.startup.MainActivity;
20 | import com.allandroidprojects.ecomsample.utility.ImageUrlUtils;
21 | import com.facebook.drawee.view.SimpleDraweeView;
22 |
23 | import java.util.ArrayList;
24 |
25 | import static com.allandroidprojects.ecomsample.fragments.ImageListFragment.STRING_IMAGE_POSITION;
26 | import static com.allandroidprojects.ecomsample.fragments.ImageListFragment.STRING_IMAGE_URI;
27 |
28 | public class CartListActivity extends AppCompatActivity {
29 | private static Context mContext;
30 | @Override
31 | protected void onCreate(Bundle savedInstanceState) {
32 | super.onCreate(savedInstanceState);
33 | setContentView(R.layout.activity_cart_list);
34 | mContext = CartListActivity.this;
35 |
36 | ImageUrlUtils imageUrlUtils = new ImageUrlUtils();
37 | ArrayList cartlistImageUri =imageUrlUtils.getCartListImageUri();
38 | //Show cart layout based on items
39 | setCartLayout();
40 |
41 | RecyclerView recyclerView = (RecyclerView)findViewById(R.id.recyclerview);
42 | RecyclerView.LayoutManager recylerViewLayoutManager = new LinearLayoutManager(mContext);
43 |
44 | recyclerView.setLayoutManager(recylerViewLayoutManager);
45 | recyclerView.setAdapter(new CartListActivity.SimpleStringRecyclerViewAdapter(recyclerView, cartlistImageUri));
46 | }
47 |
48 | public static class SimpleStringRecyclerViewAdapter
49 | extends RecyclerView.Adapter {
50 |
51 | private ArrayList mCartlistImageUri;
52 | private RecyclerView mRecyclerView;
53 |
54 | public static class ViewHolder extends RecyclerView.ViewHolder {
55 | public final View mView;
56 | public final SimpleDraweeView mImageView;
57 | public final LinearLayout mLayoutItem, mLayoutRemove , mLayoutEdit;
58 |
59 | public ViewHolder(View view) {
60 | super(view);
61 | mView = view;
62 | mImageView = (SimpleDraweeView) view.findViewById(R.id.image_cartlist);
63 | mLayoutItem = (LinearLayout) view.findViewById(R.id.layout_item_desc);
64 | mLayoutRemove = (LinearLayout) view.findViewById(R.id.layout_action1);
65 | mLayoutEdit = (LinearLayout) view.findViewById(R.id.layout_action2);
66 | }
67 | }
68 |
69 | public SimpleStringRecyclerViewAdapter(RecyclerView recyclerView, ArrayList wishlistImageUri) {
70 | mCartlistImageUri = wishlistImageUri;
71 | mRecyclerView = recyclerView;
72 | }
73 |
74 | @Override
75 | public CartListActivity.SimpleStringRecyclerViewAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
76 | View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.layout_cartlist_item, parent, false);
77 | return new CartListActivity.SimpleStringRecyclerViewAdapter.ViewHolder(view);
78 | }
79 |
80 | @Override
81 | public void onViewRecycled(CartListActivity.SimpleStringRecyclerViewAdapter.ViewHolder holder) {
82 | if (holder.mImageView.getController() != null) {
83 | holder.mImageView.getController().onDetach();
84 | }
85 | if (holder.mImageView.getTopLevelDrawable() != null) {
86 | holder.mImageView.getTopLevelDrawable().setCallback(null);
87 | // ((BitmapDrawable) holder.mImageView.getTopLevelDrawable()).getBitmap().recycle();
88 | }
89 | }
90 |
91 | @Override
92 | public void onBindViewHolder(final CartListActivity.SimpleStringRecyclerViewAdapter.ViewHolder holder, final int position) {
93 | final Uri uri = Uri.parse(mCartlistImageUri.get(position));
94 | holder.mImageView.setImageURI(uri);
95 | holder.mLayoutItem.setOnClickListener(new View.OnClickListener() {
96 | @Override
97 | public void onClick(View v) {
98 | Intent intent = new Intent(mContext, ItemDetailsActivity.class);
99 | intent.putExtra(STRING_IMAGE_URI,mCartlistImageUri.get(position));
100 | intent.putExtra(STRING_IMAGE_POSITION, position);
101 | mContext.startActivity(intent);
102 | }
103 | });
104 |
105 | //Set click action
106 | holder.mLayoutRemove.setOnClickListener(new View.OnClickListener() {
107 | @Override
108 | public void onClick(View view) {
109 | ImageUrlUtils imageUrlUtils = new ImageUrlUtils();
110 | imageUrlUtils.removeCartListImageUri(position);
111 | notifyDataSetChanged();
112 | //Decrease notification count
113 | MainActivity.notificationCountCart--;
114 |
115 | }
116 | });
117 |
118 | //Set click action
119 | holder.mLayoutEdit.setOnClickListener(new View.OnClickListener() {
120 | @Override
121 | public void onClick(View view) {
122 | }
123 | });
124 | }
125 |
126 | @Override
127 | public int getItemCount() {
128 | return mCartlistImageUri.size();
129 | }
130 | }
131 |
132 | protected void setCartLayout(){
133 | LinearLayout layoutCartItems = (LinearLayout) findViewById(R.id.layout_items);
134 | LinearLayout layoutCartPayments = (LinearLayout) findViewById(R.id.layout_payment);
135 | LinearLayout layoutCartNoItems = (LinearLayout) findViewById(R.id.layout_cart_empty);
136 |
137 | if(MainActivity.notificationCountCart >0){
138 | layoutCartNoItems.setVisibility(View.GONE);
139 | layoutCartItems.setVisibility(View.VISIBLE);
140 | layoutCartPayments.setVisibility(View.VISIBLE);
141 | }else {
142 | layoutCartNoItems.setVisibility(View.VISIBLE);
143 | layoutCartItems.setVisibility(View.GONE);
144 | layoutCartPayments.setVisibility(View.GONE);
145 |
146 | Button bStartShopping = (Button) findViewById(R.id.bAddNew);
147 | bStartShopping.setOnClickListener(new View.OnClickListener() {
148 | @Override
149 | public void onClick(View view) {
150 | finish();
151 | }
152 | });
153 | }
154 | }
155 | }
156 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/options/SearchResultActivity.java:
--------------------------------------------------------------------------------
1 | package com.allandroidprojects.ecomsample.options;
2 |
3 | import android.app.SearchManager;
4 | import android.content.Context;
5 | import android.content.Intent;
6 | import android.support.v7.app.AppCompatActivity;
7 | import android.os.Bundle;
8 | import android.view.MenuItem;
9 | import android.support.v7.widget.SearchView;
10 | import android.view.Menu;
11 | import android.view.MenuInflater;
12 |
13 | import com.allandroidprojects.ecomsample.R;
14 |
15 | public class SearchResultActivity extends AppCompatActivity {
16 | @Override
17 | protected void onCreate(Bundle savedInstanceState) {
18 | super.onCreate(savedInstanceState);
19 | setContentView(R.layout.activity_search_result);
20 | handleIntent(getIntent());
21 | }
22 | @Override
23 | public boolean onCreateOptionsMenu(Menu menu) {
24 | MenuInflater inflater = getMenuInflater();
25 | // Inflate menu to add items to action bar if it is present.
26 | inflater.inflate(R.menu.search_menu, menu);
27 | MenuItem searchItem = menu.getItem(0);
28 | // Associate searchable configuration with the SearchView
29 | SearchManager searchManager =
30 | (SearchManager) getSystemService(Context.SEARCH_SERVICE);
31 | SearchView searchView =
32 | (SearchView) menu.findItem(R.id.action_search).getActionView();
33 | searchView.setSearchableInfo(
34 | searchManager.getSearchableInfo(getComponentName()));
35 | searchView.setFocusable(true);
36 | searchItem.expandActionView();
37 | return true;
38 | }
39 |
40 | @Override
41 | protected void onNewIntent(Intent intent) {
42 | handleIntent(intent);
43 | }
44 |
45 | private void handleIntent(Intent intent) {
46 |
47 | if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
48 | String query = intent.getStringExtra(SearchManager.QUERY);
49 | //use the query to search your data somehow
50 | }
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/options/WishlistActivity.java:
--------------------------------------------------------------------------------
1 | package com.allandroidprojects.ecomsample.options;
2 |
3 | import android.content.Context;
4 | import android.content.Intent;
5 | import android.net.Uri;
6 | import android.support.v7.app.AppCompatActivity;
7 | import android.os.Bundle;
8 | import android.support.v7.widget.LinearLayoutManager;
9 | import android.support.v7.widget.RecyclerView;
10 | import android.view.LayoutInflater;
11 | import android.view.View;
12 | import android.view.ViewGroup;
13 | import android.widget.ImageView;
14 | import android.widget.LinearLayout;
15 |
16 | import com.allandroidprojects.ecomsample.R;
17 | import com.allandroidprojects.ecomsample.product.ItemDetailsActivity;
18 | import com.allandroidprojects.ecomsample.utility.ImageUrlUtils;
19 | import com.facebook.drawee.view.SimpleDraweeView;
20 |
21 | import java.util.ArrayList;
22 |
23 | import static com.allandroidprojects.ecomsample.fragments.ImageListFragment.STRING_IMAGE_POSITION;
24 | import static com.allandroidprojects.ecomsample.fragments.ImageListFragment.STRING_IMAGE_URI;
25 |
26 | public class WishlistActivity extends AppCompatActivity {
27 | private static Context mContext;
28 |
29 | @Override
30 | protected void onCreate(Bundle savedInstanceState) {
31 | super.onCreate(savedInstanceState);
32 | setContentView(R.layout.layout_recylerview_list);
33 | mContext = WishlistActivity.this;
34 |
35 | ImageUrlUtils imageUrlUtils = new ImageUrlUtils();
36 | ArrayList wishlistImageUri =imageUrlUtils.getWishlistImageUri();
37 | RecyclerView recyclerView = (RecyclerView)findViewById(R.id.recyclerview);
38 | RecyclerView.LayoutManager recylerViewLayoutManager = new LinearLayoutManager(mContext);
39 |
40 | recyclerView.setLayoutManager(recylerViewLayoutManager);
41 | recyclerView.setAdapter(new SimpleStringRecyclerViewAdapter(recyclerView, wishlistImageUri));
42 | }
43 |
44 | public static class SimpleStringRecyclerViewAdapter
45 | extends RecyclerView.Adapter {
46 |
47 | private ArrayList mWishlistImageUri;
48 | private RecyclerView mRecyclerView;
49 |
50 | public static class ViewHolder extends RecyclerView.ViewHolder {
51 | public final View mView;
52 | public final SimpleDraweeView mImageView;
53 | public final LinearLayout mLayoutItem;
54 | public final ImageView mImageViewWishlist;
55 | public ViewHolder(View view) {
56 | super(view);
57 | mView = view;
58 | mImageView = (SimpleDraweeView) view.findViewById(R.id.image_wishlist);
59 | mLayoutItem = (LinearLayout) view.findViewById(R.id.layout_item_desc);
60 | mImageViewWishlist = (ImageView) view.findViewById(R.id.ic_wishlist);
61 | }
62 | }
63 |
64 | public SimpleStringRecyclerViewAdapter(RecyclerView recyclerView, ArrayList wishlistImageUri) {
65 | mWishlistImageUri = wishlistImageUri;
66 | mRecyclerView = recyclerView;
67 | }
68 |
69 | @Override
70 | public WishlistActivity.SimpleStringRecyclerViewAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
71 | View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.layout_wishlist_item, parent, false);
72 | return new WishlistActivity.SimpleStringRecyclerViewAdapter.ViewHolder(view);
73 | }
74 |
75 | @Override
76 | public void onViewRecycled(ViewHolder holder) {
77 | if (holder.mImageView.getController() != null) {
78 | holder.mImageView.getController().onDetach();
79 | }
80 | if (holder.mImageView.getTopLevelDrawable() != null) {
81 | holder.mImageView.getTopLevelDrawable().setCallback(null);
82 | // ((BitmapDrawable) holder.mImageView.getTopLevelDrawable()).getBitmap().recycle();
83 | }
84 | }
85 |
86 | @Override
87 | public void onBindViewHolder(final WishlistActivity.SimpleStringRecyclerViewAdapter.ViewHolder holder, final int position) {
88 | final Uri uri = Uri.parse(mWishlistImageUri.get(position));
89 | holder.mImageView.setImageURI(uri);
90 | holder.mLayoutItem.setOnClickListener(new View.OnClickListener() {
91 | @Override
92 | public void onClick(View v) {
93 | Intent intent = new Intent(mContext, ItemDetailsActivity.class);
94 | intent.putExtra(STRING_IMAGE_URI,mWishlistImageUri.get(position));
95 | intent.putExtra(STRING_IMAGE_POSITION, position);
96 | mContext.startActivity(intent);
97 | }
98 | });
99 |
100 | //Set click action for wishlist
101 | holder.mImageViewWishlist.setOnClickListener(new View.OnClickListener() {
102 | @Override
103 | public void onClick(View view) {
104 | ImageUrlUtils imageUrlUtils = new ImageUrlUtils();
105 | imageUrlUtils.removeWishlistImageUri(position);
106 | notifyDataSetChanged();
107 | }
108 | });
109 | }
110 |
111 | @Override
112 | public int getItemCount() {
113 | return mWishlistImageUri.size();
114 | }
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/photoview/gestures/CupcakeGestureDetector.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.allandroidprojects.ecomsample.photoview.gestures;
17 |
18 | import android.content.Context;
19 | import android.view.MotionEvent;
20 | import android.view.VelocityTracker;
21 | import android.view.ViewConfiguration;
22 |
23 | import com.allandroidprojects.ecomsample.log.LogManager;
24 |
25 | public class CupcakeGestureDetector implements GestureDetector {
26 |
27 | protected OnGestureListener mListener;
28 | private static final String LOG_TAG = "CupcakeGestureDetector";
29 | float mLastTouchX;
30 | float mLastTouchY;
31 | final float mTouchSlop;
32 | final float mMinimumVelocity;
33 |
34 | @Override
35 | public void setOnGestureListener(OnGestureListener listener) {
36 | this.mListener = listener;
37 | }
38 |
39 | public CupcakeGestureDetector(Context context) {
40 | final ViewConfiguration configuration = ViewConfiguration
41 | .get(context);
42 | mMinimumVelocity = configuration.getScaledMinimumFlingVelocity();
43 | mTouchSlop = configuration.getScaledTouchSlop();
44 | }
45 |
46 | private VelocityTracker mVelocityTracker;
47 | private boolean mIsDragging;
48 |
49 | float getActiveX(MotionEvent ev) {
50 | return ev.getX();
51 | }
52 |
53 | float getActiveY(MotionEvent ev) {
54 | return ev.getY();
55 | }
56 |
57 | public boolean isScaling() {
58 | return false;
59 | }
60 |
61 | public boolean isDragging() {
62 | return mIsDragging;
63 | }
64 |
65 | @Override
66 | public boolean onTouchEvent(MotionEvent ev) {
67 | switch (ev.getAction()) {
68 | case MotionEvent.ACTION_DOWN: {
69 | mVelocityTracker = VelocityTracker.obtain();
70 | if (null != mVelocityTracker) {
71 | mVelocityTracker.addMovement(ev);
72 | } else {
73 | LogManager.getLogger().i(LOG_TAG, "Velocity tracker is null");
74 | }
75 |
76 | mLastTouchX = getActiveX(ev);
77 | mLastTouchY = getActiveY(ev);
78 | mIsDragging = false;
79 | break;
80 | }
81 |
82 | case MotionEvent.ACTION_MOVE: {
83 | final float x = getActiveX(ev);
84 | final float y = getActiveY(ev);
85 | final float dx = x - mLastTouchX, dy = y - mLastTouchY;
86 |
87 | if (!mIsDragging) {
88 | // Use Pythagoras to see if drag length is larger than
89 | // touch slop
90 | mIsDragging = Math.sqrt((dx * dx) + (dy * dy)) >= mTouchSlop;
91 | }
92 |
93 | if (mIsDragging) {
94 | mListener.onDrag(dx, dy);
95 | mLastTouchX = x;
96 | mLastTouchY = y;
97 |
98 | if (null != mVelocityTracker) {
99 | mVelocityTracker.addMovement(ev);
100 | }
101 | }
102 | break;
103 | }
104 |
105 | case MotionEvent.ACTION_CANCEL: {
106 | // Recycle Velocity Tracker
107 | if (null != mVelocityTracker) {
108 | mVelocityTracker.recycle();
109 | mVelocityTracker = null;
110 | }
111 | break;
112 | }
113 |
114 | case MotionEvent.ACTION_UP: {
115 | if (mIsDragging) {
116 | if (null != mVelocityTracker) {
117 | mLastTouchX = getActiveX(ev);
118 | mLastTouchY = getActiveY(ev);
119 |
120 | // Compute velocity within the last 1000ms
121 | mVelocityTracker.addMovement(ev);
122 | mVelocityTracker.computeCurrentVelocity(1000);
123 |
124 | final float vX = mVelocityTracker.getXVelocity(), vY = mVelocityTracker
125 | .getYVelocity();
126 |
127 | // If the velocity is greater than minVelocity, call
128 | // listener
129 | if (Math.max(Math.abs(vX), Math.abs(vY)) >= mMinimumVelocity) {
130 | mListener.onFling(mLastTouchX, mLastTouchY, -vX,
131 | -vY);
132 | }
133 | }
134 | }
135 |
136 | // Recycle Velocity Tracker
137 | if (null != mVelocityTracker) {
138 | mVelocityTracker.recycle();
139 | mVelocityTracker = null;
140 | }
141 | break;
142 | }
143 | }
144 |
145 | return true;
146 | }
147 | }
148 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/photoview/gestures/EclairGestureDetector.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.allandroidprojects.ecomsample.photoview.gestures;
17 |
18 | import android.annotation.TargetApi;
19 | import android.content.Context;
20 | import android.view.MotionEvent;
21 |
22 | import com.allandroidprojects.ecomsample.photoview.view.Compat;
23 |
24 | @TargetApi(5)
25 | public class EclairGestureDetector extends CupcakeGestureDetector {
26 |
27 | private static final int INVALID_POINTER_ID = -1;
28 | private int mActivePointerId = INVALID_POINTER_ID;
29 | private int mActivePointerIndex = 0;
30 |
31 | public EclairGestureDetector(Context context) {
32 | super(context);
33 | }
34 |
35 | @Override
36 | float getActiveX(MotionEvent ev) {
37 | try {
38 | return ev.getX(mActivePointerIndex);
39 | } catch (Exception e) {
40 | return ev.getX();
41 | }
42 | }
43 |
44 | @Override
45 | float getActiveY(MotionEvent ev) {
46 | try {
47 | return ev.getY(mActivePointerIndex);
48 | } catch (Exception e) {
49 | return ev.getY();
50 | }
51 | }
52 |
53 | @Override
54 | public boolean onTouchEvent(MotionEvent ev) {
55 | final int action = ev.getAction();
56 | switch (action & MotionEvent.ACTION_MASK) {
57 | case MotionEvent.ACTION_DOWN:
58 | mActivePointerId = ev.getPointerId(0);
59 | break;
60 | case MotionEvent.ACTION_CANCEL:
61 | case MotionEvent.ACTION_UP:
62 | mActivePointerId = INVALID_POINTER_ID;
63 | break;
64 | case MotionEvent.ACTION_POINTER_UP:
65 | // Ignore deprecation, ACTION_POINTER_ID_MASK and
66 | // ACTION_POINTER_ID_SHIFT has same value and are deprecated
67 | // You can have either deprecation or lint target api warning
68 | final int pointerIndex = Compat.getPointerIndex(ev.getAction());
69 | final int pointerId = ev.getPointerId(pointerIndex);
70 | if (pointerId == mActivePointerId) {
71 | // This was our active pointer going up. Choose a new
72 | // active pointer and adjust accordingly.
73 | final int newPointerIndex = pointerIndex == 0 ? 1 : 0;
74 | mActivePointerId = ev.getPointerId(newPointerIndex);
75 | mLastTouchX = ev.getX(newPointerIndex);
76 | mLastTouchY = ev.getY(newPointerIndex);
77 | }
78 | break;
79 | }
80 |
81 | mActivePointerIndex = ev
82 | .findPointerIndex(mActivePointerId != INVALID_POINTER_ID ? mActivePointerId
83 | : 0);
84 | return super.onTouchEvent(ev);
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/photoview/gestures/FroyoGestureDetector.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.allandroidprojects.ecomsample.photoview.gestures;
17 |
18 | import android.annotation.TargetApi;
19 | import android.content.Context;
20 | import android.view.MotionEvent;
21 | import android.view.ScaleGestureDetector;
22 |
23 | @TargetApi(8)
24 | public class FroyoGestureDetector extends EclairGestureDetector {
25 |
26 | protected final ScaleGestureDetector mDetector;
27 |
28 | public FroyoGestureDetector(Context context) {
29 | super(context);
30 | ScaleGestureDetector.OnScaleGestureListener mScaleListener = new ScaleGestureDetector.OnScaleGestureListener() {
31 |
32 | @Override
33 | public boolean onScale(ScaleGestureDetector detector) {
34 | float scaleFactor = detector.getScaleFactor();
35 |
36 | if (Float.isNaN(scaleFactor) || Float.isInfinite(scaleFactor))
37 | return false;
38 |
39 | mListener.onScale(scaleFactor,
40 | detector.getFocusX(), detector.getFocusY());
41 | return true;
42 | }
43 |
44 | @Override
45 | public boolean onScaleBegin(ScaleGestureDetector detector) {
46 | return true;
47 | }
48 |
49 | @Override
50 | public void onScaleEnd(ScaleGestureDetector detector) {
51 | // NO-OP
52 | }
53 | };
54 | mDetector = new ScaleGestureDetector(context, mScaleListener);
55 | }
56 |
57 | @Override
58 | public boolean isScaling() {
59 | return mDetector.isInProgress();
60 | }
61 |
62 | @Override
63 | public boolean onTouchEvent(MotionEvent ev) {
64 | mDetector.onTouchEvent(ev);
65 | return super.onTouchEvent(ev);
66 | }
67 |
68 | }
69 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/photoview/gestures/GestureDetector.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.allandroidprojects.ecomsample.photoview.gestures;
17 |
18 | import android.view.MotionEvent;
19 |
20 | public interface GestureDetector {
21 |
22 | public boolean onTouchEvent(MotionEvent ev);
23 |
24 | public boolean isScaling();
25 |
26 | public boolean isDragging();
27 |
28 | public void setOnGestureListener(OnGestureListener listener);
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/photoview/gestures/OnGestureListener.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.allandroidprojects.ecomsample.photoview.gestures;
17 |
18 | public interface OnGestureListener {
19 |
20 | public void onDrag(float dx, float dy);
21 |
22 | public void onFling(float startX, float startY, float velocityX,
23 | float velocityY);
24 |
25 | public void onScale(float scaleFactor, float focusX, float focusY);
26 |
27 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/photoview/gestures/VersionedGestureDetector.java:
--------------------------------------------------------------------------------
1 | package com.allandroidprojects.ecomsample.photoview.gestures;
2 |
3 | /*******************************************************************************
4 | * Copyright 2011, 2012 Chris Banes.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | *******************************************************************************/
18 |
19 | import android.content.Context;
20 | import android.os.Build;
21 |
22 | public final class VersionedGestureDetector {
23 |
24 | public static GestureDetector newInstance(Context context,
25 | OnGestureListener listener) {
26 | final int sdkVersion = Build.VERSION.SDK_INT;
27 | GestureDetector detector;
28 |
29 | if (sdkVersion < Build.VERSION_CODES.ECLAIR) {
30 | detector = new CupcakeGestureDetector(context);
31 | } else if (sdkVersion < Build.VERSION_CODES.FROYO) {
32 | detector = new EclairGestureDetector(context);
33 | } else {
34 | detector = new FroyoGestureDetector(context);
35 | }
36 |
37 | detector.setOnGestureListener(listener);
38 |
39 | return detector;
40 | }
41 |
42 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/photoview/scrollerproxy/GingerScroller.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.allandroidprojects.ecomsample.photoview.scrollerproxy;
17 |
18 | import android.annotation.TargetApi;
19 | import android.content.Context;
20 | import android.widget.OverScroller;
21 |
22 | @TargetApi(9)
23 | public class GingerScroller extends ScrollerProxy {
24 |
25 | protected final OverScroller mScroller;
26 | private boolean mFirstScroll = false;
27 |
28 | public GingerScroller(Context context) {
29 | mScroller = new OverScroller(context);
30 | }
31 |
32 | @Override
33 | public boolean computeScrollOffset() {
34 | // Workaround for first scroll returning 0 for the direction of the edge it hits.
35 | // Simply recompute values.
36 | if (mFirstScroll) {
37 | mScroller.computeScrollOffset();
38 | mFirstScroll = false;
39 | }
40 | return mScroller.computeScrollOffset();
41 | }
42 |
43 | @Override
44 | public void fling(int startX, int startY, int velocityX, int velocityY, int minX, int maxX, int minY, int maxY,
45 | int overX, int overY) {
46 | mScroller.fling(startX, startY, velocityX, velocityY, minX, maxX, minY, maxY, overX, overY);
47 | }
48 |
49 | @Override
50 | public void forceFinished(boolean finished) {
51 | mScroller.forceFinished(finished);
52 | }
53 |
54 | @Override
55 | public boolean isFinished() {
56 | return mScroller.isFinished();
57 | }
58 |
59 | @Override
60 | public int getCurrX() {
61 | return mScroller.getCurrX();
62 | }
63 |
64 | @Override
65 | public int getCurrY() {
66 | return mScroller.getCurrY();
67 | }
68 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/photoview/scrollerproxy/IcsScroller.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.allandroidprojects.ecomsample.photoview.scrollerproxy;
17 |
18 | import android.annotation.TargetApi;
19 | import android.content.Context;
20 |
21 | @TargetApi(14)
22 | public class IcsScroller extends GingerScroller {
23 |
24 | public IcsScroller(Context context) {
25 | super(context);
26 | }
27 |
28 | @Override
29 | public boolean computeScrollOffset() {
30 | return mScroller.computeScrollOffset();
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/photoview/scrollerproxy/PreGingerScroller.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.allandroidprojects.ecomsample.photoview.scrollerproxy;
17 |
18 | import android.content.Context;
19 | import android.widget.Scroller;
20 |
21 | public class PreGingerScroller extends ScrollerProxy {
22 |
23 | private final Scroller mScroller;
24 |
25 | public PreGingerScroller(Context context) {
26 | mScroller = new Scroller(context);
27 | }
28 |
29 | @Override
30 | public boolean computeScrollOffset() {
31 | return mScroller.computeScrollOffset();
32 | }
33 |
34 | @Override
35 | public void fling(int startX, int startY, int velocityX, int velocityY, int minX, int maxX, int minY, int maxY,
36 | int overX, int overY) {
37 | mScroller.fling(startX, startY, velocityX, velocityY, minX, maxX, minY, maxY);
38 | }
39 |
40 | @Override
41 | public void forceFinished(boolean finished) {
42 | mScroller.forceFinished(finished);
43 | }
44 |
45 | public boolean isFinished() {
46 | return mScroller.isFinished();
47 | }
48 |
49 | @Override
50 | public int getCurrX() {
51 | return mScroller.getCurrX();
52 | }
53 |
54 | @Override
55 | public int getCurrY() {
56 | return mScroller.getCurrY();
57 | }
58 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/photoview/scrollerproxy/ScrollerProxy.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.allandroidprojects.ecomsample.photoview.scrollerproxy;
17 |
18 | import android.content.Context;
19 | import android.os.Build.VERSION;
20 | import android.os.Build.VERSION_CODES;
21 |
22 | public abstract class ScrollerProxy {
23 |
24 | public static ScrollerProxy getScroller(Context context) {
25 | if (VERSION.SDK_INT < VERSION_CODES.GINGERBREAD) {
26 | return new PreGingerScroller(context);
27 | } else if (VERSION.SDK_INT < VERSION_CODES.ICE_CREAM_SANDWICH) {
28 | return new GingerScroller(context);
29 | } else {
30 | return new IcsScroller(context);
31 | }
32 | }
33 |
34 | public abstract boolean computeScrollOffset();
35 |
36 | public abstract void fling(int startX, int startY, int velocityX, int velocityY, int minX, int maxX, int minY,
37 | int maxY, int overX, int overY);
38 |
39 | public abstract void forceFinished(boolean finished);
40 |
41 | public abstract boolean isFinished();
42 |
43 | public abstract int getCurrX();
44 |
45 | public abstract int getCurrY();
46 |
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/photoview/view/Compat.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011, 2012 Chris Banes.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.allandroidprojects.ecomsample.photoview.view;
17 |
18 | import android.annotation.TargetApi;
19 | import android.os.Build.VERSION;
20 | import android.os.Build.VERSION_CODES;
21 | import android.view.MotionEvent;
22 | import android.view.View;
23 |
24 | public class Compat {
25 |
26 | private static final int SIXTY_FPS_INTERVAL = 1000 / 60;
27 |
28 | public static void postOnAnimation(View view, Runnable runnable) {
29 | if (VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) {
30 | postOnAnimationJellyBean(view, runnable);
31 | } else {
32 | view.postDelayed(runnable, SIXTY_FPS_INTERVAL);
33 | }
34 | }
35 |
36 | @TargetApi(16)
37 | private static void postOnAnimationJellyBean(View view, Runnable runnable) {
38 | view.postOnAnimation(runnable);
39 | }
40 |
41 | public static int getPointerIndex(int action) {
42 | if (VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB)
43 | return getPointerIndexHoneyComb(action);
44 | else
45 | return getPointerIndexEclair(action);
46 | }
47 |
48 | @SuppressWarnings("deprecation")
49 | @TargetApi(VERSION_CODES.ECLAIR)
50 | private static int getPointerIndexEclair(int action) {
51 | return (action & MotionEvent.ACTION_POINTER_ID_MASK) >> MotionEvent.ACTION_POINTER_ID_SHIFT;
52 | }
53 |
54 | @TargetApi(VERSION_CODES.HONEYCOMB)
55 | private static int getPointerIndexHoneyComb(int action) {
56 | return (action & MotionEvent.ACTION_POINTER_INDEX_MASK) >> MotionEvent.ACTION_POINTER_INDEX_SHIFT;
57 | }
58 |
59 | }
60 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/photoview/view/DefaultOnDoubleTapListener.java:
--------------------------------------------------------------------------------
1 | package com.allandroidprojects.ecomsample.photoview.view;
2 |
3 | import android.graphics.RectF;
4 | import android.view.GestureDetector;
5 | import android.view.MotionEvent;
6 | import android.widget.ImageView;
7 |
8 | /**
9 | * Provided default implementation of GestureDetector.OnDoubleTapListener, to be overriden with custom behavior, if needed
10 | *
11 | * To be used via {@link PhotoViewAttacher#setOnDoubleTapListener(GestureDetector.OnDoubleTapListener)}
12 | */
13 | public class DefaultOnDoubleTapListener implements GestureDetector.OnDoubleTapListener {
14 |
15 | private PhotoViewAttacher photoViewAttacher;
16 |
17 | /**
18 | * Default constructor
19 | *
20 | * @param photoViewAttacher PhotoViewAttacher to bind to
21 | */
22 | public DefaultOnDoubleTapListener(PhotoViewAttacher photoViewAttacher) {
23 | setPhotoViewAttacher(photoViewAttacher);
24 | }
25 |
26 | /**
27 | * Allows to change PhotoViewAttacher within range of single instance
28 | *
29 | * @param newPhotoViewAttacher PhotoViewAttacher to bind to
30 | */
31 | public void setPhotoViewAttacher(PhotoViewAttacher newPhotoViewAttacher) {
32 | this.photoViewAttacher = newPhotoViewAttacher;
33 | }
34 |
35 | @Override
36 | public boolean onSingleTapConfirmed(MotionEvent e) {
37 | if (this.photoViewAttacher == null)
38 | return false;
39 |
40 | ImageView imageView = photoViewAttacher.getImageView();
41 |
42 | if (null != photoViewAttacher.getOnPhotoTapListener()) {
43 | final RectF displayRect = photoViewAttacher.getDisplayRect();
44 |
45 | if (null != displayRect) {
46 | final float x = e.getX(), y = e.getY();
47 |
48 | // Check to see if the user tapped on the photo
49 | if (displayRect.contains(x, y)) {
50 |
51 | float xResult = (x - displayRect.left)
52 | / displayRect.width();
53 | float yResult = (y - displayRect.top)
54 | / displayRect.height();
55 |
56 | photoViewAttacher.getOnPhotoTapListener().onPhotoTap(imageView, xResult, yResult);
57 | return true;
58 | }
59 | }
60 | }
61 | if (null != photoViewAttacher.getOnViewTapListener()) {
62 | photoViewAttacher.getOnViewTapListener().onViewTap(imageView, e.getX(), e.getY());
63 | }
64 |
65 | return false;
66 | }
67 |
68 | @Override
69 | public boolean onDoubleTap(MotionEvent ev) {
70 | if (photoViewAttacher == null)
71 | return false;
72 |
73 | try {
74 | float scale = photoViewAttacher.getScale();
75 | float x = ev.getX();
76 | float y = ev.getY();
77 |
78 | if (scale < photoViewAttacher.getMediumScale()) {
79 | photoViewAttacher.setScale(photoViewAttacher.getMediumScale(), x, y, true);
80 | } else if (scale >= photoViewAttacher.getMediumScale() && scale < photoViewAttacher.getMaximumScale()) {
81 | photoViewAttacher.setScale(photoViewAttacher.getMaximumScale(), x, y, true);
82 | } else {
83 | photoViewAttacher.setScale(photoViewAttacher.getMinimumScale(), x, y, true);
84 | }
85 | } catch (ArrayIndexOutOfBoundsException e) {
86 | // Can sometimes happen when getX() and getY() is called
87 | }
88 |
89 | return true;
90 | }
91 |
92 | @Override
93 | public boolean onDoubleTapEvent(MotionEvent e) {
94 | // Wait for the confirmed onDoubleTap() instead
95 | return false;
96 | }
97 |
98 | }
99 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/product/ItemDetailsActivity.java:
--------------------------------------------------------------------------------
1 | package com.allandroidprojects.ecomsample.product;
2 |
3 | import android.content.Intent;
4 | import android.net.Uri;
5 | import android.support.v7.app.AppCompatActivity;
6 | import android.os.Bundle;
7 | import android.view.View;
8 | import android.widget.TextView;
9 | import android.widget.Toast;
10 | import com.allandroidprojects.ecomsample.R;
11 | import com.allandroidprojects.ecomsample.fragments.ImageListFragment;
12 | import com.allandroidprojects.ecomsample.fragments.ViewPagerActivity;
13 | import com.allandroidprojects.ecomsample.notification.NotificationCountSetClass;
14 | import com.allandroidprojects.ecomsample.options.CartListActivity;
15 | import com.allandroidprojects.ecomsample.startup.MainActivity;
16 | import com.allandroidprojects.ecomsample.utility.ImageUrlUtils;
17 | import com.facebook.drawee.view.SimpleDraweeView;
18 |
19 | public class ItemDetailsActivity extends AppCompatActivity {
20 | int imagePosition;
21 | String stringImageUri;
22 | @Override
23 | protected void onCreate(Bundle savedInstanceState) {
24 | super.onCreate(savedInstanceState);
25 | setContentView(R.layout.activity_item_details);
26 | SimpleDraweeView mImageView = (SimpleDraweeView)findViewById(R.id.image1);
27 | TextView textViewAddToCart = (TextView)findViewById(R.id.text_action_bottom1);
28 | TextView textViewBuyNow = (TextView)findViewById(R.id.text_action_bottom2);
29 |
30 | //Getting image uri from previous screen
31 | if (getIntent() != null) {
32 | stringImageUri = getIntent().getStringExtra(ImageListFragment.STRING_IMAGE_URI);
33 | imagePosition = getIntent().getIntExtra(ImageListFragment.STRING_IMAGE_URI,0);
34 | }
35 | Uri uri = Uri.parse(stringImageUri);
36 | mImageView.setImageURI(uri);
37 | mImageView.setOnClickListener(new View.OnClickListener() {
38 | @Override
39 | public void onClick(View v) {
40 | Intent intent = new Intent(ItemDetailsActivity.this, ViewPagerActivity.class);
41 | intent.putExtra("position", imagePosition);
42 | startActivity(intent);
43 |
44 | }
45 | });
46 |
47 | textViewAddToCart.setOnClickListener(new View.OnClickListener() {
48 | @Override
49 | public void onClick(View view) {
50 | ImageUrlUtils imageUrlUtils = new ImageUrlUtils();
51 | imageUrlUtils.addCartListImageUri(stringImageUri);
52 | Toast.makeText(ItemDetailsActivity.this,"Item added to cart.",Toast.LENGTH_SHORT).show();
53 | MainActivity.notificationCountCart++;
54 | NotificationCountSetClass.setNotifyCount(MainActivity.notificationCountCart);
55 | }
56 | });
57 |
58 | textViewBuyNow.setOnClickListener(new View.OnClickListener() {
59 | @Override
60 | public void onClick(View view) {
61 | ImageUrlUtils imageUrlUtils = new ImageUrlUtils();
62 | imageUrlUtils.addCartListImageUri(stringImageUri);
63 | MainActivity.notificationCountCart++;
64 | NotificationCountSetClass.setNotifyCount(MainActivity.notificationCountCart);
65 | startActivity(new Intent(ItemDetailsActivity.this, CartListActivity.class));
66 |
67 | }
68 | });
69 |
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/startup/FrescoApplication.java:
--------------------------------------------------------------------------------
1 | package com.allandroidprojects.ecomsample.startup;
2 |
3 | import android.app.Application;
4 | import com.allandroidprojects.ecomsample.cache.ImagePipelineConfigFactory;
5 | import com.facebook.drawee.backends.pipeline.Fresco;
6 |
7 | /**
8 | * Created by 06peng on 2015/6/24.
9 | */
10 | public class FrescoApplication extends Application {
11 |
12 | @Override
13 | public void onCreate() {
14 | super.onCreate();
15 | Fresco.initialize(this, ImagePipelineConfigFactory.getImagePipelineConfig(this));
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/startup/SplashActivity.java:
--------------------------------------------------------------------------------
1 | package com.allandroidprojects.ecomsample.startup;
2 |
3 | import android.app.Activity;
4 | import android.content.Intent;
5 | import android.os.Build;
6 | import android.os.Bundle;
7 | import android.view.View;
8 | import android.view.WindowManager;
9 | import android.view.animation.Animation;
10 | import android.view.animation.AnimationUtils;
11 | import android.widget.LinearLayout;
12 | import com.allandroidprojects.ecomsample.R;
13 |
14 | public class SplashActivity extends Activity implements Animation.AnimationListener {
15 | Animation animFadeIn;
16 | LinearLayout linearLayout;
17 |
18 | @Override
19 | protected void onCreate(Bundle savedInstanceState) {
20 | super.onCreate(savedInstanceState);
21 | setContentView(R.layout.activity_splash);
22 |
23 | if (Build.VERSION.SDK_INT < 16) {
24 | getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
25 | WindowManager.LayoutParams.FLAG_FULLSCREEN);
26 |
27 | } else {
28 | View decorView = getWindow().getDecorView();
29 | // Hide the status bar.
30 | int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
31 | decorView.setSystemUiVisibility(uiOptions);
32 | // Remember that you should never show the action bar if the
33 | // status bar is hidden, so hide that too if necessary.
34 | }
35 | // load the animation
36 | animFadeIn = AnimationUtils.loadAnimation(getApplicationContext(),
37 | R.anim.animation_fade_in);
38 | // set animation listener
39 | animFadeIn.setAnimationListener(this);
40 | // animation for image
41 | linearLayout = (LinearLayout) findViewById(R.id.layout_linear);
42 | // start the animation
43 | linearLayout.setVisibility(View.VISIBLE);
44 | linearLayout.startAnimation(animFadeIn);
45 |
46 | }
47 |
48 | @Override
49 | public void onBackPressed() {
50 | this.finish();
51 | super.onBackPressed();
52 | }
53 |
54 | @Override
55 | public void onAnimationStart(Animation animation) {
56 | //under Implementation
57 | }
58 |
59 | public void onAnimationEnd(Animation animation) {
60 | // Start Main Screen
61 | Intent i = new Intent(SplashActivity.this, WelcomeActivity.class);
62 | startActivity(i);
63 | this.finish();
64 | }
65 |
66 | @Override
67 | public void onAnimationRepeat(Animation animation) {
68 | //under Implementation
69 | }
70 |
71 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/startup/WelcomeActivity.java:
--------------------------------------------------------------------------------
1 | package com.allandroidprojects.ecomsample.startup;
2 |
3 | import android.content.Context;
4 | import android.content.Intent;
5 | import android.graphics.Color;
6 | import android.os.Build;
7 | import android.os.Bundle;
8 | import android.support.v4.view.PagerAdapter;
9 | import android.support.v4.view.ViewPager;
10 | import android.support.v7.app.AppCompatActivity;
11 | import android.text.Html;
12 | import android.view.LayoutInflater;
13 | import android.view.View;
14 | import android.view.ViewGroup;
15 | import android.view.Window;
16 | import android.view.WindowManager;
17 | import android.widget.Button;
18 | import android.widget.LinearLayout;
19 | import android.widget.TextView;
20 |
21 | import com.allandroidprojects.ecomsample.R;
22 | import com.allandroidprojects.ecomsample.utility.PrefManager;
23 |
24 | public class WelcomeActivity extends AppCompatActivity {
25 |
26 | private ViewPager viewPager;
27 | private MyViewPagerAdapter myViewPagerAdapter;
28 | private LinearLayout dotsLayout;
29 | private TextView[] dots;
30 | private int[] layouts;
31 | private Button btnSkip, btnNext;
32 | private PrefManager prefManager;
33 |
34 | @Override
35 | protected void onCreate(Bundle savedInstanceState) {
36 | super.onCreate(savedInstanceState);
37 |
38 | // Checking for first time launch - before calling setContentView()
39 | prefManager = new PrefManager(this);
40 | if (!prefManager.isFirstTimeLaunch()) {
41 | launchHomeScreen();
42 | finish();
43 | }
44 |
45 | // Making notification bar transparent
46 | if (Build.VERSION.SDK_INT >= 21) {
47 | getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
48 | }
49 |
50 | setContentView(R.layout.activity_welcome);
51 |
52 | viewPager = (ViewPager) findViewById(R.id.view_pager);
53 | dotsLayout = (LinearLayout) findViewById(R.id.layoutDots);
54 | btnSkip = (Button) findViewById(R.id.btn_skip);
55 | btnNext = (Button) findViewById(R.id.btn_next);
56 |
57 |
58 | // layouts of all welcome sliders
59 | // add few more layouts if you want
60 | layouts = new int[]{
61 | R.layout.welcome_slide1,
62 | R.layout.welcome_slide2,
63 | R.layout.welcome_slide3,
64 | R.layout.welcome_slide4};
65 |
66 | // adding bottom dots
67 | addBottomDots(0);
68 |
69 | // making notification bar transparent
70 | changeStatusBarColor();
71 |
72 | myViewPagerAdapter = new MyViewPagerAdapter();
73 | viewPager.setAdapter(myViewPagerAdapter);
74 | viewPager.addOnPageChangeListener(viewPagerPageChangeListener);
75 |
76 | btnSkip.setOnClickListener(new View.OnClickListener() {
77 | @Override
78 | public void onClick(View v) {
79 | launchHomeScreen();
80 | }
81 | });
82 |
83 | btnNext.setOnClickListener(new View.OnClickListener() {
84 | @Override
85 | public void onClick(View v) {
86 | // checking for last page
87 | // if last page home screen will be launched
88 | int current = getItem(+1);
89 | if (current < layouts.length) {
90 | // move to next screen
91 | viewPager.setCurrentItem(current);
92 | } else {
93 | launchHomeScreen();
94 | }
95 | }
96 | });
97 | }
98 |
99 | private void addBottomDots(int currentPage) {
100 | dots = new TextView[layouts.length];
101 |
102 | int[] colorsActive = getResources().getIntArray(R.array.array_dot_active);
103 | int[] colorsInactive = getResources().getIntArray(R.array.array_dot_inactive);
104 |
105 | dotsLayout.removeAllViews();
106 | for (int i = 0; i < dots.length; i++) {
107 | dots[i] = new TextView(this);
108 | dots[i].setText(Html.fromHtml("•"));
109 | dots[i].setTextSize(35);
110 | dots[i].setTextColor(colorsInactive[currentPage]);
111 | dotsLayout.addView(dots[i]);
112 | }
113 |
114 | if (dots.length > 0)
115 | dots[currentPage].setTextColor(colorsActive[currentPage]);
116 | }
117 |
118 | private int getItem(int i) {
119 | return viewPager.getCurrentItem() + i;
120 | }
121 |
122 | private void launchHomeScreen() {
123 | prefManager.setFirstTimeLaunch(false);
124 | startActivity(new Intent(WelcomeActivity.this, MainActivity.class));
125 | finish();
126 | }
127 |
128 | // viewpager change listener
129 | ViewPager.OnPageChangeListener viewPagerPageChangeListener = new ViewPager.OnPageChangeListener() {
130 |
131 | @Override
132 | public void onPageSelected(int position) {
133 | addBottomDots(position);
134 |
135 | // changing the next button text 'NEXT' / 'GOT IT'
136 | if (position == layouts.length - 1) {
137 | // last page. make button text to GOT IT
138 | btnNext.setText(getString(R.string.start));
139 | btnSkip.setVisibility(View.GONE);
140 | } else {
141 | // still pages are left
142 | btnNext.setText(getString(R.string.next));
143 | btnSkip.setVisibility(View.VISIBLE);
144 | }
145 | }
146 |
147 | @Override
148 | public void onPageScrolled(int arg0, float arg1, int arg2) {
149 |
150 | }
151 |
152 | @Override
153 | public void onPageScrollStateChanged(int arg0) {
154 |
155 | }
156 | };
157 |
158 | /**
159 | * Making notification bar transparent
160 | */
161 | private void changeStatusBarColor() {
162 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
163 | Window window = getWindow();
164 | window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
165 | window.setStatusBarColor(Color.TRANSPARENT);
166 | }
167 | }
168 |
169 | /**
170 | * View pager adapter
171 | */
172 | public class MyViewPagerAdapter extends PagerAdapter {
173 | private LayoutInflater layoutInflater;
174 |
175 | public MyViewPagerAdapter() {
176 | }
177 |
178 | @Override
179 | public Object instantiateItem(ViewGroup container, int position) {
180 | layoutInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
181 |
182 | View view = layoutInflater.inflate(layouts[position], container, false);
183 | container.addView(view);
184 |
185 | return view;
186 | }
187 |
188 | @Override
189 | public int getCount() {
190 | return layouts.length;
191 | }
192 |
193 | @Override
194 | public boolean isViewFromObject(View view, Object obj) {
195 | return view == obj;
196 | }
197 |
198 |
199 | @Override
200 | public void destroyItem(ViewGroup container, int position, Object object) {
201 | View view = (View) object;
202 | container.removeView(view);
203 | }
204 | }
205 | }
206 |
--------------------------------------------------------------------------------
/app/src/main/java/com/allandroidprojects/ecomsample/utility/PrefManager.java:
--------------------------------------------------------------------------------
1 | package com.allandroidprojects.ecomsample.utility;
2 |
3 | import android.content.Context;
4 | import android.content.SharedPreferences;
5 |
6 | /**
7 | * Created by Lincoln on 05/05/16.
8 | */
9 | public class PrefManager {
10 | SharedPreferences pref;
11 | SharedPreferences.Editor editor;
12 | Context _context;
13 |
14 | // shared pref mode
15 | int PRIVATE_MODE = 0;
16 |
17 | // Shared preferences constants
18 | private static final String PREF_NAME = "MyPreference";
19 | private static final String IS_FIRST_TIME_LAUNCH = "IsFirstTimeLaunch";
20 |
21 |
22 | public PrefManager(Context context) {
23 | this._context = context;
24 | pref = _context.getSharedPreferences(PREF_NAME, PRIVATE_MODE);
25 | editor = pref.edit();
26 | }
27 |
28 | public void setFirstTimeLaunch(boolean isFirstTime) {
29 | editor.putBoolean(IS_FIRST_TIME_LAUNCH, isFirstTime);
30 | editor.commit();
31 | }
32 |
33 | public boolean isFirstTimeLaunch() {
34 | return pref.getBoolean(IS_FIRST_TIME_LAUNCH, true);
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/animation_fade_in.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_account_circle_black_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-hdpi/ic_account_circle_black_48dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_book_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-hdpi/ic_book_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_card_giftcard_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-hdpi/ic_card_giftcard_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_clear_black_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-hdpi/ic_clear_black_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_delete_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-hdpi/ic_delete_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_discount.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-hdpi/ic_discount.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_favorite_black_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-hdpi/ic_favorite_black_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_favorite_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-hdpi/ic_favorite_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_favorite_border_black_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-hdpi/ic_favorite_border_black_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_filter_none_black_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-hdpi/ic_filter_none_black_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_food.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-hdpi/ic_food.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_local_dining_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-hdpi/ic_local_dining_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_local_offer_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-hdpi/ic_local_offer_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_mode_edit_black_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-hdpi/ic_mode_edit_black_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_more_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-hdpi/ic_more_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_movie.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-hdpi/ic_movie.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_notifications_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-hdpi/ic_notifications_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_person_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-hdpi/ic_person_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_search_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-hdpi/ic_search_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_share_black_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-hdpi/ic_share_black_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_shopping_basket_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-hdpi/ic_shopping_basket_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_shopping_cart_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-hdpi/ic_shopping_cart_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_shopping_cart_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-hdpi/ic_shopping_cart_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_smartphone_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-hdpi/ic_smartphone_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_travel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-hdpi/ic_travel.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_wc_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-hdpi/ic_wc_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_account_circle_black_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-mdpi/ic_account_circle_black_48dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_book_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-mdpi/ic_book_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_card_giftcard_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-mdpi/ic_card_giftcard_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_clear_black_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-mdpi/ic_clear_black_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_delete_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-mdpi/ic_delete_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_discount.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-mdpi/ic_discount.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_favorite_black_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-mdpi/ic_favorite_black_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_favorite_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-mdpi/ic_favorite_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_favorite_border_black_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-mdpi/ic_favorite_border_black_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_filter_none_black_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-mdpi/ic_filter_none_black_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_food.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-mdpi/ic_food.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_local_dining_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-mdpi/ic_local_dining_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_local_offer_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-mdpi/ic_local_offer_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_mode_edit_black_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-mdpi/ic_mode_edit_black_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_more_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-mdpi/ic_more_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_movie.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-mdpi/ic_movie.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_notifications_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-mdpi/ic_notifications_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_person_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-mdpi/ic_person_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_search_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-mdpi/ic_search_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_share_black_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-mdpi/ic_share_black_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_shopping_basket_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-mdpi/ic_shopping_basket_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_shopping_cart_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-mdpi/ic_shopping_cart_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_shopping_cart_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-mdpi/ic_shopping_cart_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_smartphone_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-mdpi/ic_smartphone_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_travel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-mdpi/ic_travel.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_wc_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-mdpi/ic_wc_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v21/ic_menu_camera.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v21/ic_menu_gallery.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v21/ic_menu_manage.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v21/ic_menu_send.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v21/ic_menu_share.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v21/ic_menu_slideshow.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_account_circle_black_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xhdpi/ic_account_circle_black_48dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_book_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xhdpi/ic_book_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_card_giftcard_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xhdpi/ic_card_giftcard_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_clear_black_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xhdpi/ic_clear_black_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_delete_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xhdpi/ic_delete_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_discount.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xhdpi/ic_discount.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_favorite_black_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xhdpi/ic_favorite_black_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_favorite_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xhdpi/ic_favorite_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_favorite_border_black_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xhdpi/ic_favorite_border_black_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_filter_none_black_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xhdpi/ic_filter_none_black_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_food.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xhdpi/ic_food.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_local_dining_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xhdpi/ic_local_dining_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_local_offer_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xhdpi/ic_local_offer_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_mode_edit_black_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xhdpi/ic_mode_edit_black_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_more_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xhdpi/ic_more_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_movie.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xhdpi/ic_movie.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_notifications_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xhdpi/ic_notifications_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_person_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xhdpi/ic_person_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_search_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xhdpi/ic_search_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_share_black_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xhdpi/ic_share_black_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_shopping_basket_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xhdpi/ic_shopping_basket_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_shopping_cart_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xhdpi/ic_shopping_cart_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_shopping_cart_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xhdpi/ic_shopping_cart_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_smartphone_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xhdpi/ic_smartphone_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_travel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xhdpi/ic_travel.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_wc_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xhdpi/ic_wc_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_account_circle_black_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xxhdpi/ic_account_circle_black_48dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_apps_black_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xxhdpi/ic_apps_black_48dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_book_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xxhdpi/ic_book_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_card_giftcard_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xxhdpi/ic_card_giftcard_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_clear_black_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xxhdpi/ic_clear_black_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_delete_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xxhdpi/ic_delete_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_discount.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xxhdpi/ic_discount.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_favorite_black_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xxhdpi/ic_favorite_black_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_favorite_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xxhdpi/ic_favorite_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_favorite_border_black_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xxhdpi/ic_favorite_border_black_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_filter_none_black_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xxhdpi/ic_filter_none_black_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_food.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xxhdpi/ic_food.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_local_dining_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xxhdpi/ic_local_dining_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_local_offer_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xxhdpi/ic_local_offer_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_more_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xxhdpi/ic_more_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_movie.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xxhdpi/ic_movie.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_notifications_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xxhdpi/ic_notifications_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_person_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xxhdpi/ic_person_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_search_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xxhdpi/ic_search_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_share_black_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xxhdpi/ic_share_black_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_shopping_basket_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xxhdpi/ic_shopping_basket_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_shopping_cart_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xxhdpi/ic_shopping_cart_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_shopping_cart_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xxhdpi/ic_shopping_cart_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_smartphone_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xxhdpi/ic_smartphone_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_travel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xxhdpi/ic_travel.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_wc_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xxhdpi/ic_wc_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_discount.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xxxhdpi/ic_discount.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_food.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xxxhdpi/ic_food.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_movie.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xxxhdpi/ic_movie.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_travel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/drawable-xxxhdpi/ic_travel.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_menu_notifications.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_cart_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
20 |
25 |
26 |
27 |
28 |
37 |
47 |
48 |
58 |
59 |
63 |
64 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_empty.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
15 |
16 |
17 |
28 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
16 |
17 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_search_result.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_splash.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_view_pager.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_welcome.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
14 |
15 |
23 |
24 |
30 |
31 |
40 |
41 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/app_bar_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
15 |
16 |
22 |
27 |
28 |
29 |
30 |
31 |
32 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/content_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/empty_message_layout_action.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
20 |
21 |
22 |
32 |
33 |
42 |
43 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_cartlist_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
11 |
17 |
23 |
28 |
32 |
38 |
42 |
46 |
50 |
55 |
56 |
57 |
58 |
59 |
63 |
64 |
70 |
71 |
78 |
81 |
90 |
91 |
92 |
95 |
96 |
103 |
107 |
116 |
117 |
118 |
119 |
124 |
125 |
126 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_recylerview_list.xml:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_wishlist_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
11 |
17 |
23 |
28 |
32 |
37 |
38 |
44 |
45 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/list_item.xml:
--------------------------------------------------------------------------------
1 |
16 |
26 |
27 |
31 |
36 |
37 |
43 |
48 |
53 |
57 |
62 |
63 |
69 |
70 |
71 |
72 |
73 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/nav_header_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
22 |
23 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/welcome_slide1.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
18 |
19 |
26 |
27 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/welcome_slide2.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
18 |
19 |
26 |
27 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/welcome_slide3.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
18 |
19 |
26 |
27 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/welcome_slide4.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
18 |
19 |
26 |
27 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/activity_main_drawer.xml:
--------------------------------------------------------------------------------
1 |
2 |
71 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
10 |
14 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/search_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_bag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/mipmap-hdpi/ic_launcher_bag.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_bag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/mipmap-mdpi/ic_launcher_bag.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_bag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/app/src/main/res/mipmap-xxhdpi/ic_launcher_bag.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/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 | #E91E63
4 | #C2185B
5 | #651FFF
6 |
7 | #000000
8 | #FFFFFF
9 | #43A047
10 | #E0E0E0
11 |
12 |
13 | #f64c73
14 |
15 |
16 | #d1395c
17 |
18 |
19 | #f98da5
20 |
21 |
22 | #999999
23 |
24 |
25 | - @color/dot_light_screen1
26 | - @color/dot_light_screen1
27 | - @color/dot_light_screen1
28 | - @color/dot_light_screen1
29 |
30 |
31 |
32 | - @color/dot_dark_screen1
33 | - @color/dot_dark_screen1
34 | - @color/dot_dark_screen1
35 | - @color/dot_dark_screen1
36 |
37 |
38 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 120dp
5 |
6 | 16dp
7 | 16dp
8 | 16dp
9 | 30dp
10 | 20dp
11 | 120dp
12 | 30dp
13 | 16dp
14 | 40dp
15 | 1dp
16 | 0.5dp
17 | 4dp
18 | 8dp
19 |
20 | 8dp
21 | 10dp
22 | 12dp
23 | 14dp
24 | 16dp
25 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/values/drawables.xml:
--------------------------------------------------------------------------------
1 |
2 | - @android:drawable/ic_menu_camera
3 | - @android:drawable/ic_menu_gallery
4 | - @android:drawable/ic_menu_slideshow
5 | - @android:drawable/ic_menu_manage
6 | - @android:drawable/ic_menu_share
7 | - @android:drawable/ic_menu_send
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | EcomSample
3 |
4 | Open navigation drawer
5 | Close navigation drawer
6 |
7 |
8 | Settings
9 | Search
10 | Cart
11 | Notifications
12 |
13 | Offers
14 | Electronics
15 | Lifestyle
16 | Home Appliances
17 | Books \u0026 More
18 | More
19 |
20 | My Profile
21 | My Rewards
22 | My Orders
23 | My Cart
24 | My Wishlist
25 | My Account
26 |
27 | Help \u0026 Support
28 | Contact Us
29 | Terms \u0026 Conditions
30 | Help Center
31 |
32 | Search for Products, Brands and More
33 |
34 |
35 |
36 | Home Screen
37 | NEXT
38 | SKIP
39 | GOT IT
40 |
41 | Hello Food!
42 | The easiest way to order food from your favourite restaurant!
43 |
44 |
45 | Movie Tickets
46 | Book movie tickets for your family and friends!
47 |
48 | Great Discounts
49 | Best discounts on every single service we offer!
50 |
51 | World Travel
52 | Book tickets of any transportation and travel the world!
53 |
54 | To see the welcome slider again, goto Settings -> apps -> welcome
55 | slider -> clear data
56 |
57 | Play Again
58 |
59 |
60 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/searchable.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/src/test/java/com/allandroidprojects/ecomsample/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.allandroidprojects.ecomsample;
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.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.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=-Xmx512m -XX:MaxPermSize=512m
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 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/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.14.1-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/screenshots/Screenshot_2016-11-04-11-15-57-793_com.allandroidprojects.ecomsample.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/screenshots/Screenshot_2016-11-04-11-15-57-793_com.allandroidprojects.ecomsample.jpg
--------------------------------------------------------------------------------
/screenshots/Screenshot_2016-11-04-11-16-39-455_com.allandroidprojects.ecomsample.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/screenshots/Screenshot_2016-11-04-11-16-39-455_com.allandroidprojects.ecomsample.jpg
--------------------------------------------------------------------------------
/screenshots/Screenshot_2016-11-04-11-17-25-951_com.allandroidprojects.ecomsample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/screenshots/Screenshot_2016-11-04-11-17-25-951_com.allandroidprojects.ecomsample.png
--------------------------------------------------------------------------------
/screenshots/Screenshot_2016-11-04-11-17-56-774_com.allandroidprojects.ecomsample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/screenshots/Screenshot_2016-11-04-11-17-56-774_com.allandroidprojects.ecomsample.png
--------------------------------------------------------------------------------
/screenshots/Screenshot_2016-11-04-11-18-40-835_com.allandroidprojects.ecomsample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/screenshots/Screenshot_2016-11-04-11-18-40-835_com.allandroidprojects.ecomsample.png
--------------------------------------------------------------------------------
/screenshots/Screenshot_2016-11-04-11-20-58-621_com.allandroidprojects.ecomsample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MukeshKumar009/EcomSample/6be88b18e0ef803a8896afdfdfeb612b45345cd7/screenshots/Screenshot_2016-11-04-11-20-58-621_com.allandroidprojects.ecomsample.png
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------