├── .gitattributes
├── .gitignore
├── .idea
├── caches
│ └── build_file_checksums.ser
├── compiler.xml
├── copyright
│ ├── hitesh.xml
│ └── profiles_settings.xml
├── dictionaries
│ └── Hitesh_Sahu.xml
├── gradle.xml
├── jarRepositories.xml
├── libraries
│ ├── Gradle____app_libs_com_google_guava_1_6_0_jar.xml
│ ├── Gradle__androidx_activity_activity_1_0_0_aar.xml
│ ├── Gradle__androidx_annotation_annotation_1_1_0.xml
│ ├── Gradle__androidx_annotation_annotation_experimental_1_0_0_aar.xml
│ ├── Gradle__androidx_appcompat_appcompat_1_2_0_aar.xml
│ ├── Gradle__androidx_appcompat_appcompat_resources_1_2_0_aar.xml
│ ├── Gradle__androidx_arch_core_core_common_2_1_0.xml
│ ├── Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml
│ ├── Gradle__androidx_asynclayoutinflater_asynclayoutinflater_1_0_0_aar.xml
│ ├── Gradle__androidx_cardview_cardview_1_0_0_aar.xml
│ ├── Gradle__androidx_collection_collection_1_1_0.xml
│ ├── Gradle__androidx_constraintlayout_constraintlayout_2_0_1_aar.xml
│ ├── Gradle__androidx_constraintlayout_constraintlayout_solver_2_0_1.xml
│ ├── Gradle__androidx_coordinatorlayout_coordinatorlayout_1_1_0_aar.xml
│ ├── Gradle__androidx_core_core_1_3_2_aar.xml
│ ├── Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml
│ ├── Gradle__androidx_customview_customview_1_0_0_aar.xml
│ ├── Gradle__androidx_documentfile_documentfile_1_0_0_aar.xml
│ ├── Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml
│ ├── Gradle__androidx_dynamicanimation_dynamicanimation_1_0_0_aar.xml
│ ├── Gradle__androidx_fragment_fragment_1_1_0_aar.xml
│ ├── Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml
│ ├── Gradle__androidx_legacy_legacy_support_core_ui_1_0_0_aar.xml
│ ├── Gradle__androidx_legacy_legacy_support_core_utils_1_0_0_aar.xml
│ ├── Gradle__androidx_legacy_legacy_support_v4_1_0_0_aar.xml
│ ├── Gradle__androidx_lifecycle_lifecycle_common_2_1_0.xml
│ ├── Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml
│ ├── Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml
│ ├── Gradle__androidx_lifecycle_lifecycle_runtime_2_1_0_aar.xml
│ ├── Gradle__androidx_lifecycle_lifecycle_viewmodel_2_1_0_aar.xml
│ ├── Gradle__androidx_loader_loader_1_0_0_aar.xml
│ ├── Gradle__androidx_localbroadcastmanager_localbroadcastmanager_1_0_0_aar.xml
│ ├── Gradle__androidx_media_media_1_0_0_aar.xml
│ ├── Gradle__androidx_palette_palette_1_0_0_aar.xml
│ ├── Gradle__androidx_print_print_1_0_0_aar.xml
│ ├── Gradle__androidx_recyclerview_recyclerview_1_2_0_aar.xml
│ ├── Gradle__androidx_savedstate_savedstate_1_0_0_aar.xml
│ ├── Gradle__androidx_slidingpanelayout_slidingpanelayout_1_0_0_aar.xml
│ ├── Gradle__androidx_swiperefreshlayout_swiperefreshlayout_1_0_0_aar.xml
│ ├── Gradle__androidx_transition_transition_1_2_0_aar.xml
│ ├── Gradle__androidx_vectordrawable_vectordrawable_1_1_0_aar.xml
│ ├── Gradle__androidx_vectordrawable_vectordrawable_animated_1_1_0_aar.xml
│ ├── Gradle__androidx_versionedparcelable_versionedparcelable_1_1_0_aar.xml
│ ├── Gradle__androidx_viewpager2_viewpager2_1_0_0_aar.xml
│ ├── Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml
│ ├── Gradle__ch_acra_acra_4_8_5_aar.xml
│ ├── Gradle__com_flaviofaria_kenburnsview_1_0_7.xml
│ ├── Gradle__com_github_PhilJay_MPAndroidChart_v3_0_2.xml
│ ├── Gradle__com_github_bumptech_glide_glide_3_7_0.xml
│ ├── Gradle__com_google_android_material_material_1_3_0_aar.xml
│ ├── Gradle__com_google_code_gson_gson_2_8_5.xml
│ ├── Gradle__com_nineoldandroids_library_2_4_0.xml
│ ├── Gradle__com_squareup_picasso_picasso_2_5_2.xml
│ ├── Gradle__com_wang_avi_library_1_0_5_aar.xml
│ ├── MPAndroidChart_v3_0_2.xml
│ ├── acra_4_8_5.xml
│ ├── animated_vector_drawable_23_4_0.xml
│ ├── appcompat_v7_23_4_0.xml
│ ├── cardview_v7_23_4_0.xml
│ ├── com_google_guava_1_6_0.xml
│ ├── design_23_4_0.xml
│ ├── glide_3_7_0.xml
│ ├── gson_2_4.xml
│ ├── kenburnsview_1_0_7.xml
│ ├── library_1_0_5.xml
│ ├── library_2_4_0.xml
│ ├── palette_v7_23_4_0.xml
│ ├── picasso_2_5_2.xml
│ ├── recyclerview_v7_23_4_0.xml
│ ├── support_annotations_23_4_0.xml
│ ├── support_v4_23_4_0.xml
│ └── support_vector_drawable_23_4_0.xml
├── misc.xml
├── modules.xml
├── vcs.xml
└── workspace.xml
├── Art
├── checkout_screen_visble_amount.png
├── collapsable_header_category.png
├── drag_drop_swipe_dismiss.png
├── empty_cart.png
├── home_screen.png
├── nav_drawer.png
├── persistance_storage_onrelaunch.png
├── product_category.png
├── product_detail.png
├── product_detail_from_cart.png
├── product_detail_suggestions.png
├── splash.png
├── visivle_total_amount.png
└── visivle_total_amount_from_product_detail.png
├── ECommerce-App-Android.zip
├── README.md
├── app
├── build.gradle
├── libs
│ └── com.google.guava_1.6.0.jar
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── assets
│ └── font
│ │ ├── CircleD_Font_by_CrazyForMusic.ttf
│ │ └── DS-DIGIT.TTF
│ ├── java
│ └── com
│ │ └── hitesh_sahu
│ │ └── retailapp
│ │ ├── AppController.java
│ │ ├── domain
│ │ ├── api
│ │ │ ├── ProductCategoryLoaderTask.java
│ │ │ └── ProductLoaderTask.java
│ │ ├── helper
│ │ │ ├── Connectivity.java
│ │ │ ├── JSONParser.java
│ │ │ └── NetworkConstants.java
│ │ ├── mining
│ │ │ ├── AprioriFrequentItemsetGenerator.java
│ │ │ └── FrequentItemsetData.java
│ │ └── mock
│ │ │ └── FakeWebServer.java
│ │ ├── model
│ │ ├── CenterRepository.java
│ │ └── entities
│ │ │ ├── Money.java
│ │ │ ├── Product.java
│ │ │ └── ProductCategoryModel.java
│ │ ├── util
│ │ ├── Animatrix.java
│ │ ├── AppConstants.java
│ │ ├── ColorGenerator.java
│ │ ├── FontText.java
│ │ ├── PreferenceHelper.java
│ │ ├── TinyDB.java
│ │ └── Utils.java
│ │ └── view
│ │ ├── activities
│ │ ├── APrioriResultActivity.java
│ │ ├── ECartHomeActivity.java
│ │ └── SplashActivity.java
│ │ ├── adapter
│ │ ├── CategoryListAdapter.java
│ │ ├── ItemTouchHelperAdapter.java
│ │ ├── ProductListAdapter.java
│ │ ├── ProductsInCategoryPagerAdapter.java
│ │ ├── ShoppingListAdapter.java
│ │ └── SimilarProductsPagerAdapter.java
│ │ ├── customview
│ │ ├── ClickableViewPager.java
│ │ ├── ItemTouchHelperAdapter.java
│ │ ├── ItemTouchHelperViewHolder.java
│ │ ├── LabelView.java
│ │ ├── MathUtils.java
│ │ ├── OnStartDragListener.java
│ │ ├── ScrollableViewHelper.java
│ │ ├── SimpleItemTouchHelperCallback.java
│ │ ├── TextDrawable.java
│ │ └── ViewDragHelper.java
│ │ └── fragment
│ │ ├── ContactUsFragment.java
│ │ ├── HomeFragment.java
│ │ ├── MyCartFragment.java
│ │ ├── ProductDetailsFragment.java
│ │ ├── ProductListFragment.java
│ │ ├── ProductOverviewFragment.java
│ │ ├── SearchProductFragment.java
│ │ ├── SettingsFragment.java
│ │ └── WhatsNewDialog.java
│ └── res
│ ├── anim
│ ├── app_name_animation.xml
│ ├── app_name_animation_back.xml
│ ├── base_slide_left_out.xml
│ ├── base_slide_right_in.xml
│ ├── default_out_anim.xml
│ ├── donot_move.xml
│ ├── fade_in.xml
│ ├── fade_out.xml
│ ├── from_middle.xml
│ ├── grow_color.xml
│ ├── logo_animation.xml
│ ├── logo_animation_back.xml
│ ├── pro_animation.xml
│ ├── pro_animation_back.xml
│ ├── shrink_color.xml
│ ├── simple_grow.xml
│ ├── slide_down.xml
│ ├── slide_in_left.xml
│ ├── slide_in_right.xml
│ ├── slide_in_up.xml
│ ├── slide_left.xml
│ ├── slide_out_left.xml
│ ├── slide_out_right.xml
│ ├── slide_out_up.xml
│ ├── slide_right.xml
│ ├── slide_up.xml
│ ├── slide_up_left.xml
│ ├── slide_up_right.xml
│ └── to_middle.xml
│ ├── drawable-hdpi
│ ├── app_icon.png
│ ├── cart.jpg
│ ├── header.jpg
│ ├── ic_action_search.png
│ └── ic_drawer.png
│ ├── drawable-mdpi
│ ├── app_icon.png
│ ├── ic_action_search.png
│ └── ic_drawer.png
│ ├── drawable-nodpi
│ ├── header2.jpg
│ ├── header_1.jpg
│ └── nav_header_bg.png
│ ├── drawable-v21
│ ├── ripple.xml
│ └── ripple_accent.xml
│ ├── drawable-xhdpi
│ ├── app_icon.png
│ ├── ic_action_search.png
│ └── ic_drawer.png
│ ├── drawable-xxhdpi
│ ├── app_icon.png
│ ├── ic_action_search.png
│ └── ic_drawer.png
│ ├── drawable-xxxhdpi
│ ├── ic_action_search.png
│ └── ic_drawer.png
│ ├── drawable
│ ├── above_shadow.xml
│ ├── below_shadow.xml
│ ├── btn_feed_action.xml
│ ├── checkout_button.xml
│ ├── green_g_plus_button.xml
│ ├── ic_add_shopping_cart.png
│ ├── ico_mic.png
│ ├── img_circle_placeholder.xml
│ ├── indicator_selected.xml
│ ├── indicator_unselected.xml
│ ├── no_items_found.jpg
│ ├── round_text_add_item.xml
│ ├── round_text_cart_item.xml
│ ├── round_text_remove_item.xml
│ ├── rounder_rectangle_visa_card.xml
│ ├── shadow.xml
│ ├── simplecircle.xml
│ └── slide_down.png
│ ├── layout
│ ├── activity_apriori_result.xml
│ ├── activity_ecart.xml
│ ├── activity_splash.xml
│ ├── connection_dialog.xml
│ ├── drawer_header.xml
│ ├── frag_about.xml
│ ├── frag_category_details.xml
│ ├── frag_my_cart.xml
│ ├── frag_product_category.xml
│ ├── frag_product_detail.xml
│ ├── frag_product_list_fragment.xml
│ ├── frag_search_product.xml
│ ├── frag_settings.xml
│ ├── item_category_list.xml
│ ├── item_product_list.xml
│ ├── toolbar.xml
│ ├── toolbar_spinner.xml
│ ├── toolbar_transparent.xml
│ ├── toolbar_w_shadow.xml
│ ├── view_bottom_anchor.xml
│ └── view_show_similar.xml
│ ├── menu
│ ├── drawer.xml
│ ├── menu_apriori.xml
│ └── menu_main.xml
│ ├── values-land
│ └── dimens.xml
│ ├── values-sw600dp
│ └── dimens.xml
│ ├── values-v21
│ └── styles.xml
│ ├── values-w820dp
│ └── dimens.xml
│ ├── values
│ ├── attrs.xml
│ ├── colors.xml
│ ├── dimens.xml
│ ├── integers.xml
│ ├── strings.xml
│ └── styles.xml
│ └── xml
│ └── changelog.xml
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── import-summary.txt
└── settings.gradle
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 |
5 | # Files for the Dalvik VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # Generated files
12 | bin/
13 | gen/
14 | out/
15 |
16 | # Gradle files
17 | .gradle/
18 | build/
19 |
20 | # Local configuration file (sdk path, etc)
21 | local.properties
22 |
23 | # Proguard folder generated by Eclipse
24 | proguard/
25 |
26 | # Log Files
27 | *.log
28 |
29 | # Android Studio Navigation editor temp files
30 | .navigation/
31 |
32 | # Android Studio captures folder
33 | captures/
34 |
35 | # Intellij
36 | *.iml
37 |
38 | # Keystore files
39 | *.jks
40 |
41 | # =========================
42 | # Operating System Files
43 | # =========================
44 |
45 | # OSX
46 | # =========================
47 |
48 | .DS_Store
49 | .AppleDouble
50 | .LSOverride
51 |
52 | # Thumbnails
53 | ._*
54 |
55 | # Files that might appear in the root of a volume
56 | .DocumentRevisions-V100
57 | .fseventsd
58 | .Spotlight-V100
59 | .TemporaryItems
60 | .Trashes
61 | .VolumeIcon.icns
62 |
63 | # Directories potentially created on remote AFP share
64 | .AppleDB
65 | .AppleDesktop
66 | Network Trash Folder
67 | Temporary Items
68 | .apdisk
69 |
70 | # Windows
71 | # =========================
72 |
73 | # Windows image file caches
74 | Thumbs.db
75 | ehthumbs.db
76 |
77 | # Folder config file
78 | Desktop.ini
79 |
80 | # Recycle Bin used on file shares
81 | $RECYCLE.BIN/
82 |
83 | # Windows Installer files
84 | *.cab
85 | *.msi
86 | *.msm
87 | *.msp
88 |
89 | # Windows shortcuts
90 | *.lnk
91 |
--------------------------------------------------------------------------------
/.idea/caches/build_file_checksums.ser:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/.idea/caches/build_file_checksums.ser
--------------------------------------------------------------------------------
/.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 |
23 |
--------------------------------------------------------------------------------
/.idea/copyright/hitesh.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/.idea/dictionaries/Hitesh_Sahu.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
19 |
20 |
--------------------------------------------------------------------------------
/.idea/jarRepositories.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 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle____app_libs_com_google_guava_1_6_0_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_activity_activity_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_annotation_annotation_1_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_annotation_annotation_experimental_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_appcompat_appcompat_1_2_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_appcompat_appcompat_resources_1_2_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_arch_core_core_common_2_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_asynclayoutinflater_asynclayoutinflater_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_cardview_cardview_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_collection_collection_1_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_2_0_1_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_solver_2_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_coordinatorlayout_coordinatorlayout_1_1_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_core_core_1_3_2_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_customview_customview_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_documentfile_documentfile_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_dynamicanimation_dynamicanimation_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_fragment_fragment_1_1_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_ui_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_utils_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_legacy_legacy_support_v4_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_common_2_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_runtime_2_1_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_2_1_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_loader_loader_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_localbroadcastmanager_localbroadcastmanager_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_media_media_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_palette_palette_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_print_print_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_recyclerview_recyclerview_1_2_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_savedstate_savedstate_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_slidingpanelayout_slidingpanelayout_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_swiperefreshlayout_swiperefreshlayout_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_transition_transition_1_2_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_1_1_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_animated_1_1_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_versionedparcelable_versionedparcelable_1_1_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_viewpager2_viewpager2_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__ch_acra_acra_4_8_5_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__com_flaviofaria_kenburnsview_1_0_7.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__com_github_PhilJay_MPAndroidChart_v3_0_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__com_github_bumptech_glide_glide_3_7_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__com_google_android_material_material_1_3_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__com_google_code_gson_gson_2_8_5.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__com_nineoldandroids_library_2_4_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__com_squareup_picasso_picasso_2_5_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__com_wang_avi_library_1_0_5_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/.idea/libraries/MPAndroidChart_v3_0_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/acra_4_8_5.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/animated_vector_drawable_23_4_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/appcompat_v7_23_4_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/cardview_v7_23_4_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/com_google_guava_1_6_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/libraries/design_23_4_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/glide_3_7_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/gson_2_4.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/kenburnsview_1_0_7.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/library_1_0_5.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/library_2_4_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/palette_v7_23_4_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/picasso_2_5_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/recyclerview_v7_23_4_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/support_annotations_23_4_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/support_v4_23_4_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.idea/libraries/support_vector_drawable_23_4_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Art/checkout_screen_visble_amount.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/Art/checkout_screen_visble_amount.png
--------------------------------------------------------------------------------
/Art/collapsable_header_category.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/Art/collapsable_header_category.png
--------------------------------------------------------------------------------
/Art/drag_drop_swipe_dismiss.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/Art/drag_drop_swipe_dismiss.png
--------------------------------------------------------------------------------
/Art/empty_cart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/Art/empty_cart.png
--------------------------------------------------------------------------------
/Art/home_screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/Art/home_screen.png
--------------------------------------------------------------------------------
/Art/nav_drawer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/Art/nav_drawer.png
--------------------------------------------------------------------------------
/Art/persistance_storage_onrelaunch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/Art/persistance_storage_onrelaunch.png
--------------------------------------------------------------------------------
/Art/product_category.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/Art/product_category.png
--------------------------------------------------------------------------------
/Art/product_detail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/Art/product_detail.png
--------------------------------------------------------------------------------
/Art/product_detail_from_cart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/Art/product_detail_from_cart.png
--------------------------------------------------------------------------------
/Art/product_detail_suggestions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/Art/product_detail_suggestions.png
--------------------------------------------------------------------------------
/Art/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/Art/splash.png
--------------------------------------------------------------------------------
/Art/visivle_total_amount.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/Art/visivle_total_amount.png
--------------------------------------------------------------------------------
/Art/visivle_total_amount_from_product_detail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/Art/visivle_total_amount_from_product_detail.png
--------------------------------------------------------------------------------
/ECommerce-App-Android.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/ECommerce-App-Android.zip
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017. http://hiteshsahu.com- All Rights Reserved
3 | * Unauthorized copying of this file, via any medium is strictly prohibited
4 | * If you use or distribute this project then you MUST ADD A COPY OF LICENCE
5 | * along with the project.
6 | * Written by Hitesh Sahu , 2017.
7 | */
8 |
9 | apply plugin: 'com.android.application'
10 |
11 | android {
12 | compileSdkVersion 30
13 | buildToolsVersion "30.0.3"
14 |
15 | defaultConfig {
16 | applicationId "com.hitesh_sahu.retailshop"
17 | minSdkVersion 14
18 | targetSdkVersion 30
19 | }
20 |
21 | buildTypes {
22 | release {
23 | minifyEnabled false
24 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
25 | }
26 | }
27 | }
28 |
29 | dependencies {
30 | //Material design
31 | implementation 'com.google.android.material:material:1.3.0'
32 | implementation 'androidx.appcompat:appcompat:1.2.0'
33 | implementation 'androidx.recyclerview:recyclerview:1.2.0'
34 | implementation 'androidx.cardview:cardview:1.0.0'
35 | implementation 'androidx.palette:palette:1.0.0'
36 | implementation 'androidx.legacy:legacy-support-v4:1.0.0'
37 |
38 | implementation 'com.google.code.gson:gson:2.8.5'
39 | implementation 'ch.acra:acra:4.8.5'
40 | implementation files('libs/com.google.guava_1.6.0.jar')
41 | implementation 'com.github.bumptech.glide:glide:3.7.0'
42 | implementation 'com.squareup.picasso:picasso:2.5.2'
43 | implementation 'com.flaviofaria:kenburnsview:1.0.7'
44 |
45 | implementation 'com.github.PhilJay:MPAndroidChart:v3.0.2'
46 |
47 | //Loading animations
48 | implementation 'com.wang.avi:library:1.0.5'
49 | implementation 'com.nineoldandroids:library:2.4.0'
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/app/libs/com.google.guava_1.6.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/app/libs/com.google.guava_1.6.0.jar
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
12 |
13 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
29 |
30 |
31 |
35 |
36 |
40 |
41 |
42 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/app/src/main/assets/font/CircleD_Font_by_CrazyForMusic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/app/src/main/assets/font/CircleD_Font_by_CrazyForMusic.ttf
--------------------------------------------------------------------------------
/app/src/main/assets/font/DS-DIGIT.TTF:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/app/src/main/assets/font/DS-DIGIT.TTF
--------------------------------------------------------------------------------
/app/src/main/java/com/hitesh_sahu/retailapp/AppController.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017. http://hiteshsahu.com- All Rights Reserved
3 | * Unauthorized copying of this file, via any medium is strictly prohibited
4 | * If you use or distribute this project then you MUST ADD A COPY OF LICENCE
5 | * along with the project.
6 | * Written by Hitesh Sahu , 2017.
7 | */
8 |
9 | package com.hitesh_sahu.retailapp;
10 |
11 | import android.app.Application;
12 |
13 | import com.hitesh_sahu.retailapp.util.PreferenceHelper;
14 |
15 | import org.acra.ACRA;
16 | import org.acra.ReportField;
17 | import org.acra.ReportingInteractionMode;
18 | import org.acra.annotation.ReportsCrashes;
19 |
20 | @ReportsCrashes(mailTo = "hiteshkrsahu@gmail.com", customReportContent = {
21 | ReportField.APP_VERSION_CODE, ReportField.APP_VERSION_NAME,
22 | ReportField.ANDROID_VERSION, ReportField.PHONE_MODEL,
23 | ReportField.CUSTOM_DATA, ReportField.STACK_TRACE, ReportField.LOGCAT}, mode = ReportingInteractionMode.TOAST, resToastText = R.string.crash_toast_text)
24 | public class AppController extends Application {
25 |
26 | public static final String TAG = AppController.class.getSimpleName();
27 |
28 | private static AppController mInstance;
29 |
30 | public static synchronized AppController getInstance() {
31 | return mInstance;
32 | }
33 |
34 | @Override
35 | public void onCreate() {
36 | super.onCreate();
37 | mInstance = this;
38 |
39 | // The following line triggers the initialization of ACRA for crash Log Reposrting
40 | if (PreferenceHelper.getPrefernceHelperInstace().getBoolean(
41 | this, PreferenceHelper.SUBMIT_LOGS, true)) {
42 | ACRA.init(this);
43 | }
44 | }
45 |
46 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/hitesh_sahu/retailapp/domain/api/ProductCategoryLoaderTask.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017. http://hiteshsahu.com- All Rights Reserved
3 | * Unauthorized copying of this file, via any medium is strictly prohibited
4 | * If you use or distribute this project then you MUST ADD A COPY OF LICENCE
5 | * along with the project.
6 | * Written by Hitesh Sahu , 2017.
7 | */
8 |
9 | package com.hitesh_sahu.retailapp.domain.api;
10 |
11 | import android.content.Context;
12 | import android.os.AsyncTask;
13 | import android.view.View;
14 |
15 | import androidx.recyclerview.widget.RecyclerView;
16 |
17 | import com.hitesh_sahu.retailapp.R;
18 | import com.hitesh_sahu.retailapp.domain.mock.FakeWebServer;
19 | import com.hitesh_sahu.retailapp.util.AppConstants;
20 | import com.hitesh_sahu.retailapp.util.Utils;
21 | import com.hitesh_sahu.retailapp.util.Utils.AnimationType;
22 | import com.hitesh_sahu.retailapp.view.activities.ECartHomeActivity;
23 | import com.hitesh_sahu.retailapp.view.adapter.CategoryListAdapter;
24 | import com.hitesh_sahu.retailapp.view.adapter.CategoryListAdapter.OnItemClickListener;
25 | import com.hitesh_sahu.retailapp.view.fragment.ProductOverviewFragment;
26 |
27 | /**
28 | * The Class ImageLoaderTask.
29 | */
30 | public class ProductCategoryLoaderTask extends AsyncTask {
31 |
32 | private static final int NUMBER_OF_COLUMNS = 2;
33 | private Context context;
34 | private RecyclerView recyclerView;
35 |
36 | public ProductCategoryLoaderTask(RecyclerView listView, Context context) {
37 |
38 | this.recyclerView = listView;
39 | this.context = context;
40 | }
41 |
42 | @Override
43 | protected void onPreExecute() {
44 |
45 | super.onPreExecute();
46 |
47 | if (null != ((ECartHomeActivity) context).getProgressBar())
48 | ((ECartHomeActivity) context).getProgressBar().setVisibility(
49 | View.VISIBLE);
50 |
51 | }
52 |
53 | @Override
54 | protected void onPostExecute(Void result) {
55 | super.onPostExecute(result);
56 |
57 | if (null != ((ECartHomeActivity) context).getProgressBar())
58 | ((ECartHomeActivity) context).getProgressBar().setVisibility(
59 | View.GONE);
60 |
61 | if (recyclerView != null) {
62 | CategoryListAdapter simpleRecyclerAdapter = new CategoryListAdapter(
63 | context);
64 |
65 | recyclerView.setAdapter(simpleRecyclerAdapter);
66 |
67 | simpleRecyclerAdapter
68 | .SetOnItemClickListener(new OnItemClickListener() {
69 |
70 | @Override
71 | public void onItemClick(View view, int position) {
72 |
73 | AppConstants.CURRENT_CATEGORY = position;
74 |
75 | Utils.switchFragmentWithAnimation(
76 | R.id.frag_container,
77 | new ProductOverviewFragment(),
78 | ((ECartHomeActivity) context), null,
79 | AnimationType.SLIDE_LEFT);
80 |
81 | }
82 | });
83 | }
84 |
85 | }
86 |
87 | @Override
88 | protected Void doInBackground(String... params) {
89 |
90 | try {
91 | Thread.sleep(3000);
92 | } catch (InterruptedException e) {
93 | e.printStackTrace();
94 | }
95 |
96 | FakeWebServer.getFakeWebServer().addCategory();
97 |
98 | return null;
99 | }
100 |
101 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/hitesh_sahu/retailapp/domain/helper/NetworkConstants.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017. http://hiteshsahu.com- All Rights Reserved
3 | * Unauthorized copying of this file, via any medium is strictly prohibited
4 | * If you use or distribute this project then you MUST ADD A COPY OF LICENCE
5 | * along with the project.
6 | * Written by Hitesh Sahu , 2017.
7 | */
8 |
9 | package com.hitesh_sahu.retailapp.domain.helper;
10 |
11 |
12 | // TODO: Auto-generated Javadoc
13 |
14 | /**
15 | * The Interface NetworkConstants.
16 | */
17 | public interface NetworkConstants {
18 | public boolean DEBUGABLE = true;
19 |
20 | /**
21 | * The Constant URL_BASE_URI.
22 | */
23 | // public static final String URL_BASE_URI =
24 | // "http://192.168.2.7:8080/Delivery2Home/";
25 |
26 | public static final String URL_BASE_URI = "http://delivery2home.com"
27 | + "/Delivery2Home/";
28 |
29 | /**
30 | * The Constant URL_GET_PRODUCTS_BY_CATEGORY.
31 | */
32 | public static final String URL_GET_ALL_CATEGORY = URL_BASE_URI
33 | + "categories";
34 |
35 | /**
36 | * The Constant URL_GET_PRODUCTS_BY_CATEGORY.
37 | */
38 | public static final String URL_GET_PRODUCTS_MAP = URL_BASE_URI
39 | + "productMap";
40 |
41 | /**
42 | * The Constant URL_GET_PRODUCTS_BY_CATEGORY.
43 | */
44 | public static final String URL_PLACE_ORDER = URL_BASE_URI + "insertOrder";
45 |
46 | public static final String URL_APPLY_COUPAN = URL_BASE_URI
47 | + "validateCoupan";
48 |
49 |
50 | // -------------------------
51 | // Products functionality
52 | /**
53 | * The Constant getProductByCategory.
54 | */
55 | // -------------------------
56 | public static final int GET_ALL_PRODUCT_BY_CATEGORY = 0;
57 | public static final int GET_ALL_PRODUCT = 1;
58 | public static final int GET_SHOPPING_LIST = 9;
59 |
60 |
61 | }
62 |
--------------------------------------------------------------------------------
/app/src/main/java/com/hitesh_sahu/retailapp/domain/mining/FrequentItemsetData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017. http://hiteshsahu.com- All Rights Reserved
3 | * Unauthorized copying of this file, via any medium is strictly prohibited
4 | * If you use or distribute this project then you MUST ADD A COPY OF LICENCE
5 | * along with the project.
6 | * Written by Hitesh Sahu , 2017.
7 | */
8 |
9 | package com.hitesh_sahu.retailapp.domain.mining;
10 |
11 | import java.util.List;
12 | import java.util.Map;
13 | import java.util.Set;
14 |
15 | /**
16 | * This class holds the result information of a data-mining task.
17 | *
18 | * @author Rodion "rodde" Efremov
19 | * @version 1.6 (Sep 14, 2015)
20 | */
21 | public class FrequentItemsetData {
22 |
23 | private final List> frequentItemsetList;
24 | private final Map, Integer> supportCountMap;
25 | private final double minimumSupport;
26 | private final int numberOfTransactions;
27 |
28 | FrequentItemsetData(List> frequentItemsetList,
29 | Map, Integer> supportCountMap,
30 | double minimumSupport,
31 | int transactionNumber) {
32 | this.frequentItemsetList = frequentItemsetList;
33 | this.supportCountMap = supportCountMap;
34 | this.minimumSupport = minimumSupport;
35 | this.numberOfTransactions = transactionNumber;
36 | }
37 |
38 | public List> getFrequentItemsetList() {
39 | return frequentItemsetList;
40 | }
41 |
42 | public Map, Integer> getSupportCountMap() {
43 | return supportCountMap;
44 | }
45 |
46 | public double getMinimumSupport() {
47 | return minimumSupport;
48 | }
49 |
50 | public int getTransactionNumber() {
51 | return numberOfTransactions;
52 | }
53 |
54 | public double getSupport(Set itemset) {
55 | return 1.0 * supportCountMap.get(itemset) / numberOfTransactions;
56 | }
57 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/hitesh_sahu/retailapp/model/CenterRepository.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017. http://hiteshsahu.com- All Rights Reserved
3 | * Unauthorized copying of this file, via any medium is strictly prohibited
4 | * If you use or distribute this project then you MUST ADD A COPY OF LICENCE
5 | * along with the project.
6 | * Written by Hitesh Sahu , 2017.
7 | */
8 |
9 | package com.hitesh_sahu.retailapp.model;
10 |
11 | import com.hitesh_sahu.retailapp.model.entities.Product;
12 | import com.hitesh_sahu.retailapp.model.entities.ProductCategoryModel;
13 |
14 | import java.util.ArrayList;
15 | import java.util.Collections;
16 | import java.util.HashSet;
17 | import java.util.List;
18 | import java.util.Map;
19 | import java.util.Set;
20 | import java.util.concurrent.ConcurrentHashMap;
21 |
22 | public class CenterRepository {
23 |
24 | private static CenterRepository centerRepository;
25 |
26 | private ArrayList listOfCategory = new ArrayList();
27 | private ConcurrentHashMap> mapOfProductsInCategory = new ConcurrentHashMap>();
28 | private List listOfProductsInShoppingList = Collections.synchronizedList(new ArrayList());
29 | private List> listOfItemSetsForDataMining = new ArrayList<>();
30 |
31 | public static CenterRepository getCenterRepository() {
32 |
33 | if (null == centerRepository) {
34 | centerRepository = new CenterRepository();
35 | }
36 | return centerRepository;
37 | }
38 |
39 |
40 | public List getListOfProductsInShoppingList() {
41 | return listOfProductsInShoppingList;
42 | }
43 |
44 | public void setListOfProductsInShoppingList(ArrayList getShoppingList) {
45 | this.listOfProductsInShoppingList = getShoppingList;
46 | }
47 |
48 | public Map> getMapOfProductsInCategory() {
49 |
50 | return mapOfProductsInCategory;
51 | }
52 |
53 | public void setMapOfProductsInCategory(ConcurrentHashMap> mapOfProductsInCategory) {
54 | this.mapOfProductsInCategory = mapOfProductsInCategory;
55 | }
56 |
57 | public ArrayList getListOfCategory() {
58 |
59 | return listOfCategory;
60 | }
61 |
62 | public void setListOfCategory(ArrayList listOfCategory) {
63 | this.listOfCategory = listOfCategory;
64 | }
65 |
66 | public List> getItemSetList() {
67 |
68 | return listOfItemSetsForDataMining;
69 | }
70 |
71 | public void addToItemSetList(HashSet list) {
72 | listOfItemSetsForDataMining.add(list);
73 | }
74 |
75 | }
76 |
--------------------------------------------------------------------------------
/app/src/main/java/com/hitesh_sahu/retailapp/model/entities/Money.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017. http://hiteshsahu.com- All Rights Reserved
3 | * Unauthorized copying of this file, via any medium is strictly prohibited
4 | * If you use or distribute this project then you MUST ADD A COPY OF LICENCE
5 | * along with the project.
6 | * Written by Hitesh Sahu , 2017.
7 | */
8 |
9 | package com.hitesh_sahu.retailapp.model.entities;
10 |
11 | import java.math.BigDecimal;
12 | import java.math.RoundingMode;
13 | import java.util.Currency;
14 | import java.util.Locale;
15 |
16 | public class Money {
17 |
18 | private static final Currency INR = Currency.getInstance(new Locale("en",
19 | "in"));
20 | private static final RoundingMode DEFAULT_ROUNDING = RoundingMode.HALF_EVEN;
21 |
22 | private BigDecimal amount;
23 | private Currency currency;
24 |
25 | Money(BigDecimal amount, Currency currency) {
26 | this(amount, currency, DEFAULT_ROUNDING);
27 | }
28 |
29 | Money(BigDecimal amount, Currency currency, RoundingMode rounding) {
30 | this.amount = amount;
31 | this.currency = currency;
32 |
33 | this.amount = amount.setScale(currency.getDefaultFractionDigits(),
34 | rounding);
35 | }
36 |
37 | public static Money rupees(BigDecimal amount) {
38 | return new Money(amount, INR);
39 | }
40 |
41 | public BigDecimal getAmount() {
42 | return amount;
43 | }
44 |
45 | public Currency getCurrency() {
46 | return currency;
47 | }
48 |
49 | @Override
50 | public String toString() {
51 | return getCurrency().getSymbol() + " " + getAmount();
52 | }
53 |
54 | public String toString(Locale locale) {
55 | return getCurrency().getSymbol(locale) + " " + getAmount();
56 | }
57 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/hitesh_sahu/retailapp/model/entities/ProductCategoryModel.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017. http://hiteshsahu.com- All Rights Reserved
3 | * Unauthorized copying of this file, via any medium is strictly prohibited
4 | * If you use or distribute this project then you MUST ADD A COPY OF LICENCE
5 | * along with the project.
6 | * Written by Hitesh Sahu , 2017.
7 | */
8 |
9 | /**
10 | *
11 | */
12 | package com.hitesh_sahu.retailapp.model.entities;
13 |
14 | /**
15 | * @author Hitesh
16 | */
17 | public class ProductCategoryModel {
18 |
19 | private String categoryName;
20 | private String categoryDescription;
21 | private String categoryDiscount;
22 | private String categoryImageUrl;
23 | /**
24 | * @param productCategoryName
25 | * @param productCategoryDescription
26 | * @param productCategoryDiscount
27 | * @param productCategoryUrl
28 | */
29 | public ProductCategoryModel(String productCategoryName, String productCategoryDescription,
30 | String productCategoryDiscount, String productCategoryUrl) {
31 | super();
32 | this.categoryName = productCategoryName;
33 | this.categoryDescription = productCategoryDescription;
34 | this.categoryDiscount = productCategoryDiscount;
35 | this.categoryImageUrl = productCategoryUrl;
36 | }
37 |
38 | /**
39 | * @return the idproductcategory
40 | */
41 | public String getProductCategoryName() {
42 | return categoryName;
43 | }
44 |
45 | /**
46 | * @param idproductcategory the idproductcategory to set
47 | */
48 | public void setProductCategoryName(String idproductcategory) {
49 | this.categoryName = idproductcategory;
50 | }
51 |
52 | /**
53 | * @return the productDescription
54 | */
55 | public String getProductCategoryDescription() {
56 | return categoryDescription;
57 | }
58 |
59 | /**
60 | * @param productDescription the productDescription to set
61 | */
62 | public void setProductCategoryDescription(String productDescription) {
63 | this.categoryDescription = productDescription;
64 | }
65 |
66 | /**
67 | * @return the productDiscount
68 | */
69 | public String getProductCategoryDiscount() {
70 | return categoryDiscount;
71 | }
72 |
73 | /**
74 | * @param productDiscount the productDiscount to set
75 | */
76 | public void setProductCategoryDiscount(String productDiscount) {
77 | this.categoryDiscount = productDiscount;
78 | }
79 |
80 | /**
81 | * @return the productUrl
82 | */
83 | public String getProductCategoryImageUrl() {
84 | return categoryImageUrl;
85 | }
86 |
87 | /**
88 | * @param productUrl the productUrl to set
89 | */
90 | public void setProductCategoryImageUrl(String productUrl) {
91 | this.categoryImageUrl = productUrl;
92 | }
93 |
94 | }
95 |
--------------------------------------------------------------------------------
/app/src/main/java/com/hitesh_sahu/retailapp/util/AppConstants.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017. http://hiteshsahu.com- All Rights Reserved
3 | * Unauthorized copying of this file, via any medium is strictly prohibited
4 | * If you use or distribute this project then you MUST ADD A COPY OF LICENCE
5 | * along with the project.
6 | * Written by Hitesh Sahu , 2017.
7 | */
8 |
9 | package com.hitesh_sahu.retailapp.util;
10 |
11 |
12 | public class AppConstants {
13 |
14 | public static final String FIRST_TIME = "FirstTime";
15 | public static final String WHATS_NEW_LAST_SHOWN = "whats_new_last_shown";
16 | // Audio prefernces
17 | public static final String VIEW_PAGER_ANIME = "PagerAnime";
18 | // Help Preference
19 | public static final String SUBMIT_LOGS = "CrashLogs";
20 | public static int CURRENT_CATEGORY = 0;
21 |
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/app/src/main/java/com/hitesh_sahu/retailapp/util/ColorGenerator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017. http://hiteshsahu.com- All Rights Reserved
3 | * Unauthorized copying of this file, via any medium is strictly prohibited
4 | * If you use or distribute this project then you MUST ADD A COPY OF LICENCE
5 | * along with the project.
6 | * Written by Hitesh Sahu , 2017.
7 | */
8 |
9 | package com.hitesh_sahu.retailapp.util;
10 |
11 | import java.util.Arrays;
12 | import java.util.List;
13 | import java.util.Random;
14 |
15 | /**
16 | * @author amulya
17 | * @datetime 14 Oct 2014, 5:20 PM
18 | */
19 | public class ColorGenerator {
20 |
21 | public static ColorGenerator DEFAULT;
22 |
23 | public static ColorGenerator MATERIAL;
24 |
25 | static {
26 | DEFAULT = create(Arrays.asList(
27 | 0xfff16364,
28 | 0xfff58559,
29 | 0xfff9a43e,
30 | 0xffe4c62e,
31 | 0xff67bf74,
32 | 0xff59a2be,
33 | 0xff2093cd,
34 | 0xffad62a7,
35 | 0xff805781
36 | ));
37 | MATERIAL = create(Arrays.asList(
38 | 0xffe57373,
39 | 0xfff06292,
40 | 0xffba68c8,
41 | 0xff9575cd,
42 | 0xff7986cb,
43 | 0xff64b5f6,
44 | 0xff4fc3f7,
45 | 0xff4dd0e1,
46 | 0xff4db6ac,
47 | 0xff81c784,
48 | 0xffaed581,
49 | 0xffff8a65,
50 | 0xffd4e157,
51 | 0xffffd54f,
52 | 0xffffb74d,
53 | 0xffa1887f,
54 | 0xff90a4ae
55 | ));
56 | }
57 |
58 | private final List mColors;
59 | private final Random mRandom;
60 |
61 | private ColorGenerator(List colorList) {
62 | mColors = colorList;
63 | mRandom = new Random(System.currentTimeMillis());
64 | }
65 |
66 | public static ColorGenerator create(List colorList) {
67 | return new ColorGenerator(colorList);
68 | }
69 |
70 | public int getRandomColor() {
71 | return mColors.get(mRandom.nextInt(mColors.size()));
72 | }
73 |
74 | public int getColor(Object key) {
75 | return mColors.get(Math.abs(key.hashCode()) % mColors.size());
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/app/src/main/java/com/hitesh_sahu/retailapp/util/FontText.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017. http://hiteshsahu.com- All Rights Reserved
3 | * Unauthorized copying of this file, via any medium is strictly prohibited
4 | * If you use or distribute this project then you MUST ADD A COPY OF LICENCE
5 | * along with the project.
6 | * Written by Hitesh Sahu , 2017.
7 | */
8 |
9 | package com.hitesh_sahu.retailapp.util;
10 |
11 | import android.content.Context;
12 | import android.graphics.Typeface;
13 | import android.util.AttributeSet;
14 | import android.widget.TextView;
15 |
16 | public class FontText extends TextView {
17 |
18 | String TAG = getClass().getName();
19 | private Context mContext;
20 | private String ttfName;
21 |
22 | public FontText(Context context) {
23 | super(context);
24 | this.mContext = context;
25 | }
26 |
27 | public FontText(Context context, AttributeSet attrs) {
28 | super(context, attrs);
29 |
30 | this.mContext = context;
31 |
32 | // Typeface.createFromAsset doesn't work in the layout editor.
33 | // Skipping...
34 | if (isInEditMode()) {
35 | return;
36 | }
37 |
38 | for (int i = 0; i < attrs.getAttributeCount(); i++) {
39 | this.ttfName = attrs.getAttributeValue(Utils.ATTRIBUTE_SCHEMA,
40 | Utils.ATTRIBUTE_TTF_KEY);
41 |
42 | if (null != ttfName)
43 | init();
44 | }
45 |
46 | }
47 |
48 | public FontText(Context context, AttributeSet attrs, int defStyle) {
49 | super(context, attrs, defStyle);
50 | this.mContext = context;
51 | }
52 |
53 | private void init() {
54 | Typeface font = Utils.getFonts(mContext, ttfName);
55 | if (null != font)
56 | setTypeface(font);
57 | }
58 |
59 | @Override
60 | public void setTypeface(Typeface tf) {
61 |
62 | super.setTypeface(tf);
63 | }
64 |
65 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/hitesh_sahu/retailapp/util/PreferenceHelper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017. http://hiteshsahu.com- All Rights Reserved
3 | * Unauthorized copying of this file, via any medium is strictly prohibited
4 | * If you use or distribute this project then you MUST ADD A COPY OF LICENCE
5 | * along with the project.
6 | * Written by Hitesh Sahu , 2017.
7 | */
8 |
9 | /**
10 | *
11 | */
12 | package com.hitesh_sahu.retailapp.util;
13 |
14 | import android.content.Context;
15 | import android.preference.PreferenceManager;
16 |
17 | /**
18 | * @author Hitesh
19 | */
20 | public class PreferenceHelper {
21 |
22 | public final static String FIRST_TIME = "FirstTime";
23 | public final static String WHATS_NEW_LAST_SHOWN = "whats_new_last_shown";
24 | public final static String SUBMIT_LOGS = "CrashLogs";
25 | // Handle Local Caching of data for responsiveness
26 | public static final String MY_CART_LIST_LOCAL = "MyCartItems";
27 | private static final String USER_LOGGED_IN = "isLoggedIn";
28 | private static PreferenceHelper preferenceHelperInstance = new PreferenceHelper();
29 |
30 | private PreferenceHelper() {
31 | }
32 |
33 | public static PreferenceHelper getPrefernceHelperInstace() {
34 |
35 | return preferenceHelperInstance;
36 | }
37 |
38 | public void setBoolean(Context appContext, String key, Boolean value) {
39 |
40 | PreferenceManager.getDefaultSharedPreferences(appContext).edit()
41 | .putBoolean(key, value).apply();
42 | }
43 |
44 | public void setInteger(Context appContext, String key, int value) {
45 |
46 | PreferenceManager.getDefaultSharedPreferences(appContext).edit()
47 | .putInt(key, value).apply();
48 | }
49 |
50 | public void setFloat(Context appContext, String key, float value) {
51 |
52 | PreferenceManager.getDefaultSharedPreferences(appContext).edit()
53 | .putFloat(key, value).apply();
54 | }
55 |
56 | public void setString(Context appContext, String key, String value) {
57 |
58 | PreferenceManager.getDefaultSharedPreferences(appContext).edit()
59 | .putString(key, value).apply();
60 | }
61 |
62 | // To retrieve values from shared preferences:
63 |
64 | public boolean getBoolean(Context appContext, String key,
65 | Boolean defaultValue) {
66 |
67 | return PreferenceManager.getDefaultSharedPreferences(appContext)
68 | .getBoolean(key, defaultValue);
69 | }
70 |
71 | public int getInteger(Context appContext, String key, int defaultValue) {
72 |
73 | return PreferenceManager.getDefaultSharedPreferences(appContext)
74 | .getInt(key, defaultValue);
75 | }
76 |
77 | public float getString(Context appContext, String key, float defaultValue) {
78 |
79 | return PreferenceManager.getDefaultSharedPreferences(appContext)
80 | .getFloat(key, defaultValue);
81 | }
82 |
83 | public String getString(Context appContext, String key, String defaultValue) {
84 |
85 | return PreferenceManager.getDefaultSharedPreferences(appContext)
86 | .getString(key, defaultValue);
87 | }
88 |
89 | public void setUserLoggedIn(boolean UserLoggedIn, Context appContext) {
90 |
91 | setBoolean(appContext, USER_LOGGED_IN, UserLoggedIn);
92 | }
93 |
94 | public boolean isUserLoggedIn(Context appContext) {
95 |
96 | return getBoolean(appContext, USER_LOGGED_IN, false);
97 | }
98 |
99 | }
100 |
--------------------------------------------------------------------------------
/app/src/main/java/com/hitesh_sahu/retailapp/view/adapter/ItemTouchHelperAdapter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017. http://hiteshsahu.com- All Rights Reserved
3 | * Unauthorized copying of this file, via any medium is strictly prohibited
4 | * If you use or distribute this project then you MUST ADD A COPY OF LICENCE
5 | * along with the project.
6 | * Written by Hitesh Sahu , 2017.
7 | */
8 |
9 | package com.hitesh_sahu.retailapp.view.adapter;
10 |
11 |
12 | /**
13 | * Interface to listen for a move or dismissal event from a {@link ItemTouchHelper.Callback}.
14 | *
15 | * @author Paul Burke (ipaulpro)
16 | */
17 | public interface ItemTouchHelperAdapter {
18 |
19 | /**
20 | * Called when an item has been dragged far enough to trigger a move. This is called every time
21 | * an item is shifted, and not at the end of a "drop" event.
22 | *
23 | * Implementations should call {@link RecyclerView.Adapter#notifyItemMoved(int, int)} after
24 | * adjusting the underlying data to reflect this move.
25 | *
26 | * @param fromPosition The start position of the moved item.
27 | * @param toPosition Then resolved position of the moved item.
28 | * @see RecyclerView#getAdapterPositionFor(RecyclerView.ViewHolder)
29 | * @see RecyclerView.ViewHolder#getAdapterPosition()
30 | */
31 | void onItemMove(int fromPosition, int toPosition);
32 |
33 |
34 | /**
35 | * Called when an item has been dismissed by a swipe.
36 | *
37 | * Implementations should call {@link RecyclerView.Adapter#notifyItemRemoved(int)} after
38 | * adjusting the underlying data to reflect this removal.
39 | *
40 | * @param position The position of the item dismissed.
41 | * @see RecyclerView#getAdapterPositionFor(RecyclerView.ViewHolder)
42 | * @see RecyclerView.ViewHolder#getAdapterPosition()
43 | */
44 | void onItemDismiss(int position);
45 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/hitesh_sahu/retailapp/view/adapter/ProductsInCategoryPagerAdapter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017. http://hiteshsahu.com- All Rights Reserved
3 | * Unauthorized copying of this file, via any medium is strictly prohibited
4 | * If you use or distribute this project then you MUST ADD A COPY OF LICENCE
5 | * along with the project.
6 | * Written by Hitesh Sahu , 2017.
7 | */
8 |
9 | package com.hitesh_sahu.retailapp.view.adapter;
10 |
11 |
12 | import androidx.fragment.app.Fragment;
13 | import androidx.fragment.app.FragmentManager;
14 | import androidx.fragment.app.FragmentStatePagerAdapter;
15 |
16 | import java.util.ArrayList;
17 | import java.util.List;
18 |
19 | public class ProductsInCategoryPagerAdapter extends FragmentStatePagerAdapter {
20 | private final List mFragmentList = new ArrayList<>();
21 | private final List mFragmentTitleList = new ArrayList<>();
22 |
23 | public ProductsInCategoryPagerAdapter(FragmentManager manager) {
24 | super(manager);
25 | }
26 |
27 | @Override
28 | public Fragment getItem(int position) {
29 | return mFragmentList.get(position);
30 | }
31 |
32 | @Override
33 | public int getCount() {
34 | return mFragmentList.size();
35 | }
36 |
37 | public void addFrag(Fragment fragment, String title) {
38 | mFragmentList.add(fragment);
39 | mFragmentTitleList.add(title);
40 |
41 | }
42 |
43 | @Override
44 | public CharSequence getPageTitle(int position) {
45 | return mFragmentTitleList.get(position);
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/app/src/main/java/com/hitesh_sahu/retailapp/view/customview/ClickableViewPager.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017. http://hiteshsahu.com- All Rights Reserved
3 | * Unauthorized copying of this file, via any medium is strictly prohibited
4 | * If you use or distribute this project then you MUST ADD A COPY OF LICENCE
5 | * along with the project.
6 | * Written by Hitesh Sahu , 2017.
7 | */
8 |
9 | package com.hitesh_sahu.retailapp.view.customview;
10 |
11 | import android.content.Context;
12 | import android.util.AttributeSet;
13 | import android.view.GestureDetector;
14 | import android.view.MotionEvent;
15 | import android.view.View;
16 |
17 | import androidx.viewpager.widget.ViewPager;
18 |
19 | public class ClickableViewPager extends ViewPager {
20 |
21 | private OnItemClickListener mOnItemClickListener;
22 |
23 | public ClickableViewPager(Context context) {
24 | super(context);
25 |
26 | setup();
27 | }
28 |
29 | public ClickableViewPager(Context context, AttributeSet attrs) {
30 | super(context, attrs);
31 |
32 | setup();
33 | }
34 |
35 | private void setup() {
36 | final GestureDetector tapGestureDetector = new GestureDetector(getContext(), new TapGestureListener());
37 |
38 | setOnTouchListener(new OnTouchListener() {
39 | @Override
40 | public boolean onTouch(View v, MotionEvent event) {
41 | tapGestureDetector.onTouchEvent(event);
42 |
43 | return false;
44 | }
45 | });
46 | }
47 |
48 | public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
49 | mOnItemClickListener = onItemClickListener;
50 | }
51 |
52 | public interface OnItemClickListener {
53 | void onItemClick(int position);
54 | }
55 |
56 | private class TapGestureListener extends GestureDetector.SimpleOnGestureListener {
57 |
58 | @Override
59 | public boolean onSingleTapConfirmed(MotionEvent e) {
60 | if (mOnItemClickListener != null) {
61 | mOnItemClickListener.onItemClick(getCurrentItem());
62 | }
63 |
64 | return true;
65 | }
66 | }
67 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/hitesh_sahu/retailapp/view/customview/ItemTouchHelperAdapter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017. http://hiteshsahu.com- All Rights Reserved
3 | * Unauthorized copying of this file, via any medium is strictly prohibited
4 | * If you use or distribute this project then you MUST ADD A COPY OF LICENCE
5 | * along with the project.
6 | * Written by Hitesh Sahu , 2017.
7 | */
8 |
9 | package com.hitesh_sahu.retailapp.view.customview;
10 |
11 |
12 | /**
13 | * Interface to listen for a move or dismissal event from a {@link ItemTouchHelper.Callback}.
14 | *
15 | * @author Paul Burke (ipaulpro)
16 | */
17 | public interface ItemTouchHelperAdapter {
18 |
19 | /**
20 | * Called when an item has been dragged far enough to trigger a move. This is called every time
21 | * an item is shifted, and not at the end of a "drop" event.
22 | *
23 | * Implementations should call {@link RecyclerView.Adapter#notifyItemMoved(int, int)} after
24 | * adjusting the underlying data to reflect this move.
25 | *
26 | * @param fromPosition The start position of the moved item.
27 | * @param toPosition Then resolved position of the moved item.
28 | * @return True if the item was moved to the new adapter position.
29 | * @see RecyclerView#getAdapterPositionFor(RecyclerView.ViewHolder)
30 | * @see RecyclerView.ViewHolder#getAdapterPosition()
31 | */
32 | boolean onItemMove(int fromPosition, int toPosition);
33 |
34 |
35 | /**
36 | * Called when an item has been dismissed by a swipe.
37 | *
38 | * Implementations should call {@link RecyclerView.Adapter#notifyItemRemoved(int)} after
39 | * adjusting the underlying data to reflect this removal.
40 | *
41 | * @param position The position of the item dismissed.
42 | * @see RecyclerView#getAdapterPositionFor(RecyclerView.ViewHolder)
43 | * @see RecyclerView.ViewHolder#getAdapterPosition()
44 | */
45 | void onItemDismiss(int position);
46 | }
47 |
--------------------------------------------------------------------------------
/app/src/main/java/com/hitesh_sahu/retailapp/view/customview/ItemTouchHelperViewHolder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017. http://hiteshsahu.com- All Rights Reserved
3 | * Unauthorized copying of this file, via any medium is strictly prohibited
4 | * If you use or distribute this project then you MUST ADD A COPY OF LICENCE
5 | * along with the project.
6 | * Written by Hitesh Sahu , 2017.
7 | */
8 |
9 | package com.hitesh_sahu.retailapp.view.customview;
10 |
11 |
12 | /**
13 | * Interface to notify an item ViewHolder of relevant callbacks from {@link
14 | * android.support.v7.widget.helper.ItemTouchHelper.Callback}.
15 | *
16 | * @author Paul Burke (ipaulpro)
17 | */
18 | public interface ItemTouchHelperViewHolder {
19 |
20 | /**
21 | * Called when the {@link ItemTouchHelper} first registers an item as being moved or swiped.
22 | * Implementations should update the item view to indicate it's active state.
23 | */
24 | void onItemSelected();
25 |
26 |
27 | /**
28 | * Called when the {@link ItemTouchHelper} has completed the move or swipe, and the active item
29 | * state should be cleared.
30 | */
31 | void onItemClear();
32 | }
33 |
--------------------------------------------------------------------------------
/app/src/main/java/com/hitesh_sahu/retailapp/view/customview/MathUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017. http://hiteshsahu.com- All Rights Reserved
3 | * Unauthorized copying of this file, via any medium is strictly prohibited
4 | * If you use or distribute this project then you MUST ADD A COPY OF LICENCE
5 | * along with the project.
6 | * Written by Hitesh Sahu , 2017.
7 | */
8 | package com.hitesh_sahu.retailapp.view.customview;
9 |
10 | import android.graphics.RectF;
11 |
12 | /**
13 | * Helper class to perform math computations.
14 | */
15 | public final class MathUtils {
16 |
17 | /**
18 | * Truncates a float number {@code f} to {@code decimalPlaces}.
19 | *
20 | * @param f the number to be truncated.
21 | * @param decimalPlaces the amount of decimals that {@code f}
22 | * will be truncated to.
23 | * @return a truncated representation of {@code f}.
24 | */
25 | protected static float truncate(float f, int decimalPlaces) {
26 | float decimalShift = (float) Math.pow(10, decimalPlaces);
27 | return Math.round(f * decimalShift) / decimalShift;
28 | }
29 |
30 |
31 | /**
32 | * Checks whether two {@link RectF} have the same aspect ratio.
33 | *
34 | * @param r1 the first rect.
35 | * @param r2 the second rect.
36 | * @return {@code true} if both rectangles have the same aspect ratio,
37 | * {@code false} otherwise.
38 | */
39 | protected static boolean haveSameAspectRatio(RectF r1, RectF r2) {
40 | // Reduces precision to avoid problems when comparing aspect ratios.
41 | float srcRectRatio = MathUtils.truncate(MathUtils.getRectRatio(r1), 3);
42 | float dstRectRatio = MathUtils.truncate(MathUtils.getRectRatio(r2), 3);
43 |
44 | // Compares aspect ratios that allows for a tolerance range of [0, 0.01]
45 | return (Math.abs(srcRectRatio - dstRectRatio) <= 0.01f);
46 | }
47 |
48 |
49 | /**
50 | * Computes the aspect ratio of a given rect.
51 | *
52 | * @param rect the rect to have its aspect ratio computed.
53 | * @return the rect aspect ratio.
54 | */
55 | protected static float getRectRatio(RectF rect) {
56 | return rect.width() / rect.height();
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/app/src/main/java/com/hitesh_sahu/retailapp/view/customview/OnStartDragListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017. http://hiteshsahu.com- All Rights Reserved
3 | * Unauthorized copying of this file, via any medium is strictly prohibited
4 | * If you use or distribute this project then you MUST ADD A COPY OF LICENCE
5 | * along with the project.
6 | * Written by Hitesh Sahu , 2017.
7 | */
8 |
9 | package com.hitesh_sahu.retailapp.view.customview;
10 |
11 |
12 | import androidx.recyclerview.widget.RecyclerView;
13 |
14 | /**
15 | * Listener for manual initiation of a drag.
16 | */
17 | public interface OnStartDragListener {
18 |
19 | /**
20 | * Called when a view is requesting a start of a drag.
21 | *
22 | * @param viewHolder The holder of the view to drag.
23 | */
24 | void onStartDrag(RecyclerView.ViewHolder viewHolder);
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/app_name_animation.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
13 |
14 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/app_name_animation_back.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
13 |
14 |
20 |
21 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/base_slide_left_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/base_slide_right_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/default_out_anim.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
17 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/donot_move.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
12 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/fade_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/fade_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/from_middle.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/grow_color.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/logo_animation.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
13 |
14 |
23 |
24 |
31 |
32 |
36 |
37 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/logo_animation_back.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
13 |
14 |
23 |
24 |
31 |
32 |
37 |
38 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/pro_animation.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
13 |
14 |
20 |
21 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/pro_animation_back.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
13 |
14 |
19 |
20 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/shrink_color.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/simple_grow.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_down.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
12 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_in_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_in_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_in_up.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
12 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_out_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_out_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_out_up.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
12 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_up.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
12 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_up_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
12 |
13 |
17 |
18 |
22 |
23 |
29 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_up_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
12 |
13 |
17 |
18 |
22 |
23 |
29 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/to_middle.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/app_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/app/src/main/res/drawable-hdpi/app_icon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/cart.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/app/src/main/res/drawable-hdpi/cart.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/header.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/app/src/main/res/drawable-hdpi/header.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_action_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/app/src/main/res/drawable-hdpi/ic_action_search.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_drawer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/app/src/main/res/drawable-hdpi/ic_drawer.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/app_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/app/src/main/res/drawable-mdpi/app_icon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_action_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/app/src/main/res/drawable-mdpi/ic_action_search.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_drawer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/app/src/main/res/drawable-mdpi/ic_drawer.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/header2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/app/src/main/res/drawable-nodpi/header2.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/header_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/app/src/main/res/drawable-nodpi/header_1.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/nav_header_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/app/src/main/res/drawable-nodpi/nav_header_bg.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v21/ripple.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v21/ripple_accent.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
12 | -
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/app_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/app/src/main/res/drawable-xhdpi/app_icon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_action_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/app/src/main/res/drawable-xhdpi/ic_action_search.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_drawer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/app/src/main/res/drawable-xhdpi/ic_drawer.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/app_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/app/src/main/res/drawable-xxhdpi/app_icon.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_action_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/app/src/main/res/drawable-xxhdpi/ic_action_search.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_drawer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/app/src/main/res/drawable-xxhdpi/ic_drawer.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_action_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/app/src/main/res/drawable-xxxhdpi/ic_action_search.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_drawer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/app/src/main/res/drawable-xxxhdpi/ic_drawer.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/above_shadow.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/below_shadow.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/btn_feed_action.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 | -
12 |
13 |
14 |
15 |
16 | -
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/checkout_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
12 |
13 |
14 |
15 |
16 |
17 |
20 |
21 |
22 |
23 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/green_g_plus_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
12 |
13 |
14 |
15 |
16 |
17 |
20 |
21 |
22 |
27 |
28 |
29 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_add_shopping_cart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/app/src/main/res/drawable/ic_add_shopping_cart.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ico_mic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/app/src/main/res/drawable/ico_mic.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/img_circle_placeholder.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/indicator_selected.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/indicator_unselected.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/no_items_found.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/app/src/main/res/drawable/no_items_found.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/round_text_add_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
12 |
13 |
14 |
15 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/round_text_cart_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
12 |
13 |
14 |
15 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/round_text_remove_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
12 |
13 |
14 |
15 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/rounder_rectangle_visa_card.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
12 |
13 |
14 |
17 |
18 |
19 |
20 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shadow.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
12 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/simplecircle.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/slide_down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/app/src/main/res/drawable/slide_down.png
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_apriori_result.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
17 |
18 |
23 |
24 |
33 |
34 |
44 |
45 |
46 |
50 |
51 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_ecart.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
15 |
16 |
20 |
21 |
26 |
27 |
36 |
37 |
38 |
39 |
40 |
48 |
49 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_splash.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
16 |
17 |
21 |
22 |
29 |
30 |
46 |
47 |
64 |
81 |
82 |
83 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/connection_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
15 |
16 |
23 |
24 |
33 |
34 |
45 |
46 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/drawer_header.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
20 |
21 |
29 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/frag_category_details.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
17 |
18 |
24 |
25 |
32 |
33 |
41 |
42 |
49 |
50 |
57 |
58 |
59 |
60 |
65 |
66 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/frag_product_category.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
16 |
17 |
23 |
24 |
33 |
34 |
42 |
43 |
49 |
50 |
51 |
52 |
53 |
54 |
59 |
60 |
69 |
70 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/toolbar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/toolbar_spinner.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/toolbar_transparent.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/toolbar_w_shadow.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
15 |
16 |
23 |
24 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/view_show_similar.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
17 |
18 |
32 |
33 |
38 |
39 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/drawer.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_apriori.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values-land/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 | 80dp
12 |
13 | 96dp
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/values-sw600dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 | 24dp
12 |
13 | 128dp
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
12 |
15 |
16 |
19 |
20 |
26 |
27 |
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
13 | 64dp
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 | 16dp
12 | 16dp
13 |
14 | 8dp
15 | 16dp
16 | 12dp
17 | 56dp
18 |
19 | 24dp
20 |
21 | 16dp
22 |
23 | 112dp
24 | 8dp
25 | 8dp
26 |
27 | 48dp
28 | 150dp
29 | 243dp
30 | 16dp
31 |
32 | 160dp
33 |
34 |
35 | 88dp
36 | 64dp
37 | 8dp
38 |
39 |
40 | 28dp
41 | 85dp
42 | 32dp
43 |
44 |
45 |
--------------------------------------------------------------------------------
/app/src/main/res/values/integers.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 | 300
12 | 400
13 | 300
14 | 800
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 | Retail Shop
12 | Settings
13 | Select song from below to play
14 | Standard
15 | Change log
16 | Close
17 | Hide Panel
18 | Show Panel
19 | Enable Anchor Point
20 | Disable Anchor Point
21 | Idle
22 | Oops Crashe Occurred
23 | "Shop for 2000 to get Rs 100 discount and shop for 3000 to get Rs 200 discount"
24 | CheckOut
25 | You may also like
26 | Assignment
27 | Email Developer:
28 | Personal Website :
29 | www.hiteshsahu.com
30 | Contact Number
31 | 8888813275
32 | Locations
33 | Pune
34 | C 1002, Lorelle Socity Wakad Pune
35 |
36 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/changelog.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
12 |
17 |
18 | As part of initial release, the app should have the following features:
19 |
20 |
21 | 1. User should be able to view list of products grouped by categories.
22 |
23 |
24 | 2. User should be able to view details by selecting a product from list.
25 |
26 |
27 | 3. The product details includes an image, name and price of product.
28 |
29 |
30 | 4. Product details page should have a button to add the product to cart.
31 |
32 |
33 | 5. Cart displays a list of products along with its price.
34 |
35 |
36 | 6. Cart also displays the total price for all the products added.
37 |
38 |
39 | 7. User should be able to view cart at any time.
40 |
41 |
42 | 8. User should be able to navigate to product details from Cart as well.
43 |
44 |
45 | 9. User should be able to delete any product from the cart.
46 |
47 |
48 | 10. Cart should be persisted in the app i.e. if user exits the app, the cart should be
49 | available on re-launch of the app.
50 |
51 |
52 | 11. All the data needs to be stored locally within the app and should not rely on any
53 | external services for the same.
54 |
55 |
56 |
60 |
61 | Small layout change
62 |
63 |
64 | Minor tweaks
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017. http://hiteshsahu.com- All Rights Reserved
3 | * Unauthorized copying of this file, via any medium is strictly prohibited
4 | * If you use or distribute this project then you MUST ADD A COPY OF LICENCE
5 | * along with the project.
6 | * Written by Hitesh Sahu , 2017.
7 | */
8 |
9 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
10 |
11 | buildscript {
12 | repositories {
13 | jcenter()
14 | google()
15 | }
16 | dependencies {
17 | classpath 'com.android.tools.build:gradle:7.1.1'
18 | // NOTE: Do not place your application dependencies here; they belong
19 | // in the individual module build.gradle files
20 | }
21 | }
22 |
23 | allprojects {
24 | repositories {
25 | jcenter()
26 | mavenCentral()
27 | maven { url 'https://maven.google.com' }
28 | maven { url "https://jitpack.io" }
29 | maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
30 | maven { url 'https://dl.bintray.com/amulyakhare/maven' }
31 | }
32 | }
33 |
34 | task clean(type: Delete) {
35 | delete rootProject.buildDir
36 | }
37 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | android.useAndroidX=true
2 | android.enableJetifier=true
3 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hiteshsahu/ECommerce-App-Android/fbe141e9f7106c081b9c2b328f96bda10d6b3cf4/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Thu Apr 15 21:24:19 CST 2021
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-7.2-all.zip
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017. http://hiteshsahu.com- All Rights Reserved
3 | * Unauthorized copying of this file, via any medium is strictly prohibited
4 | * If you use or distribute this project then you MUST ADD A COPY OF LICENCE
5 | * along with the project.
6 | * Written by Hitesh Sahu , 2017.
7 | */
8 |
9 | include ':app'
10 |
--------------------------------------------------------------------------------