├── .gradle
├── 4.8
│ ├── javaCompile
│ │ ├── javaCompile.lock
│ │ ├── processorPath.bin
│ │ ├── taskHistory.bin
│ │ └── taskJars.bin
│ └── taskHistory
│ │ ├── taskHistory.bin
│ │ └── taskHistory.lock
├── buildOutputCleanup
│ ├── buildOutputCleanup.lock
│ ├── cache.properties
│ └── outputFiles.bin
└── vcsWorkingDirs
│ └── gc.properties
├── .idea
├── caches
│ └── build_file_checksums.ser
├── codeStyles
│ └── Project.xml
├── gradle.xml
└── libraries
│ ├── Gradle__androidx_annotation_annotation_1_0_0_beta01_jar.xml
│ ├── Gradle__androidx_appcompat_appcompat_1_0_0_beta01.xml
│ ├── Gradle__androidx_arch_core_core_common_2_0_0_beta01_jar.xml
│ └── Gradle__androidx_arch_core_core_runtime_2_0_0_beta01.xml
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── example
│ │ │ └── yudizsolutionspvtltd
│ │ │ └── materialapp
│ │ │ ├── MaterialApplication.kt
│ │ │ ├── backdrop
│ │ │ ├── BackDropActivity.kt
│ │ │ ├── NavigationIconClickListener.kt
│ │ │ └── StaggeredProductCardRecyclerViewAdapter.kt
│ │ │ ├── bottomAppBar
│ │ │ ├── BottomAppbarBehaviourActivity.kt
│ │ │ ├── BottomNavigationDrawerFragment.kt
│ │ │ ├── BottomNavigationFragment.kt
│ │ │ ├── ImageReq.kt
│ │ │ ├── TravelCardRecyclerViewAdapter.kt
│ │ │ ├── TravelEntry.kt
│ │ │ └── TravelGridItemDecoration.kt
│ │ │ └── login
│ │ │ └── LoginActivity.kt
│ └── res
│ │ ├── ImageRequester.kt
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable
│ │ ├── branded_menu.xml
│ │ ├── close_menu.xml
│ │ ├── ic_archive_black_24dp.xml
│ │ ├── ic_arrow_forward_black_24dp.xml
│ │ ├── ic_brightness_medium_black_24dp.xml
│ │ ├── ic_cancel_black_24dp.xml
│ │ ├── ic_dehaze_black_24dp.xml
│ │ ├── ic_delete_black_24dp.xml
│ │ ├── ic_favorite_black_24dp.xml
│ │ ├── ic_filter_list_black_24dp.xml
│ │ ├── ic_keyboard_return_black_24dp.xml
│ │ ├── ic_launcher_background.xml
│ │ ├── ic_local_florist_black_24dp.xml
│ │ ├── ic_mail_black_24dp.xml
│ │ ├── ic_menu_24dp.xml
│ │ ├── ic_photo_size_select_large_black_24dp.xml
│ │ ├── ic_rotate_left_black_24dp.xml
│ │ ├── ic_search_white_24dp.xml
│ │ ├── ic_small_black_24dp.xml
│ │ ├── menu.xml
│ │ ├── travel.jpeg
│ │ ├── travel_grid_background_shape.xml
│ │ └── travel_the_world_stock_hd_wallpaper.jpg
│ │ ├── layout
│ │ ├── activity_back_drop.xml
│ │ ├── activity_bottom_app_behaviour.xml
│ │ ├── activity_login.xml
│ │ ├── content_main.xml
│ │ ├── fragment_bottomsheet.xml
│ │ ├── frg_drawer_navigation_drawer.xml
│ │ ├── layout_backdrop.xml
│ │ ├── product_card.xml
│ │ ├── shr_staggered_product_card_first.xml
│ │ ├── shr_staggered_product_card_second.xml
│ │ └── shr_staggered_product_card_third.xml
│ │ ├── menu
│ │ ├── bottom_appbar_menu_primary.xml
│ │ ├── bottom_appbar_menu_secondary.xml
│ │ ├── bottom_nav_drawer_menu.xml
│ │ ├── menu.xml
│ │ └── toolbar_menu.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── raw
│ │ └── products.json
│ │ └── values
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── example
│ └── yudizsolutionspvtltd
│ └── materialapp
│ └── ExampleUnitTest.kt
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── local.properties
└── settings.gradle
/.gradle/4.8/javaCompile/javaCompile.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yudiz-solutions/material-design-android/12421dbdb5c1c84195d91021a043053d9a28ee9f/.gradle/4.8/javaCompile/javaCompile.lock
--------------------------------------------------------------------------------
/.gradle/4.8/javaCompile/processorPath.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yudiz-solutions/material-design-android/12421dbdb5c1c84195d91021a043053d9a28ee9f/.gradle/4.8/javaCompile/processorPath.bin
--------------------------------------------------------------------------------
/.gradle/4.8/javaCompile/taskHistory.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yudiz-solutions/material-design-android/12421dbdb5c1c84195d91021a043053d9a28ee9f/.gradle/4.8/javaCompile/taskHistory.bin
--------------------------------------------------------------------------------
/.gradle/4.8/javaCompile/taskJars.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yudiz-solutions/material-design-android/12421dbdb5c1c84195d91021a043053d9a28ee9f/.gradle/4.8/javaCompile/taskJars.bin
--------------------------------------------------------------------------------
/.gradle/4.8/taskHistory/taskHistory.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yudiz-solutions/material-design-android/12421dbdb5c1c84195d91021a043053d9a28ee9f/.gradle/4.8/taskHistory/taskHistory.bin
--------------------------------------------------------------------------------
/.gradle/4.8/taskHistory/taskHistory.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yudiz-solutions/material-design-android/12421dbdb5c1c84195d91021a043053d9a28ee9f/.gradle/4.8/taskHistory/taskHistory.lock
--------------------------------------------------------------------------------
/.gradle/buildOutputCleanup/buildOutputCleanup.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yudiz-solutions/material-design-android/12421dbdb5c1c84195d91021a043053d9a28ee9f/.gradle/buildOutputCleanup/buildOutputCleanup.lock
--------------------------------------------------------------------------------
/.gradle/buildOutputCleanup/cache.properties:
--------------------------------------------------------------------------------
1 | #Wed Jul 25 14:23:02 IST 2018
2 | gradle.version=4.8
3 |
--------------------------------------------------------------------------------
/.gradle/buildOutputCleanup/outputFiles.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yudiz-solutions/material-design-android/12421dbdb5c1c84195d91021a043053d9a28ee9f/.gradle/buildOutputCleanup/outputFiles.bin
--------------------------------------------------------------------------------
/.gradle/vcsWorkingDirs/gc.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yudiz-solutions/material-design-android/12421dbdb5c1c84195d91021a043053d9a28ee9f/.gradle/vcsWorkingDirs/gc.properties
--------------------------------------------------------------------------------
/.idea/caches/build_file_checksums.ser:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yudiz-solutions/material-design-android/12421dbdb5c1c84195d91021a043053d9a28ee9f/.idea/caches/build_file_checksums.ser
--------------------------------------------------------------------------------
/.idea/codeStyles/Project.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 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
17 |
18 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_annotation_annotation_1_0_0_beta01_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_appcompat_appcompat_1_0_0_beta01.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_arch_core_core_common_2_0_0_beta01_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_0_0_beta01.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | apply plugin: 'kotlin-android'
4 |
5 | apply plugin: 'kotlin-android-extensions'
6 |
7 | android {
8 | compileSdkVersion 28
9 | defaultConfig {
10 | applicationId "com.example.yudizsolutionspvtltd.materialapp"
11 | minSdkVersion 21
12 | targetSdkVersion 28
13 | versionCode 1
14 | versionName "1.0"
15 | vectorDrawables.useSupportLibrary = true
16 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
17 | }
18 | buildTypes {
19 | release {
20 | minifyEnabled false
21 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
22 | }
23 | }
24 | }
25 |
26 | dependencies {
27 | implementation fileTree(include: ['*.jar'], dir: 'libs')
28 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
29 | implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
30 | implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
31 | implementation 'com.google.android.material:material:1.0.0-beta01'
32 | implementation 'com.intuit.sdp:sdp-android:1.0.5'
33 | implementation 'com.android.volley:volley:1.1.0'
34 | implementation 'com.google.code.gson:gson:2.8.2'
35 | }
36 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/yudizsolutionspvtltd/materialapp/MaterialApplication.kt:
--------------------------------------------------------------------------------
1 | package com.example.yudizsolutionspvtltd.materialapp
2 |
3 | import android.app.Application
4 | import android.content.Context
5 | import androidx.appcompat.app.AppCompatDelegate
6 |
7 | class MaterialApplication : Application() {
8 | companion object {
9 | lateinit var instance: MaterialApplication
10 | private set
11 | }
12 |
13 | override fun onCreate() {
14 | super.onCreate()
15 | instance = this
16 |
17 | AppCompatDelegate.setCompatVectorFromResourcesEnabled(true)
18 | }
19 |
20 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/example/yudizsolutionspvtltd/materialapp/backdrop/BackDropActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.yudizsolutionspvtltd.materialapp.backdrop
2 |
3 | import android.os.Build
4 | import androidx.appcompat.app.AppCompatActivity
5 | import android.os.Bundle
6 | import android.view.Menu
7 | import android.view.animation.AccelerateDecelerateInterpolator
8 | import androidx.core.content.ContextCompat
9 | import androidx.recyclerview.widget.GridLayoutManager
10 | import com.example.yudizsolutionspvtltd.materialapp.R
11 | import com.example.yudizsolutionspvtltd.materialapp.bottomAppBar.ProductCardRecyclerViewAdapter
12 | import com.example.yudizsolutionspvtltd.materialapp.bottomAppBar.TravelEntry
13 | import com.example.yudizsolutionspvtltd.materialapp.bottomAppBar.TravelGridItemDecoration
14 | import kotlinx.android.synthetic.main.activity_back_drop.*
15 |
16 | class BackDropActivity : AppCompatActivity() {
17 |
18 | override fun onCreate(savedInstanceState: Bundle?) {
19 | super.onCreate(savedInstanceState)
20 | setContentView(R.layout.activity_back_drop)
21 | this.setSupportActionBar(app_bar)
22 | app_bar.setNavigationOnClickListener(NavigationIconClickListener(
23 | this,
24 | recycler_view,
25 | AccelerateDecelerateInterpolator(),
26 | ContextCompat.getDrawable(this, R.drawable.branded_menu),
27 | ContextCompat.getDrawable(this, R.drawable.close_menu)))
28 |
29 | recycler_view.layoutManager = GridLayoutManager(this, 2, GridLayoutManager.VERTICAL, false)
30 | val adapter = ProductCardRecyclerViewAdapter(
31 | TravelEntry.initProductEntryList(resources))
32 | recycler_view.adapter = adapter
33 | val largePadding = resources.getDimensionPixelSize(R.dimen._16sdp)
34 | val smallPadding = resources.getDimensionPixelSize(R.dimen._4sdp)
35 | recycler_view.addItemDecoration(TravelGridItemDecoration(largePadding, smallPadding))
36 | }
37 |
38 | override fun onCreateOptionsMenu(menu: Menu): Boolean {
39 | val inflater = menuInflater
40 | inflater.inflate(R.menu.toolbar_menu, menu)
41 | return true
42 | }
43 |
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/yudizsolutionspvtltd/materialapp/backdrop/NavigationIconClickListener.kt:
--------------------------------------------------------------------------------
1 | package com.example.yudizsolutionspvtltd.materialapp.backdrop
2 |
3 | import android.animation.AnimatorSet
4 | import android.animation.ObjectAnimator
5 | import android.app.Activity
6 | import android.content.Context
7 | import android.graphics.drawable.Drawable
8 | import android.util.DisplayMetrics
9 | import android.view.View
10 | import android.view.animation.Interpolator
11 | import android.widget.ImageView
12 | import com.example.yudizsolutionspvtltd.materialapp.R
13 |
14 | class NavigationIconClickListener @JvmOverloads internal constructor(
15 | private val context: Context, private val sheet: View, private val interpolator: Interpolator? = null,
16 | private val openIcon: Drawable? = null, private val closeIcon: Drawable? = null) : View.OnClickListener {
17 |
18 | private val animatorSet = AnimatorSet()
19 | private val height: Int
20 | private var backdropShown = false
21 |
22 | init {
23 | val displayMetrics = DisplayMetrics()
24 | (context as Activity).windowManager.defaultDisplay.getMetrics(displayMetrics)
25 | height = displayMetrics.heightPixels
26 | }
27 |
28 | override fun onClick(view: View) {
29 | backdropShown = !backdropShown
30 | animatorSet.removeAllListeners()
31 | animatorSet.end()
32 | animatorSet.cancel()
33 |
34 | updateIcon(view)
35 | val translateY = height - context.resources.getDimensionPixelSize(R.dimen._140sdp)
36 | val animator = ObjectAnimator.ofFloat(sheet, "translationY", (if (backdropShown) translateY else 0).toFloat())
37 | animator.duration = 500
38 | if (interpolator != null) {
39 | animator.interpolator = interpolator
40 | }
41 | animatorSet.play(animator)
42 | animator.start()
43 | }
44 |
45 | private fun updateIcon(view: View) {
46 | if (openIcon != null && closeIcon != null) {
47 | if (view !is ImageView) {
48 | throw IllegalArgumentException("updateIcon() must be called on an ImageView")
49 | }
50 | if (backdropShown) {
51 | view.setImageDrawable(closeIcon)
52 | } else {
53 | view.setImageDrawable(openIcon)
54 | }
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/yudizsolutionspvtltd/materialapp/backdrop/StaggeredProductCardRecyclerViewAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.example.yudizsolutionspvtltd.materialapp.backdrop
2 |
3 | import android.view.LayoutInflater
4 | import android.view.View
5 | import android.view.ViewGroup
6 | import android.widget.TextView
7 | import androidx.recyclerview.widget.RecyclerView
8 | import com.android.volley.toolbox.NetworkImageView
9 | import com.example.yudizsolutionspvtltd.materialapp.R
10 | import com.example.yudizsolutionspvtltd.materialapp.bottomAppBar.ImageReq
11 | import com.example.yudizsolutionspvtltd.materialapp.bottomAppBar.TravelEntry
12 |
13 | class StaggeredProductCardRecyclerViewAdapter(private val productList: List?) : RecyclerView.Adapter() {
14 |
15 | override fun getItemViewType(position: Int): Int {
16 | return position % 3
17 | }
18 |
19 | override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): StaggeredProductCardViewHolder {
20 | var layoutId = R.layout.shr_staggered_product_card_first
21 | if (viewType == 1) {
22 | layoutId = R.layout.shr_staggered_product_card_second
23 | } else if (viewType == 2) {
24 | layoutId = R.layout.shr_staggered_product_card_third
25 | }
26 | val layoutView = LayoutInflater.from(parent.context).inflate(layoutId, parent, false)
27 | return StaggeredProductCardViewHolder(layoutView)
28 | }
29 |
30 | override fun onBindViewHolder(holder: StaggeredProductCardViewHolder, position: Int) {
31 | if (productList != null && position < productList.size) {
32 | val product = productList[position]
33 | holder.productTitle.text = product.title
34 | holder.productPrice.text = product.price
35 | ImageReq.setImageFromUrl(holder.productImage, product.url)
36 | }
37 | }
38 |
39 | override fun getItemCount(): Int {
40 | return productList?.size ?: 0
41 | }
42 | }
43 |
44 | class StaggeredProductCardViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
45 |
46 | var productImage: NetworkImageView = itemView.findViewById(R.id.product_image)
47 | var productTitle: TextView = itemView.findViewById(R.id.product_title)
48 | var productPrice: TextView = itemView.findViewById(R.id.product_price)
49 | }
50 |
51 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/yudizsolutionspvtltd/materialapp/bottomAppBar/BottomAppbarBehaviourActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.yudizsolutionspvtltd.materialapp.bottomAppBar
2 |
3 | import android.content.Intent
4 | import android.os.Build
5 | import android.os.Bundle
6 | import android.view.Menu
7 | import android.view.MenuItem
8 | import android.view.WindowManager
9 | import android.widget.Toast
10 | import androidx.annotation.RequiresApi
11 | import androidx.appcompat.app.AppCompatActivity
12 | import androidx.coordinatorlayout.widget.CoordinatorLayout
13 | import androidx.core.content.ContextCompat
14 | import androidx.recyclerview.widget.GridLayoutManager
15 | import com.example.yudizsolutionspvtltd.materialapp.R
16 | import com.example.yudizsolutionspvtltd.materialapp.backdrop.BackDropActivity
17 | import com.example.yudizsolutionspvtltd.materialapp.backdrop.StaggeredProductCardRecyclerViewAdapter
18 | import com.google.android.material.bottomappbar.BottomAppBar
19 | import com.google.android.material.snackbar.Snackbar
20 | import kotlinx.android.synthetic.main.activity_bottom_app_behaviour.*
21 |
22 | class BottomAppbarBehaviourActivity : AppCompatActivity() {
23 |
24 | var counter = 0
25 | @RequiresApi(Build.VERSION_CODES.M)
26 | override fun onCreate(savedInstanceState: Bundle?) {
27 | super.onCreate(savedInstanceState)
28 | setContentView(R.layout.activity_bottom_app_behaviour)
29 | setSupportActionBar(appbar)
30 | setCardRecyclerView()
31 | changeStatusBarColor(this.getColor(android.R.color.white))
32 | listener()
33 |
34 | }
35 |
36 | fun changeStatusBarColor(color: Int) {
37 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
38 | val window = window
39 | window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
40 | window.statusBarColor = color
41 | }
42 | }
43 |
44 | fun resetFabChanges(){
45 | counter=0
46 | appbar.navigationIcon = this.getDrawable(R.drawable.ic_menu_24dp)
47 | appbar.fabAlignmentMode = BottomAppBar.FAB_ALIGNMENT_MODE_CENTER
48 | appbar.replaceMenu(R.menu.bottom_appbar_menu_primary)
49 | fab_bar?.setImageDrawable(this.getDrawable(R.drawable.ic_local_florist_black_24dp))
50 | }
51 | private fun listener() {
52 | fab_bar.setOnClickListener {
53 | if (counter == 0) {
54 | counter++
55 | appbar.navigationIcon = null
56 | appbar.fabAlignmentMode = BottomAppBar.FAB_ALIGNMENT_MODE_END
57 | appbar.replaceMenu(R.menu.bottom_appbar_menu_secondary)
58 | fab_bar?.setImageDrawable(this.getDrawable(R.drawable.ic_keyboard_return_black_24dp))
59 | } else {
60 | var iNagigation = Intent(this, BackDropActivity::class.java)
61 | startActivity(iNagigation)
62 | }
63 | }
64 | }
65 | // app_bar.setNavigationItemSelectedListener { menuItem ->
66 | // // // Bottom Navigation Drawer menu item clicks
67 | // when (menuItem!!.itemId) {
68 | // R.id.nav1 -> context!!.toast(getString(R.string.nav1_clicked))
69 | // R.id.nav2 -> context!!.toast(getString(R.string.nav2_clicked))
70 | // R.id.nav3 -> context!!.toast(getString(R.string.nav3_clicked))
71 | // }
72 | // true
73 | // }
74 |
75 |
76 | private fun toast(text: String) {
77 | Toast.makeText(this, text, Toast.LENGTH_LONG).show()
78 | }
79 |
80 | private fun setCardRecyclerView() {
81 | recycler_view.setHasFixedSize(true)
82 | val gridLayoutManager = GridLayoutManager(this, 2, GridLayoutManager.HORIZONTAL, false)
83 | gridLayoutManager.spanSizeLookup = object : GridLayoutManager.SpanSizeLookup() {
84 | override fun getSpanSize(position: Int): Int {
85 | return if (position % 3 == 2) 2 else 1
86 | }
87 | }
88 | recycler_view.layoutManager = gridLayoutManager
89 | val adapter = StaggeredProductCardRecyclerViewAdapter(
90 | TravelEntry.initProductEntryList(resources))
91 | recycler_view.adapter = adapter
92 | val largePadding = resources.getDimensionPixelSize(R.dimen._10sdp)
93 | val smallPadding = resources.getDimensionPixelSize(R.dimen._10sdp)
94 | recycler_view.addItemDecoration(TravelGridItemDecoration(largePadding, smallPadding))
95 | }
96 |
97 | override fun onCreateOptionsMenu(menu: Menu): Boolean {
98 | val inflater = menuInflater
99 | inflater.inflate(R.menu.bottom_appbar_menu_primary, menu)
100 | return true
101 | }
102 |
103 | private fun displayMaterialSnackBar() {
104 | val marginSide = 0
105 | val marginBottom = 550
106 | val snackbar = Snackbar.make(
107 | toolbar,
108 | "FAB Clicked",
109 | Snackbar.LENGTH_LONG
110 | ).setAction("UNDO") { }
111 | snackbar.setActionTextColor(ContextCompat.getColor(this, R.color.colorAccent))
112 |
113 | val snackbarView = snackbar.view
114 | val params = snackbarView.layoutParams as CoordinatorLayout.LayoutParams
115 |
116 | params.setMargins(
117 | params.leftMargin + marginSide,
118 | params.topMargin,
119 | params.rightMargin + marginSide,
120 | params.bottomMargin + marginBottom
121 | )
122 |
123 | snackbarView.layoutParams = params
124 | snackbar.show()
125 | }
126 |
127 | override fun onOptionsItemSelected(item: MenuItem?): Boolean {
128 | when (item!!.itemId) {
129 | android.R.id.home -> {
130 | val bottomNavDrawerFragment = BottomNavigationDrawerFragment()
131 | bottomNavDrawerFragment.show(supportFragmentManager, bottomNavDrawerFragment.tag)
132 | }
133 | R.id.app_bar_fav -> Toast.makeText(this, "Fav menu item is clicked!", Toast.LENGTH_LONG).show()
134 | R.id.app_bar_search -> Toast.makeText(this, "Search menu item is clicked!", Toast.LENGTH_LONG).show()
135 | R.id.app_bar_settings -> Toast.makeText(this, "Settings item is clicked!", Toast.LENGTH_LONG).show()
136 | R.id.app_bar_archieve -> resetFabChanges()
137 | }
138 | return true
139 | }
140 |
141 |
142 | // override fun onOptionsItemSelected(item: MenuItem?): Boolean {
143 | // when (item!!.itemId) {
144 | // R.id.app_bar_fav -> Toast.makeText(this, "Fav menu item is clicked!", Toast.LENGTH_LONG).show()
145 | // R.id.app_bar_search -> Toast.makeText(this, "Search menu item is clicked!", Toast.LENGTH_LONG).show()
146 | // R.id.app_bar_settings -> Toast.makeText(this, "Settings item is clicked!", Toast.LENGTH_LONG).show()
147 | //
148 | // }
149 | //
150 | // return true
151 | // }
152 | }
153 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/yudizsolutionspvtltd/materialapp/bottomAppBar/BottomNavigationDrawerFragment.kt:
--------------------------------------------------------------------------------
1 | package com.example.yudizsolutionspvtltd.materialapp.bottomAppBar
2 |
3 | import android.os.Bundle
4 | import android.view.LayoutInflater
5 | import android.view.View
6 | import android.view.ViewGroup
7 | import android.widget.Toast
8 | import com.example.yudizsolutionspvtltd.materialapp.R
9 | import com.google.android.material.bottomsheet.BottomSheetDialogFragment
10 | import kotlinx.android.synthetic.main.fragment_bottomsheet.*
11 |
12 | class BottomNavigationDrawerFragment : BottomSheetDialogFragment() {
13 |
14 | override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
15 | return inflater.inflate(R.layout.fragment_bottomsheet, container, false)
16 |
17 | }
18 | override fun onActivityCreated(savedInstanceState: Bundle?) {
19 | super.onActivityCreated(savedInstanceState)
20 | navigation_view.setNavigationItemSelectedListener { menuItem ->
21 |
22 | when (menuItem.itemId) {
23 | R.id.nav1 -> Toast.makeText(activity, "Nav 1 clicked", Toast.LENGTH_LONG).show()
24 | R.id.nav2 -> Toast.makeText(activity, "Nav 2 clicked", Toast.LENGTH_LONG).show()
25 | R.id.nav3 -> Toast.makeText(activity, "Nav 3 clicked", Toast.LENGTH_LONG).show()
26 | }
27 | true
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/example/yudizsolutionspvtltd/materialapp/bottomAppBar/BottomNavigationFragment.kt:
--------------------------------------------------------------------------------
1 | package com.example.yudizsolutionspvtltd.materialapp.bottomAppBar
2 |
3 | import android.os.Bundle
4 | import android.view.LayoutInflater
5 | import android.view.View
6 | import android.view.ViewGroup
7 | import com.example.yudizsolutionspvtltd.materialapp.R
8 | import com.google.android.material.bottomsheet.BottomSheetDialogFragment
9 | import kotlinx.android.synthetic.main.frg_drawer_navigation_drawer.*
10 |
11 | class BottomNavigationFragment : BottomSheetDialogFragment() {
12 |
13 | override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
14 | return inflater.inflate(R.layout.frg_drawer_navigation_drawer, container, false)
15 | }
16 |
17 | override fun onActivityCreated(savedInstanceState: Bundle?) {
18 | super.onActivityCreated(savedInstanceState)
19 |
20 | navigation_view.setNavigationItemSelectedListener { menuItem ->
21 | // Bottom Navigation Drawer menu item clicks
22 | when (menuItem.itemId) {
23 | // R.id.nav1 -> context!!.toast(getString(R.string.nav1_clicked))
24 | }
25 | // Add code here to update the UI based on the item selected
26 | // For example, swap UI fragments here
27 | true
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/example/yudizsolutionspvtltd/materialapp/bottomAppBar/ImageReq.kt:
--------------------------------------------------------------------------------
1 | package com.example.yudizsolutionspvtltd.materialapp.bottomAppBar
2 |
3 | import android.content.Context
4 | import android.graphics.Bitmap
5 | import android.util.LruCache
6 |
7 | import com.android.volley.RequestQueue
8 | import com.android.volley.toolbox.ImageLoader
9 | import com.android.volley.toolbox.NetworkImageView
10 | import com.android.volley.toolbox.Volley
11 | import com.example.yudizsolutionspvtltd.materialapp.MaterialApplication
12 |
13 | object ImageReq {
14 | private val requestQueue: RequestQueue
15 | private val imageLoader: ImageLoader
16 | private val maxByteSize: Int
17 |
18 | init {
19 | val context = MaterialApplication.instance
20 | requestQueue = Volley.newRequestQueue(context)
21 | requestQueue.start()
22 | maxByteSize = calculateMaxByteSize(context)
23 | imageLoader = ImageLoader(
24 | requestQueue,
25 | object : ImageLoader.ImageCache {
26 | private val lruCache = object : LruCache(maxByteSize) {
27 | override fun sizeOf(url: String, bitmap: Bitmap): Int {
28 | return bitmap.byteCount
29 | }
30 | }
31 |
32 | @Synchronized
33 | override fun getBitmap(url: String): Bitmap? {
34 | return lruCache.get(url)
35 | }
36 |
37 | @Synchronized
38 | override fun putBitmap(url: String, bitmap: Bitmap) {
39 | lruCache.put(url, bitmap)
40 | }
41 | })
42 | }
43 | fun setImageFromUrl(networkImageView: NetworkImageView, url: String) {
44 | networkImageView.setImageUrl(url, imageLoader)
45 | }
46 |
47 | private fun calculateMaxByteSize(context: Context): Int {
48 | val displayMetrics = context.resources.displayMetrics
49 | val screenBytes = displayMetrics.widthPixels * displayMetrics.heightPixels * 4
50 | return screenBytes * 3
51 | }
52 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/example/yudizsolutionspvtltd/materialapp/bottomAppBar/TravelCardRecyclerViewAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.example.yudizsolutionspvtltd.materialapp.bottomAppBar
2 |
3 | import android.view.LayoutInflater
4 | import android.view.View
5 | import android.view.ViewGroup
6 | import android.widget.TextView
7 | import androidx.recyclerview.widget.RecyclerView
8 | import com.android.volley.toolbox.NetworkImageView
9 | import com.example.yudizsolutionspvtltd.materialapp.R
10 |
11 | class ProductCardRecyclerViewAdapter internal constructor(private val productList: List) : RecyclerView.Adapter() {
12 |
13 | override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ProductCardViewHolder {
14 | val layoutView = LayoutInflater.from(parent.context).inflate(R.layout.product_card, parent, false)
15 | return ProductCardViewHolder(layoutView)
16 | }
17 |
18 | override fun onBindViewHolder(holder: ProductCardViewHolder, position: Int) {
19 | if (position < productList.size) {
20 | val product = productList[position]
21 | holder.productTitle.text = product.title
22 | holder.productPrice.text = product.price
23 | println("product url" + product.url)
24 | ImageReq.setImageFromUrl(holder.productImage, product.url)
25 | }
26 | }
27 |
28 | override fun getItemCount(): Int {
29 | return productList.size
30 | }
31 |
32 |
33 | }
34 |
35 | class ProductCardViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
36 |
37 | var productImage: NetworkImageView = itemView.findViewById(R.id.product_image)
38 | var productTitle: TextView = itemView.findViewById(R.id.product_title)
39 | var productPrice: TextView = itemView.findViewById(R.id.product_price)
40 | }
41 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/yudizsolutionspvtltd/materialapp/bottomAppBar/TravelEntry.kt:
--------------------------------------------------------------------------------
1 | package com.example.yudizsolutionspvtltd.materialapp.bottomAppBar
2 |
3 | import android.content.res.Resources
4 | import android.net.Uri
5 | import com.example.yudizsolutionspvtltd.materialapp.R
6 | import com.google.gson.Gson
7 | import com.google.gson.reflect.TypeToken
8 | import java.io.BufferedReader
9 | import java.util.*
10 |
11 | class TravelEntry(
12 | val title: String, dynamicUrl: String, val url: String, val price: String, val description: String) {
13 | val dynamicUrl: Uri = Uri.parse(dynamicUrl)
14 |
15 | companion object {
16 | fun initProductEntryList(resources: Resources): List {
17 | val inputStream = resources.openRawResource(R.raw.products)
18 | val jsonProductsString = inputStream.bufferedReader().use(BufferedReader::readText)
19 | val gson = Gson()
20 | val productListType = object : TypeToken>() {}.type
21 | return gson.fromJson>(jsonProductsString, productListType)
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/example/yudizsolutionspvtltd/materialapp/bottomAppBar/TravelGridItemDecoration.kt:
--------------------------------------------------------------------------------
1 | package com.example.yudizsolutionspvtltd.materialapp.bottomAppBar
2 |
3 | import android.graphics.Rect
4 | import android.view.View
5 | import androidx.recyclerview.widget.RecyclerView
6 | class TravelGridItemDecoration(private val largePadding: Int, private val smallPadding: Int) : RecyclerView.ItemDecoration() {
7 |
8 | override fun getItemOffsets(outRect: Rect, view: View,
9 | parent: RecyclerView, state: RecyclerView.State) {
10 | outRect.left = smallPadding
11 | outRect.right = smallPadding
12 | outRect.top = largePadding
13 | outRect.bottom = largePadding
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/yudizsolutionspvtltd/materialapp/login/LoginActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.yudizsolutionspvtltd.materialapp.login
2 |
3 | import android.content.Intent
4 | import android.os.Build
5 | import androidx.appcompat.app.AppCompatActivity
6 | import android.os.Bundle
7 | import android.view.WindowManager
8 | import androidx.annotation.RequiresApi
9 | import com.example.yudizsolutionspvtltd.materialapp.bottomAppBar.BottomAppbarBehaviourActivity
10 | import com.example.yudizsolutionspvtltd.materialapp.R
11 | import kotlinx.android.synthetic.main.activity_login.*
12 |
13 | class LoginActivity : AppCompatActivity() {
14 |
15 | @RequiresApi(Build.VERSION_CODES.M)
16 | override fun onCreate(savedInstanceState: Bundle?) {
17 | super.onCreate(savedInstanceState)
18 | setContentView(R.layout.activity_login)
19 | next_button?.setOnClickListener {
20 | var iNavigation=Intent(this, BottomAppbarBehaviourActivity::class.java)
21 | startActivity(iNavigation)
22 | }
23 | changeStatusBarColor(this.getColor(android.R.color.white))
24 |
25 | }
26 | fun changeStatusBarColor(color: Int) {
27 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
28 | val window = window
29 | window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
30 | window.statusBarColor = color
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/app/src/main/res/ImageRequester.kt:
--------------------------------------------------------------------------------
1 | package com.example.yudizsolutionspvtltd.materialapp
2 | import android.content.Context
3 | import android.graphics.Bitmap
4 | import android.util.LruCache
5 | import com.android.volley.RequestQueue
6 | import com.android.volley.toolbox.ImageLoader
7 | import com.android.volley.toolbox.NetworkImageView
8 | import com.android.volley.toolbox.Volley
9 | import com.example.yudizsolutionspvtltd.materialapp.MaterialApplication
10 |
11 | object ImageRequester {
12 | private val requestQueue: RequestQueue
13 | private val imageLoader: ImageLoader
14 | private val maxByteSize: Int
15 |
16 | init {
17 | val context = MaterialApplication.instance
18 | this.requestQueue = Volley.newRequestQueue(context)
19 | this.requestQueue.start()
20 | this.maxByteSize = calculateMaxByteSize(context)
21 | this.imageLoader = ImageLoader(
22 | requestQueue,
23 | object : ImageLoader.ImageCache {
24 | private val lruCache = object : LruCache(maxByteSize) {
25 | override fun sizeOf(url: String, bitmap: Bitmap): Int {
26 | return bitmap.byteCount
27 | }
28 | }
29 |
30 | @Synchronized
31 | override fun getBitmap(url: String): Bitmap? {
32 | return lruCache.get(url)
33 | }
34 |
35 | @Synchronized
36 | override fun putBitmap(url: String, bitmap: Bitmap) {
37 | lruCache.put(url, bitmap)
38 | }
39 | })
40 | }
41 | fun setImageFromUrl(networkImageView: NetworkImageView, url: String) {
42 | networkImageView.setImageUrl(url, imageLoader)
43 | }
44 |
45 | private fun calculateMaxByteSize(context: Context): Int {
46 | val displayMetrics = context.resources.displayMetrics
47 | val screenBytes = displayMetrics.widthPixels * displayMetrics.heightPixels * 4
48 | return screenBytes * 3
49 | }
50 | }
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/branded_menu.xml:
--------------------------------------------------------------------------------
1 |
7 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/close_menu.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_archive_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_arrow_forward_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_brightness_medium_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_cancel_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_dehaze_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_delete_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_favorite_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_filter_list_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_keyboard_return_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
15 |
20 |
25 |
30 |
35 |
40 |
45 |
50 |
55 |
60 |
65 |
70 |
75 |
80 |
85 |
90 |
95 |
100 |
105 |
110 |
115 |
120 |
125 |
130 |
135 |
140 |
145 |
150 |
155 |
160 |
165 |
170 |
171 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_local_florist_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_mail_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_menu_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_photo_size_select_large_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_rotate_left_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_search_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_small_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/menu.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/travel.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yudiz-solutions/material-design-android/12421dbdb5c1c84195d91021a043053d9a28ee9f/app/src/main/res/drawable/travel.jpeg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/travel_grid_background_shape.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
9 |
10 |
11 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/travel_the_world_stock_hd_wallpaper.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yudiz-solutions/material-design-android/12421dbdb5c1c84195d91021a043053d9a28ee9f/app/src/main/res/drawable/travel_the_world_stock_hd_wallpaper.jpg
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_back_drop.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
16 |
17 |
18 |
19 |
20 |
24 |
25 |
39 |
40 |
41 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_bottom_app_behaviour.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
13 |
22 |
23 |
27 |
28 |
29 |
30 |
31 |
32 |
49 |
50 |
58 |
59 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_login.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
22 |
23 |
24 |
30 |
31 |
41 |
42 |
47 |
48 |
53 |
54 |
55 |
62 |
63 |
68 |
69 |
70 |
76 |
77 |
85 |
86 |
96 |
97 |
98 |
99 |
100 |
101 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/content_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
15 |
16 |
20 |
21 |
31 |
32 |
44 |
45 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_bottomsheet.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/frg_drawer_navigation_drawer.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
24 |
25 |
37 |
38 |
47 |
48 |
56 |
57 |
67 |
68 |
80 |
81 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_backdrop.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
15 |
16 |
21 |
22 |
27 |
28 |
33 |
34 |
39 |
40 |
45 |
46 |
51 |
52 |
57 |
58 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/product_card.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
15 |
16 |
22 |
23 |
28 |
29 |
36 |
37 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/shr_staggered_product_card_first.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
18 |
19 |
25 |
26 |
31 |
32 |
40 |
41 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/shr_staggered_product_card_second.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
18 |
19 |
25 |
26 |
31 |
32 |
40 |
41 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/shr_staggered_product_card_third.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
16 |
17 |
23 |
24 |
29 |
30 |
38 |
39 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/bottom_appbar_menu_primary.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/bottom_appbar_menu_secondary.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/bottom_nav_drawer_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/toolbar_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yudiz-solutions/material-design-android/12421dbdb5c1c84195d91021a043053d9a28ee9f/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yudiz-solutions/material-design-android/12421dbdb5c1c84195d91021a043053d9a28ee9f/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yudiz-solutions/material-design-android/12421dbdb5c1c84195d91021a043053d9a28ee9f/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yudiz-solutions/material-design-android/12421dbdb5c1c84195d91021a043053d9a28ee9f/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yudiz-solutions/material-design-android/12421dbdb5c1c84195d91021a043053d9a28ee9f/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yudiz-solutions/material-design-android/12421dbdb5c1c84195d91021a043053d9a28ee9f/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yudiz-solutions/material-design-android/12421dbdb5c1c84195d91021a043053d9a28ee9f/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yudiz-solutions/material-design-android/12421dbdb5c1c84195d91021a043053d9a28ee9f/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yudiz-solutions/material-design-android/12421dbdb5c1c84195d91021a043053d9a28ee9f/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yudiz-solutions/material-design-android/12421dbdb5c1c84195d91021a043053d9a28ee9f/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/products.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "title": "Goa",
4 | "url": "http://d27k8xmh3cuzik.cloudfront.net/wp-content/uploads/2015/12/places-to-visit-in-south-goa.jpg",
5 | "price": "$34"
6 | },
7 | {
8 | "title": "Leh ladakh",
9 | "url": "https://images.thrillophilia.com/image/upload/s--Ju3JrzXy--/c_fill,f_auto,fl_strip_profile,h_800,q_auto,w_1300/v1/images/photos/000/029/800/original/1512035243_Ladakh-Home.jpg.jpg?1512035237",
10 | "price": "$58"
11 | },
12 | {
13 | "title": "Manali",
14 | "url": "https://images.thrillophilia.com/image/upload/s--MO687SbT--/c_fill,f_auto,fl_strip_profile,h_800,q_auto,w_1300/v1/images/photos/000/026/764/original/Manali_Himachal_India_(9).JPG.jpg?1458195379",
15 | "price": "$120"
16 | },
17 | {
18 | "title": "Shillong",
19 | "url": "https://c1.hiqcdn.com/customcdn/1024x768/uploadimages/travel/Shillong-551823_44.jpg",
20 | "price": "$58"
21 | },
22 | {
23 | "title": "Rann of kutch",
24 | "url": "https://media-cdn.tripadvisor.com/media/photo-s/09/21/a3/d0/great-rann-of-kutch.jpg",
25 | "price": "$35"
26 | },
27 | {
28 | "title": "siliguri",
29 | "url": "http://im.hunt.in/cg/City-Guide/roads.jpg",
30 | "price": "$98"
31 | },
32 | {
33 | "title": "Kaziranga",
34 | "url": "http://www.banjaracamps.com/images/hero-banner/kaziranga-hero.jpg",
35 | "price": "$12"
36 | },
37 | {
38 | "title": "Bhalukpong",
39 | "url": "https://www.holidify.com/images/bgImages/BHALUKPONG.jpg",
40 | "price": "$16"
41 | },
42 | {
43 | "title": "Nainital",
44 | "url": "https://dynamic.tourtravelworld.com/blog_images/best-time-to-visit-nainital-20161006030855.jpg",
45 | "price": "$40"
46 | },
47 | {
48 | "title": "Kashmir",
49 | "url": "https://thediplomat.com/wp-content/uploads/2018/01/thediplomat-800px-kashmir.valley.original.11730-386x261.jpg",
50 | "price": "$198"
51 | },
52 | {
53 | "title": "Camel Safari at Jaisalmer",
54 | "url": "https://invinciblengo.org/photos/event/slider/jaisalmer-desert-camping-jaisalmer-4hynkAx-1440x810.jpg",
55 | "price": "$18"
56 | },
57 | {
58 | "title": "Lonavala Valley",
59 | "url": "https://www.runsociety.com/wp-content/uploads/2017/12/Lonavala-Valley-Half-Marathon-2018-1280-960x540.jpg",
60 | "price": "$28"
61 | },
62 | {
63 | "title": "Goa",
64 | "url": "http://d27k8xmh3cuzik.cloudfront.net/wp-content/uploads/2015/12/places-to-visit-in-south-goa.jpg",
65 | "price": "$34"
66 | },
67 | {
68 | "title": "Leh ladakh",
69 | "url": "https://images.thrillophilia.com/image/upload/s--Ju3JrzXy--/c_fill,f_auto,fl_strip_profile,h_800,q_auto,w_1300/v1/images/photos/000/029/800/original/1512035243_Ladakh-Home.jpg.jpg?1512035237",
70 | "price": "$58"
71 | },
72 | {
73 | "title": "Manali",
74 | "url": "https://images.thrillophilia.com/image/upload/s--MO687SbT--/c_fill,f_auto,fl_strip_profile,h_800,q_auto,w_1300/v1/images/photos/000/026/764/original/Manali_Himachal_India_(9).JPG.jpg?1458195379",
75 | "price": "$120"
76 | },
77 | {
78 | "title": "Shillong",
79 | "url": "https://c1.hiqcdn.com/customcdn/1024x768/uploadimages/travel/Shillong-551823_44.jpg",
80 | "price": "$58"
81 | },
82 | {
83 | "title": "Rann of kutch",
84 | "url": "https://media-cdn.tripadvisor.com/media/photo-s/09/21/a3/d0/great-rann-of-kutch.jpg",
85 | "price": "$35"
86 | },
87 | {
88 | "title": "siliguri",
89 | "url": "http://im.hunt.in/cg/City-Guide/roads.jpg",
90 | "price": "$98"
91 | },
92 | {
93 | "title": "Kaziranga",
94 | "url": "http://www.banjaracamps.com/images/hero-banner/kaziranga-hero.jpg",
95 | "price": "$12"
96 | },
97 | {
98 | "title": "Bhalukpong",
99 | "url": "https://www.holidify.com/images/bgImages/BHALUKPONG.jpg",
100 | "price": "$16"
101 | },
102 | {
103 | "title": "Nainital",
104 | "url": "https://dynamic.tourtravelworld.com/blog_images/best-time-to-visit-nainital-20161006030855.jpg",
105 | "price": "$40"
106 | },
107 | {
108 | "title": "Kashmir",
109 | "url": "https://thediplomat.com/wp-content/uploads/2018/01/thediplomat-800px-kashmir.valley.original.11730-386x261.jpg",
110 | "price": "$198"
111 | },
112 | {
113 | "title": "Camel Safari at Jaisalmer",
114 | "url": "https://invinciblengo.org/photos/event/slider/jaisalmer-desert-camping-jaisalmer-4hynkAx-1440x810.jpg",
115 | "price": "$18"
116 | },
117 | {
118 | "title": "Lonavala Valley",
119 | "url": "https://www.runsociety.com/wp-content/uploads/2017/12/Lonavala-Valley-Half-Marathon-2018-1280-960x540.jpg",
120 | "price": "$28"
121 | }
122 | ]
123 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #B8E1DC
4 | ab47bc
5 | #F47E3A
6 | #F47E3A
7 | #F47E3A
8 | #FFFFFF
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | MaterialApp
3 | Favourite
4 | Search
5 | Setting
6 | Nav Item 1
7 | Nav Item 2
8 | Nav Item 3
9 | sdjs
10 | ajds
11 |
12 | Goa
13 | Nainital
14 | Manali
15 | Leh Ladakh
16 | Kashmir
17 | Camel Safari at Jaisalmer
18 | Lonavala Valley
19 | Shillong
20 | Rann of kutch
21 | siliguri
22 | Kaziranga
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
14 |
15 |
20 |
21 |
25 |
26 |
29 |
30 |
34 |
35 |
39 |
40 |
43 |
44 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/app/src/test/java/com/example/yudizsolutionspvtltd/materialapp/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.example.yudizsolutionspvtltd.materialapp
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext.kotlin_version = '1.2.50'
5 | repositories {
6 | google()
7 | jcenter()
8 | }
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:3.3.0-alpha02'
11 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
12 |
13 | // NOTE: Do not place your application dependencies here; they belong
14 | // in the individual module build.gradle files
15 | }
16 | }
17 |
18 | allprojects {
19 | repositories {
20 | google()
21 | jcenter()
22 | }
23 | }
24 |
25 | task clean(type: Delete) {
26 | delete rootProject.buildDir
27 | }
28 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app's APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Automatically convert third-party libraries to use AndroidX
19 | android.enableJetifier=true
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yudiz-solutions/material-design-android/12421dbdb5c1c84195d91021a043053d9a28ee9f/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Jul 09 17:52:23 IST 2018
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-4.8-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Attempt to set APP_HOME
10 | # Resolve links: $0 may be a link
11 | PRG="$0"
12 | # Need this for relative symlinks.
13 | while [ -h "$PRG" ] ; do
14 | ls=`ls -ld "$PRG"`
15 | link=`expr "$ls" : '.*-> \(.*\)$'`
16 | if expr "$link" : '/.*' > /dev/null; then
17 | PRG="$link"
18 | else
19 | PRG=`dirname "$PRG"`"/$link"
20 | fi
21 | done
22 | SAVED="`pwd`"
23 | cd "`dirname \"$PRG\"`/" >/dev/null
24 | APP_HOME="`pwd -P`"
25 | cd "$SAVED" >/dev/null
26 |
27 | APP_NAME="Gradle"
28 | APP_BASE_NAME=`basename "$0"`
29 |
30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31 | DEFAULT_JVM_OPTS=""
32 |
33 | # Use the maximum available, or set MAX_FD != -1 to use that value.
34 | MAX_FD="maximum"
35 |
36 | warn () {
37 | echo "$*"
38 | }
39 |
40 | die () {
41 | echo
42 | echo "$*"
43 | echo
44 | exit 1
45 | }
46 |
47 | # OS specific support (must be 'true' or 'false').
48 | cygwin=false
49 | msys=false
50 | darwin=false
51 | nonstop=false
52 | case "`uname`" in
53 | CYGWIN* )
54 | cygwin=true
55 | ;;
56 | Darwin* )
57 | darwin=true
58 | ;;
59 | MINGW* )
60 | msys=true
61 | ;;
62 | NONSTOP* )
63 | nonstop=true
64 | ;;
65 | esac
66 |
67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68 |
69 | # Determine the Java command to use to start the JVM.
70 | if [ -n "$JAVA_HOME" ] ; then
71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72 | # IBM's JDK on AIX uses strange locations for the executables
73 | JAVACMD="$JAVA_HOME/jre/sh/java"
74 | else
75 | JAVACMD="$JAVA_HOME/bin/java"
76 | fi
77 | if [ ! -x "$JAVACMD" ] ; then
78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79 |
80 | Please set the JAVA_HOME variable in your environment to match the
81 | location of your Java installation."
82 | fi
83 | else
84 | JAVACMD="java"
85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86 |
87 | Please set the JAVA_HOME variable in your environment to match the
88 | location of your Java installation."
89 | fi
90 |
91 | # Increase the maximum file descriptors if we can.
92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93 | MAX_FD_LIMIT=`ulimit -H -n`
94 | if [ $? -eq 0 ] ; then
95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96 | MAX_FD="$MAX_FD_LIMIT"
97 | fi
98 | ulimit -n $MAX_FD
99 | if [ $? -ne 0 ] ; then
100 | warn "Could not set maximum file descriptor limit: $MAX_FD"
101 | fi
102 | else
103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104 | fi
105 | fi
106 |
107 | # For Darwin, add options to specify how the application appears in the dock
108 | if $darwin; then
109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110 | fi
111 |
112 | # For Cygwin, switch paths to Windows format before running java
113 | if $cygwin ; then
114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116 | JAVACMD=`cygpath --unix "$JAVACMD"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Escape application args
158 | save () {
159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160 | echo " "
161 | }
162 | APP_ARGS=$(save "$@")
163 |
164 | # Collect all arguments for the java command, following the shell quoting and substitution rules
165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166 |
167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169 | cd "$(dirname "$0")"
170 | fi
171 |
172 | exec "$JAVACMD" "$@"
173 |
--------------------------------------------------------------------------------
/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 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
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 Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/local.properties:
--------------------------------------------------------------------------------
1 | ## This file must *NOT* be checked into Version Control Systems,
2 | # as it contains information specific to your local configuration.
3 | #
4 | # Location of the SDK. This is only used by Gradle.
5 | # For customization when using a Version Control System, please read the
6 | # header note.
7 | #Thu Jul 12 14:26:47 IST 2018
8 | sdk.dir=/Users/yudizsolutions/Library/Android/sdk
9 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------