├── .gitignore ├── .idea └── runConfigurations.xml ├── README.md ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── ic_launcher-web.png │ ├── java │ └── com │ │ └── ddd │ │ └── materialcomponents │ │ ├── model │ │ └── HomeModel.java │ │ └── ui │ │ ├── activity │ │ ├── HomeActivity.kt │ │ ├── MainActivity.kt │ │ └── SplashActivity.kt │ │ ├── adapter │ │ └── HomeAdapter.java │ │ ├── custom │ │ └── SnackbarHelper.java │ │ ├── fragment │ │ ├── CreditsFragment.kt │ │ ├── DetailsFragment.java │ │ ├── HomeFragment.java │ │ ├── LoginFragment.java │ │ └── SignupFragment.java │ │ └── util │ │ └── IValidator.java │ └── res │ ├── drawable │ ├── bg_snackbar.xml │ ├── house1.jpg │ ├── house2.jpg │ ├── house3.jpg │ ├── ic_add.xml │ ├── ic_back.xml │ ├── ic_bathtub.xml │ ├── ic_bed.xml │ ├── ic_dribble.xml │ ├── ic_email.xml │ ├── ic_facebook.xml │ ├── ic_github.xml │ ├── ic_heart.xml │ ├── ic_kitchen.xml │ ├── ic_launcher_background.xml │ ├── ic_launcher_foreground.xml │ ├── ic_linkedin.xml │ ├── ic_medium.xml │ ├── ic_milk.xml │ ├── ic_parking.xml │ ├── ic_remove.xml │ ├── ic_sale.xml │ ├── ic_television.xml │ ├── ic_washing_machine.xml │ ├── login_header.jpg │ └── ryan_ronalds.jpg │ ├── layout │ ├── activity_home.xml │ ├── activity_main.xml │ ├── activity_splash.xml │ ├── fragment_credits.xml │ ├── fragment_detail.xml │ ├── fragment_home.xml │ ├── fragment_login.xml │ ├── fragment_signup.xml │ └── row_home.xml │ ├── menu │ └── app_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 │ └── lottie.json │ └── values │ ├── colors.xml │ ├── dimens.xml │ ├── strings.xml │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/android,androidstudio 3 | 4 | ### Android ### 5 | # Built application files 6 | *.apk 7 | *.ap_ 8 | 9 | # Files for the ART/Dalvik VM 10 | *.dex 11 | 12 | # Java class files 13 | *.class 14 | 15 | # Generated files 16 | bin/ 17 | gen/ 18 | out/ 19 | 20 | # Gradle files 21 | .gradle/ 22 | build/ 23 | 24 | # Local configuration file (sdk path, etc) 25 | local.properties 26 | 27 | # Proguard folder generated by Eclipse 28 | proguard/ 29 | 30 | # Log Files 31 | *.log 32 | 33 | # Android Studio Navigation editor temp files 34 | .navigation/ 35 | 36 | # Android Studio captures folder 37 | captures/ 38 | 39 | # Intellij 40 | *.iml 41 | .idea/workspace.xml 42 | .idea/tasks.xml 43 | .idea/gradle.xml 44 | .idea/dictionaries 45 | .idea/libraries 46 | 47 | # External native build folder generated in Android Studio 2.2 and later 48 | .externalNativeBuild 49 | 50 | # Freeline 51 | freeline.py 52 | freeline/ 53 | freeline_project_description.json 54 | 55 | ### Android Patch ### 56 | gen-external-apklibs 57 | 58 | ### AndroidStudio ### 59 | # Covers files to be ignored for android development using Android Studio. 60 | 61 | # Built application files 62 | 63 | # Files for the ART/Dalvik VM 64 | 65 | # Java class files 66 | 67 | # Generated files 68 | 69 | # Gradle files 70 | .gradle 71 | 72 | # Signing files 73 | .signing/ 74 | 75 | # Local configuration file (sdk path, etc) 76 | 77 | # Proguard folder generated by Eclipse 78 | 79 | # Log Files 80 | 81 | # Android Studio 82 | /*/build/ 83 | /*/local.properties 84 | /*/out 85 | /*/*/build 86 | /*/*/production 87 | *.ipr 88 | *~ 89 | *.swp 90 | 91 | # Android Patch 92 | 93 | # External native build folder generated in Android Studio 2.2 and later 94 | 95 | # NDK 96 | obj/ 97 | 98 | # IntelliJ IDEA 99 | *.iws 100 | /out/ 101 | 102 | # User-specific configurations 103 | .idea/caches/ 104 | .idea/libraries/ 105 | .idea/shelf/ 106 | .idea/.name 107 | .idea/compiler.xml 108 | .idea/copyright/profiles_settings.xml 109 | .idea/encodings.xml 110 | .idea/misc.xml 111 | .idea/modules.xml 112 | .idea/scopes/scope_settings.xml 113 | .idea/vcs.xml 114 | .idea/jsLibraryMappings.xml 115 | .idea/datasources.xml 116 | .idea/dataSources.ids 117 | .idea/sqlDataSources.xml 118 | .idea/dynamic.xml 119 | .idea/uiDesigner.xml 120 | 121 | # OS-specific files 122 | .DS_Store 123 | .DS_Store? 124 | ._* 125 | .Spotlight-V100 126 | .Trashes 127 | ehthumbs.db 128 | Thumbs.db 129 | 130 | # Legacy Eclipse project files 131 | .classpath 132 | .project 133 | .cproject 134 | .settings/ 135 | 136 | # Mobile Tools for Java (J2ME) 137 | .mtj.tmp/ 138 | 139 | # Package Files # 140 | *.war 141 | *.ear 142 | 143 | # virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml) 144 | hs_err_pid* 145 | 146 | ## Plugin-specific files: 147 | 148 | # mpeltonen/sbt-idea plugin 149 | .idea_modules/ 150 | 151 | # JIRA plugin 152 | atlassian-ide-plugin.xml 153 | 154 | # Mongo Explorer plugin 155 | .idea/mongoSettings.xml 156 | 157 | # Crashlytics plugin (for Android Studio and IntelliJ) 158 | com_crashlytics_export_strings.xml 159 | crashlytics.properties 160 | crashlytics-build.properties 161 | fabric.properties 162 | 163 | ### AndroidStudio Patch ### 164 | 165 | !/gradle/wrapper/gradle-wrapper.jar 166 | 167 | 168 | # End of https://www.gitignore.io/api/android,androidstudio -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MaterialComponents 2 | The purpose of this repository is to demonstrate newly added components in material design components and how to use them in your project. 3 | 4 | 5 | ![](https://i.imgur.com/F1Sm3fS.gif) 6 | 7 | Login screen with Material Buttons and custom MDC SnackBar with swipe to dissmiss feature 8 | 9 | 10 | ![](https://i.imgur.com/IUnFUZO.gif) 11 | 12 | SignUp screen with TextInputLayouts using updated material theme "style="@style/Widget.MaterialComponents.TextInputLayout.OutlineBox.Dense" 13 | Demonstrating newly added properties 14 | 15 | ![](https://i.imgur.com/CDBCJfH.gif) 16 | 17 | Jump animation created by playing around the behaviour of BottomAppBar 18 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/android,androidstudio 3 | 4 | ### Android ### 5 | # Built application files 6 | *.apk 7 | *.ap_ 8 | 9 | # Files for the ART/Dalvik VM 10 | *.dex 11 | 12 | # Java class files 13 | *.class 14 | 15 | # Generated files 16 | bin/ 17 | gen/ 18 | out/ 19 | 20 | # Gradle files 21 | .gradle/ 22 | build/ 23 | 24 | # Local configuration file (sdk path, etc) 25 | local.properties 26 | 27 | # Proguard folder generated by Eclipse 28 | proguard/ 29 | 30 | # Log Files 31 | *.log 32 | 33 | # Android Studio Navigation editor temp files 34 | .navigation/ 35 | 36 | # Android Studio captures folder 37 | captures/ 38 | 39 | # Intellij 40 | *.iml 41 | .idea/workspace.xml 42 | .idea/tasks.xml 43 | .idea/gradle.xml 44 | .idea/dictionaries 45 | .idea/libraries 46 | 47 | # External native build folder generated in Android Studio 2.2 and later 48 | .externalNativeBuild 49 | 50 | # Freeline 51 | freeline.py 52 | freeline/ 53 | freeline_project_description.json 54 | 55 | ### Android Patch ### 56 | gen-external-apklibs 57 | 58 | ### AndroidStudio ### 59 | # Covers files to be ignored for android development using Android Studio. 60 | 61 | # Built application files 62 | 63 | # Files for the ART/Dalvik VM 64 | 65 | # Java class files 66 | 67 | # Generated files 68 | 69 | # Gradle files 70 | .gradle 71 | 72 | # Signing files 73 | .signing/ 74 | 75 | # Local configuration file (sdk path, etc) 76 | 77 | # Proguard folder generated by Eclipse 78 | 79 | # Log Files 80 | 81 | # Android Studio 82 | /*/build/ 83 | /*/local.properties 84 | /*/out 85 | /*/*/build 86 | /*/*/production 87 | *.ipr 88 | *~ 89 | *.swp 90 | 91 | # Android Patch 92 | 93 | # External native build folder generated in Android Studio 2.2 and later 94 | 95 | # NDK 96 | obj/ 97 | 98 | # IntelliJ IDEA 99 | *.iws 100 | /out/ 101 | 102 | # User-specific configurations 103 | .idea/caches/ 104 | .idea/libraries/ 105 | .idea/shelf/ 106 | .idea/.name 107 | .idea/compiler.xml 108 | .idea/copyright/profiles_settings.xml 109 | .idea/encodings.xml 110 | .idea/misc.xml 111 | .idea/modules.xml 112 | .idea/scopes/scope_settings.xml 113 | .idea/vcs.xml 114 | .idea/jsLibraryMappings.xml 115 | .idea/datasources.xml 116 | .idea/dataSources.ids 117 | .idea/sqlDataSources.xml 118 | .idea/dynamic.xml 119 | .idea/uiDesigner.xml 120 | 121 | # OS-specific files 122 | .DS_Store 123 | .DS_Store? 124 | ._* 125 | .Spotlight-V100 126 | .Trashes 127 | ehthumbs.db 128 | Thumbs.db 129 | 130 | # Legacy Eclipse project files 131 | .classpath 132 | .project 133 | .cproject 134 | .settings/ 135 | 136 | # Mobile Tools for Java (J2ME) 137 | .mtj.tmp/ 138 | 139 | # Package Files # 140 | *.war 141 | *.ear 142 | 143 | # virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml) 144 | hs_err_pid* 145 | 146 | ## Plugin-specific files: 147 | 148 | # mpeltonen/sbt-idea plugin 149 | .idea_modules/ 150 | 151 | # JIRA plugin 152 | atlassian-ide-plugin.xml 153 | 154 | # Mongo Explorer plugin 155 | .idea/mongoSettings.xml 156 | 157 | # Crashlytics plugin (for Android Studio and IntelliJ) 158 | com_crashlytics_export_strings.xml 159 | crashlytics.properties 160 | crashlytics-build.properties 161 | fabric.properties 162 | 163 | ### AndroidStudio Patch ### 164 | 165 | !/gradle/wrapper/gradle-wrapper.jar 166 | 167 | 168 | # End of https://www.gitignore.io/api/android,androidstudio -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | apply plugin: 'kotlin-android' 3 | apply plugin: 'kotlin-android-extensions' 4 | 5 | android { 6 | compileSdkVersion 'android-P' 7 | defaultConfig { 8 | applicationId "com.ddd.materialcomponents" 9 | minSdkVersion 21 10 | targetSdkVersion 27 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | 15 | dataBinding { 16 | enabled true 17 | } 18 | 19 | buildTypes { 20 | release { 21 | minifyEnabled false 22 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 23 | } 24 | } 25 | } 26 | 27 | dependencies { 28 | implementation fileTree(dir: 'libs', include: ['*.jar']) 29 | 30 | implementation 'com.android.support:appcompat-v7:28.0.0-alpha1' 31 | implementation 'com.android.support:design:28.0.0-alpha1' 32 | implementation 'com.android.support:cardview-v7:28.0.0-alpha1' 33 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" 34 | /** 35 | * lottie animation 36 | */ 37 | implementation 'com.airbnb.android:lottie:2.5.4' 38 | } -------------------------------------------------------------------------------- /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 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SubirZ/MaterialComponents/eaf84b0030636b61d0e763aa835ba12459b0de4f/app/src/main/ic_launcher-web.png -------------------------------------------------------------------------------- /app/src/main/java/com/ddd/materialcomponents/model/HomeModel.java: -------------------------------------------------------------------------------- 1 | package com.ddd.materialcomponents.model; 2 | 3 | import android.os.Parcel; 4 | import android.os.Parcelable; 5 | 6 | /** 7 | * Created by S.C. on 23/05/18. 8 | */ 9 | 10 | public class HomeModel implements Parcelable{ 11 | private int image; 12 | private int description; 13 | private int propertyName; 14 | 15 | public HomeModel() { 16 | } 17 | 18 | public HomeModel(int image, int description, int propertyName) { 19 | this.image = image; 20 | this.description = description; 21 | this.propertyName = propertyName; 22 | } 23 | 24 | protected HomeModel(Parcel in) { 25 | image = in.readInt(); 26 | description = in.readInt(); 27 | propertyName = in.readInt(); 28 | } 29 | 30 | public static final Creator CREATOR = new Creator() { 31 | @Override 32 | public HomeModel createFromParcel(Parcel in) { 33 | return new HomeModel(in); 34 | } 35 | 36 | @Override 37 | public HomeModel[] newArray(int size) { 38 | return new HomeModel[size]; 39 | } 40 | }; 41 | 42 | public int getImage() { 43 | return image; 44 | } 45 | 46 | public void setImage(int image) { 47 | this.image = image; 48 | } 49 | 50 | public int getDescription() { 51 | return description; 52 | } 53 | 54 | public void setDescription(int description) { 55 | this.description = description; 56 | } 57 | 58 | public int getPropertyName() { 59 | return propertyName; 60 | } 61 | 62 | public void setPropertyName(int propertyName) { 63 | this.propertyName = propertyName; 64 | } 65 | 66 | @Override 67 | public int describeContents() { 68 | return 0; 69 | } 70 | 71 | @Override 72 | public void writeToParcel(Parcel parcel, int i) { 73 | parcel.writeInt(image); 74 | parcel.writeInt(description); 75 | parcel.writeInt(propertyName); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /app/src/main/java/com/ddd/materialcomponents/ui/activity/HomeActivity.kt: -------------------------------------------------------------------------------- 1 | package com.ddd.materialcomponents.ui.activity 2 | 3 | import android.os.Bundle 4 | import android.os.Handler 5 | import android.support.design.bottomappbar.BottomAppBar 6 | import android.support.v4.app.Fragment 7 | import android.support.v7.app.AppCompatActivity 8 | import com.ddd.materialcomponents.R 9 | import com.ddd.materialcomponents.ui.fragment.DetailsFragment 10 | import com.ddd.materialcomponents.ui.fragment.HomeFragment 11 | import kotlinx.android.synthetic.main.activity_home.* 12 | 13 | /** 14 | * Created by S.C. on 09/06/18. 15 | */ 16 | class HomeActivity : AppCompatActivity() { 17 | private val handler: Handler = Handler() 18 | var one : Int = 0 19 | 20 | override fun onCreate(savedInstanceState: Bundle?) { 21 | super.onCreate(savedInstanceState) 22 | setContentView(R.layout.activity_home) 23 | 24 | if (savedInstanceState == null) { 25 | supportFragmentManager 26 | .beginTransaction() 27 | .replace(R.id.flContainerHome, HomeFragment.newInstance()) 28 | .commit() 29 | } 30 | initView() 31 | } 32 | 33 | private fun initView() { 34 | setSupportActionBar(bottomAppBar) 35 | } 36 | 37 | override fun onBackPressed() { 38 | if (getCurrentFragment() is DetailsFragment) { 39 | detachFab() 40 | returnToHome() 41 | } 42 | super.onBackPressed() 43 | } 44 | 45 | private fun getCurrentFragment(): Fragment { 46 | return supportFragmentManager.findFragmentById(R.id.flContainerHome) 47 | } 48 | 49 | fun detachFab() { 50 | bottomAppBar.isFabAttached = false 51 | } 52 | 53 | fun moveToDetails() { 54 | bottomAppBar.fabAlignmentMode = BottomAppBar.FAB_ALIGNMENT_MODE_END 55 | attachFab() 56 | } 57 | 58 | private fun returnToHome() { 59 | bottomAppBar.fabAlignmentMode = BottomAppBar.FAB_ALIGNMENT_MODE_CENTER 60 | attachFab() 61 | } 62 | 63 | private fun attachFab() { 64 | val runnable = Runnable { 65 | bottomAppBar.isFabAttached = true 66 | } 67 | handler.postDelayed(runnable, 150) 68 | } 69 | } -------------------------------------------------------------------------------- /app/src/main/java/com/ddd/materialcomponents/ui/activity/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.ddd.materialcomponents.ui.activity 2 | 3 | import android.os.Bundle 4 | import android.support.v7.app.AppCompatActivity 5 | 6 | import com.ddd.materialcomponents.R 7 | import com.ddd.materialcomponents.ui.fragment.LoginFragment 8 | 9 | /** 10 | * Created by S.C. on 20/05/18. 11 | */ 12 | class MainActivity : AppCompatActivity() { 13 | 14 | override fun onCreate(savedInstanceState: Bundle?) { 15 | super.onCreate(savedInstanceState) 16 | setContentView(R.layout.activity_main) 17 | 18 | if (savedInstanceState == null) { 19 | supportFragmentManager 20 | .beginTransaction() 21 | .replace(R.id.flContainer, LoginFragment.newInstance()) 22 | .commit() 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/com/ddd/materialcomponents/ui/activity/SplashActivity.kt: -------------------------------------------------------------------------------- 1 | package com.ddd.materialcomponents.ui.activity 2 | 3 | import android.content.Intent 4 | import android.content.res.ColorStateList 5 | import android.os.Bundle 6 | import android.support.v4.content.ContextCompat 7 | import android.support.v7.app.AppCompatActivity 8 | import android.view.View 9 | import com.ddd.materialcomponents.R 10 | import kotlinx.android.synthetic.main.activity_splash.* 11 | /** 12 | * Created by S.C. on 25/05/18. 13 | */ 14 | class SplashActivity : AppCompatActivity(), View.OnClickListener { 15 | var prog: Int = 0 16 | 17 | override fun onCreate(savedInstanceState: Bundle?) { 18 | super.onCreate(savedInstanceState) 19 | setContentView(R.layout.activity_splash) 20 | 21 | animationView.playAnimation() 22 | animationView.setMinAndMaxProgress(0f, 0.29f) 23 | fabNext.setOnClickListener(this) 24 | fabPrevious.setOnClickListener(this) 25 | setTitle("Relax") 26 | } 27 | 28 | override fun onClick(view: View?) { 29 | if (view == fabNext) { 30 | animationView.speed = 1f 31 | when (prog) { 32 | 0 -> { 33 | animationView.setMinAndMaxFrame(80, 100) 34 | prog = 1 35 | setTitle("Create") 36 | } 37 | 1 -> { 38 | animationView.setMinAndMaxFrame(159, 175) 39 | prog = 2 40 | fabNext.backgroundTintList = ColorStateList.valueOf(ContextCompat.getColor(this, R.color.colorLoginPrimary)) 41 | setTitle("Work") 42 | } 43 | 2 -> { 44 | startActivity(Intent(this, MainActivity::class.java)) 45 | finish() 46 | return 47 | } 48 | } 49 | } else if (view == fabPrevious) { 50 | animationView.speed = -1f 51 | when (prog) { 52 | 2 -> { 53 | animationView.setMinAndMaxFrame(159, 175) 54 | prog = 1 55 | fabNext.backgroundTintList = ColorStateList.valueOf(ContextCompat.getColor(this, R.color.colorDribble)) 56 | setTitle("Create") 57 | } 58 | 1 -> { 59 | animationView.setMinAndMaxFrame(80, 100) 60 | prog = 0 61 | setTitle("Relax") 62 | } 63 | 0 -> return 64 | } 65 | } 66 | animationView.playAnimation() 67 | } 68 | 69 | fun setTitle(title: String): Unit { 70 | tvTitle.text = title 71 | } 72 | } -------------------------------------------------------------------------------- /app/src/main/java/com/ddd/materialcomponents/ui/adapter/HomeAdapter.java: -------------------------------------------------------------------------------- 1 | package com.ddd.materialcomponents.ui.adapter; 2 | 3 | import android.content.Context; 4 | import android.databinding.DataBindingUtil; 5 | import android.support.annotation.NonNull; 6 | import android.support.v7.widget.RecyclerView; 7 | import android.view.LayoutInflater; 8 | import android.view.View; 9 | import android.view.ViewGroup; 10 | 11 | import com.ddd.materialcomponents.R; 12 | import com.ddd.materialcomponents.databinding.RowHomeBinding; 13 | import com.ddd.materialcomponents.model.HomeModel; 14 | 15 | import java.util.ArrayList; 16 | import java.util.List; 17 | 18 | /** 19 | * Created by S.C. on 22/05/18. 20 | */ 21 | 22 | public class HomeAdapter extends RecyclerView.Adapter { 23 | private Context context; 24 | private List homeList = new ArrayList<>(); 25 | private LayoutInflater inflater; 26 | private OnClickListener listener; 27 | 28 | public HomeAdapter(Context context, List arrayList, OnClickListener listener) { 29 | this.context = context; 30 | this.homeList = arrayList; 31 | this.listener = listener; 32 | inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); 33 | } 34 | 35 | @NonNull 36 | @Override 37 | public GenreHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { 38 | return new GenreHolder((RowHomeBinding) DataBindingUtil.inflate(inflater, R.layout.row_home, parent, false)); 39 | } 40 | 41 | @Override 42 | public void onBindViewHolder(@NonNull final GenreHolder holder, final int position) { 43 | holder.binding.tvProperty.setText(homeList.get(position).getPropertyName()); 44 | holder.binding.ivProperty.setImageResource(homeList.get(position).getImage()); 45 | holder.binding.cvParent.setOnClickListener(new View.OnClickListener() { 46 | @Override 47 | public void onClick(View view) { 48 | listener.onClick(holder.getAdapterPosition()); 49 | } 50 | }); 51 | } 52 | 53 | @Override 54 | public int getItemCount() { 55 | return homeList.size(); 56 | } 57 | 58 | class GenreHolder extends RecyclerView.ViewHolder { 59 | private RowHomeBinding binding; 60 | 61 | public GenreHolder(RowHomeBinding binding) { 62 | super(binding.getRoot()); 63 | this.binding = binding; 64 | } 65 | } 66 | 67 | public interface OnClickListener { 68 | 69 | void onClick(int position); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /app/src/main/java/com/ddd/materialcomponents/ui/custom/SnackbarHelper.java: -------------------------------------------------------------------------------- 1 | package com.ddd.materialcomponents.ui.custom; 2 | 3 | import android.content.Context; 4 | import android.support.design.widget.Snackbar; 5 | import android.support.v4.content.ContextCompat; 6 | import android.support.v4.view.ViewCompat; 7 | import android.view.View; 8 | import android.view.ViewGroup; 9 | 10 | import com.ddd.materialcomponents.R; 11 | 12 | /** 13 | * Created by S.C. on 29/05/18. 14 | */ 15 | 16 | public class SnackbarHelper { 17 | 18 | public static void configSnackbar(Context context, Snackbar snack) { 19 | addMargins(snack); 20 | setRoundBordersBg(context, snack); 21 | // addSwipeToDismissBehaviour(snack); 22 | setAction(snack, context); 23 | ViewCompat.setElevation(snack.getView(), 6f); 24 | } 25 | 26 | private static void addMargins(Snackbar snack) { 27 | ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) snack.getView().getLayoutParams(); 28 | params.setMargins(30, 0, 30, 30); 29 | snack.getView().setLayoutParams(params); 30 | } 31 | 32 | private static void setRoundBordersBg(Context context, Snackbar snackbar) { 33 | snackbar.getView().setBackground(context.getDrawable(R.drawable.bg_snackbar)); 34 | } 35 | 36 | private static void setAction(final Snackbar snackbar, Context context) { 37 | snackbar.setActionTextColor(ContextCompat.getColor(context, R.color.colorFlamingo)); 38 | snackbar.setAction("Dismiss", new View.OnClickListener() { 39 | @Override 40 | public void onClick(View view) { 41 | snackbar.dismiss(); 42 | } 43 | }); 44 | } 45 | 46 | // private static void addSwipeToDismissBehaviour(Snackbar snackbar){ 47 | // View snackBarView = snackbar.getView(); 48 | // final ViewGroup.LayoutParams lp = snackBarView.getLayoutParams(); 49 | // if (lp instanceof CoordinatorLayout.LayoutParams) { 50 | // final CoordinatorLayout.LayoutParams layoutParams = (CoordinatorLayout.LayoutParams) lp; 51 | // CoordinatorLayout.Behavior behavior = layoutParams.getBehavior(); 52 | // if(behavior instanceof SwipeDismissBehavior){ 53 | // ((SwipeDismissBehavior) behavior).setSwipeDirection(SwipeDismissBehavior.SWIPE_DIRECTION_END_TO_START); // or SwipeDismissBehavior.SWIPE_DIRECTION_ANY 54 | // } 55 | // layoutParams.setBehavior(behavior); 56 | // } 57 | // } 58 | } 59 | -------------------------------------------------------------------------------- /app/src/main/java/com/ddd/materialcomponents/ui/fragment/CreditsFragment.kt: -------------------------------------------------------------------------------- 1 | package com.ddd.materialcomponents.ui.fragment 2 | 3 | import android.content.Intent 4 | import android.net.Uri 5 | import android.os.Bundle 6 | import android.support.v4.app.Fragment 7 | import android.view.LayoutInflater 8 | import android.view.View 9 | import android.view.ViewGroup 10 | import com.ddd.materialcomponents.R 11 | import kotlinx.android.synthetic.main.fragment_credits.* 12 | 13 | 14 | /** 15 | * Created by S.C. on 31/05/18. 16 | */ 17 | class CreditsFragment : Fragment(), View.OnClickListener { 18 | 19 | override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { 20 | return inflater.inflate(R.layout.fragment_credits, container, false) 21 | } 22 | 23 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { 24 | super.onViewCreated(view, savedInstanceState) 25 | ivLinkedIn.setOnClickListener(this) 26 | ivMedium.setOnClickListener(this) 27 | ivGithub.setOnClickListener(this) 28 | } 29 | 30 | override fun onClick(view: View) { 31 | when (view) { 32 | ivLinkedIn -> openURLinBrowser("https://www.linkedin.com/in/subir-chakraborty-517107b9") 33 | ivMedium -> openURLinBrowser("https://medium.com/@subir.chakraborty") 34 | ivGithub -> openURLinBrowser("https://github.com/SubirZ") 35 | } 36 | } 37 | 38 | fun openURLinBrowser(url: String) { 39 | val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(url)) 40 | startActivity(browserIntent) 41 | } 42 | } -------------------------------------------------------------------------------- /app/src/main/java/com/ddd/materialcomponents/ui/fragment/DetailsFragment.java: -------------------------------------------------------------------------------- 1 | package com.ddd.materialcomponents.ui.fragment; 2 | 3 | import android.animation.Animator; 4 | import android.animation.AnimatorListenerAdapter; 5 | import android.databinding.DataBindingUtil; 6 | import android.os.Bundle; 7 | import android.support.annotation.NonNull; 8 | import android.support.annotation.Nullable; 9 | import android.support.design.chip.ChipGroup; 10 | import android.support.v4.app.Fragment; 11 | import android.view.LayoutInflater; 12 | import android.view.View; 13 | import android.view.ViewAnimationUtils; 14 | import android.view.ViewGroup; 15 | import android.view.animation.AnticipateInterpolator; 16 | import android.widget.Toast; 17 | 18 | import com.ddd.materialcomponents.R; 19 | import com.ddd.materialcomponents.databinding.FragmentDetailBinding; 20 | import com.ddd.materialcomponents.model.HomeModel; 21 | 22 | /** 23 | * Created by S.C. on 21/05/18. 24 | */ 25 | 26 | public class DetailsFragment extends Fragment implements ChipGroup.OnCheckedChangeListener { 27 | private final String BUNDLE_ID = "BUNDLE_ID"; 28 | private boolean isRevealed; 29 | private FragmentDetailBinding binding; 30 | private HomeModel homeList = new HomeModel(); 31 | 32 | @Nullable 33 | @Override 34 | public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { 35 | binding = DataBindingUtil.inflate(inflater, R.layout.fragment_detail, container, false); 36 | return binding.getRoot(); 37 | } 38 | 39 | @Override 40 | public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { 41 | super.onViewCreated(view, savedInstanceState); 42 | 43 | homeList = getArguments().getParcelable(BUNDLE_ID); 44 | initView(); 45 | } 46 | 47 | private void initView() { 48 | binding.tvProperty.setText(homeList.getPropertyName()); 49 | binding.tvDescription.setText(homeList.getDescription()); 50 | binding.ivProperty.setImageResource(homeList.getImage()); 51 | 52 | 53 | binding.fabAdd.setOnClickListener(new View.OnClickListener() { 54 | @Override 55 | public void onClick(View view) { 56 | if (!isRevealed) { 57 | binding.fabAdd.setImageResource(R.drawable.ic_remove); 58 | int w = binding.hsvChip.getWidth(); 59 | int h = binding.hsvChip.getHeight(); 60 | final int endRadius = (int) Math.hypot(w, h); 61 | final int cy = (binding.hsvChip.getBottom() + binding.hsvChip.getTop()) / 2; 62 | 63 | final Animator revealAnimator = ViewAnimationUtils.createCircularReveal(binding.hsvChip, 0, cy, 0, endRadius); 64 | revealAnimator.setDuration(700); 65 | revealAnimator.setInterpolator(new AnticipateInterpolator()); 66 | revealAnimator.start(); 67 | binding.cgChips.setVisibility(View.VISIBLE); 68 | isRevealed = true; 69 | } else { 70 | int w = binding.hsvChip.getWidth(); 71 | int h = binding.hsvChip.getHeight(); 72 | final int endRadius = (int) Math.hypot(w, h); 73 | final int cy = (binding.hsvChip.getBottom() + binding.hsvChip.getTop()) / 2; 74 | 75 | final Animator revealAnimator = ViewAnimationUtils.createCircularReveal(binding.hsvChip, 0, cy, endRadius, 0); 76 | revealAnimator.setDuration(700); 77 | revealAnimator.setInterpolator(new AnticipateInterpolator()); 78 | revealAnimator.start(); 79 | revealAnimator.addListener(new AnimatorListenerAdapter() { 80 | @Override 81 | public void onAnimationEnd(Animator animation) { 82 | super.onAnimationEnd(animation); 83 | binding.fabAdd.setImageResource(R.drawable.ic_add); 84 | binding.cgChips.setVisibility(View.GONE); 85 | } 86 | }); 87 | isRevealed = false; 88 | } 89 | } 90 | }); 91 | 92 | binding.cgChips.setOnCheckedChangeListener(this); 93 | } 94 | 95 | @Override 96 | public void onCheckedChanged(ChipGroup group, int checkedId) { 97 | Toast.makeText(getActivity(), "checked "+checkedId, Toast.LENGTH_SHORT).show(); 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /app/src/main/java/com/ddd/materialcomponents/ui/fragment/HomeFragment.java: -------------------------------------------------------------------------------- 1 | package com.ddd.materialcomponents.ui.fragment; 2 | 3 | import android.databinding.DataBindingUtil; 4 | import android.os.Bundle; 5 | import android.support.annotation.NonNull; 6 | import android.support.annotation.Nullable; 7 | import android.support.v4.app.Fragment; 8 | import android.view.LayoutInflater; 9 | import android.view.View; 10 | import android.view.ViewGroup; 11 | 12 | import com.ddd.materialcomponents.R; 13 | import com.ddd.materialcomponents.databinding.FragmentHomeBinding; 14 | import com.ddd.materialcomponents.model.HomeModel; 15 | import com.ddd.materialcomponents.ui.activity.HomeActivity; 16 | import com.ddd.materialcomponents.ui.adapter.HomeAdapter; 17 | 18 | import java.util.ArrayList; 19 | import java.util.List; 20 | 21 | /** 22 | * Created by S.C. on 21/05/18. 23 | */ 24 | 25 | public class HomeFragment extends Fragment implements HomeAdapter.OnClickListener { 26 | private FragmentHomeBinding binding; 27 | private final String BUNDLE_ID = "BUNDLE_ID"; 28 | private List homeList = new ArrayList<>(); 29 | 30 | 31 | public static HomeFragment newInstance() { 32 | return new HomeFragment(); 33 | } 34 | 35 | @Nullable 36 | @Override 37 | public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { 38 | binding = DataBindingUtil.inflate(inflater, R.layout.fragment_home, container, false); 39 | return binding.getRoot(); 40 | } 41 | 42 | @Override 43 | public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { 44 | super.onViewCreated(view, savedInstanceState); 45 | 46 | initView(); 47 | } 48 | 49 | private void initView() { 50 | homeList.add(new HomeModel(R.drawable.house1, R.string.desc1, R.string.property1_name)); 51 | homeList.add(new HomeModel(R.drawable.house2, R.string.desc2, R.string.property2_name)); 52 | homeList.add(new HomeModel(R.drawable.house3, R.string.desc3, R.string.property3_name)); 53 | 54 | final HomeAdapter adapter = new HomeAdapter(getActivity(), homeList, this); 55 | binding.rvHome.hasFixedSize(); 56 | binding.rvHome.setAdapter(adapter); 57 | } 58 | 59 | @Override 60 | public void onClick(int position) { 61 | final DetailsFragment detailsFragment = new DetailsFragment(); 62 | final Bundle bundle = new Bundle(); 63 | bundle.putParcelable(BUNDLE_ID, homeList.get(position)); 64 | detailsFragment.setArguments(bundle); 65 | 66 | getActivity().getSupportFragmentManager() 67 | .beginTransaction() 68 | .add(R.id.flContainerHome, detailsFragment) 69 | .addToBackStack(SignupFragment.class.getSimpleName()) 70 | .hide(HomeFragment.this) 71 | .commit(); 72 | ((HomeActivity) getActivity()).detachFab(); 73 | ((HomeActivity) getActivity()).moveToDetails(); 74 | } 75 | } -------------------------------------------------------------------------------- /app/src/main/java/com/ddd/materialcomponents/ui/fragment/LoginFragment.java: -------------------------------------------------------------------------------- 1 | package com.ddd.materialcomponents.ui.fragment; 2 | 3 | import android.content.Intent; 4 | import android.databinding.DataBindingUtil; 5 | import android.os.Bundle; 6 | import android.support.annotation.NonNull; 7 | import android.support.annotation.Nullable; 8 | import android.support.design.widget.Snackbar; 9 | import android.support.v4.app.Fragment; 10 | import android.view.LayoutInflater; 11 | import android.view.View; 12 | import android.view.ViewGroup; 13 | 14 | import com.ddd.materialcomponents.R; 15 | import com.ddd.materialcomponents.databinding.FragmentLoginBinding; 16 | import com.ddd.materialcomponents.ui.activity.HomeActivity; 17 | import com.ddd.materialcomponents.ui.custom.SnackbarHelper; 18 | 19 | /** 20 | * Created by S.C. on 21/05/18. 21 | */ 22 | 23 | public class LoginFragment extends Fragment implements View.OnClickListener { 24 | private FragmentLoginBinding binding; 25 | 26 | public static LoginFragment newInstance() { 27 | return new LoginFragment(); 28 | } 29 | 30 | @Nullable 31 | @Override 32 | public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { 33 | binding = DataBindingUtil.inflate(inflater, R.layout.fragment_login, container, false); 34 | return binding.getRoot(); 35 | } 36 | 37 | @Override 38 | public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { 39 | super.onViewCreated(view, savedInstanceState); 40 | 41 | binding.tvSignUp.setOnClickListener(this); 42 | binding.btnDribbleLogin.setOnClickListener(this); 43 | binding.btnFacebookLogin.setOnClickListener(this); 44 | } 45 | 46 | @Override 47 | public void onClick(View view) { 48 | switch (view.getId()) { 49 | case R.id.tvSignUp: 50 | getActivity().getSupportFragmentManager() 51 | .beginTransaction() 52 | .add(R.id.flContainer, SignupFragment.newInstance()) 53 | .addToBackStack(SignupFragment.class.getSimpleName()) 54 | .hide(LoginFragment.this) 55 | .commit(); 56 | break; 57 | 58 | case R.id.btnDribbleLogin: 59 | validate(); 60 | break; 61 | case R.id.btnFacebookLogin: 62 | login(); 63 | break; 64 | } 65 | } 66 | 67 | 68 | private void validate() { 69 | final Snackbar snack = Snackbar.make(binding.btnFacebookLogin, getString(R.string.alert_login), Snackbar.LENGTH_LONG); 70 | SnackbarHelper.configSnackbar(getActivity(), snack); 71 | //snack.config(this) if you're using Kotlin 72 | snack.show(); 73 | } 74 | 75 | private void login() { 76 | startActivity(new Intent(getActivity(), HomeActivity.class)); 77 | getActivity().finish(); 78 | } 79 | 80 | } 81 | -------------------------------------------------------------------------------- /app/src/main/java/com/ddd/materialcomponents/ui/fragment/SignupFragment.java: -------------------------------------------------------------------------------- 1 | package com.ddd.materialcomponents.ui.fragment; 2 | 3 | import android.databinding.DataBindingUtil; 4 | import android.os.Bundle; 5 | import android.support.annotation.NonNull; 6 | import android.support.annotation.Nullable; 7 | import android.support.design.widget.Snackbar; 8 | import android.support.design.widget.TextInputLayout; 9 | import android.support.v4.app.Fragment; 10 | import android.text.TextUtils; 11 | import android.view.LayoutInflater; 12 | import android.view.View; 13 | import android.view.ViewGroup; 14 | 15 | import com.ddd.materialcomponents.R; 16 | import com.ddd.materialcomponents.databinding.FragmentSignupBinding; 17 | import com.ddd.materialcomponents.ui.util.IValidator; 18 | 19 | /** 20 | * Created by S.C. on 21/05/18. 21 | */ 22 | 23 | public class SignupFragment extends Fragment implements View.OnClickListener, IValidator { 24 | private FragmentSignupBinding binding; 25 | 26 | public static SignupFragment newInstance() { 27 | return new SignupFragment(); 28 | } 29 | 30 | @Nullable 31 | @Override 32 | public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { 33 | binding = DataBindingUtil.inflate(inflater, R.layout.fragment_signup, container, false); 34 | return binding.getRoot(); 35 | } 36 | 37 | @Override 38 | public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { 39 | super.onViewCreated(view, savedInstanceState); 40 | 41 | binding.tvLogin.setOnClickListener(this); 42 | binding.btnSignUp.setOnClickListener(this); 43 | } 44 | 45 | @Override 46 | public void onClick(View view) { 47 | switch (view.getId()) { 48 | case R.id.tvLogin: 49 | getActivity().getSupportFragmentManager() 50 | .beginTransaction() 51 | .replace(R.id.flContainer, LoginFragment.newInstance()) 52 | .commit(); 53 | break; 54 | case R.id.btnSignUp: 55 | validate(); 56 | break; 57 | 58 | } 59 | } 60 | 61 | @Override 62 | public void validate() { 63 | resetError(); 64 | if (TextUtils.isEmpty(binding.etUserName.getText())) { 65 | onValidationFailure(binding.tilUserName, getString(R.string.alert_username)); 66 | } else if (TextUtils.isEmpty(binding.etName.getText())) { 67 | onValidationFailure(binding.tilName, getString(R.string.alert_name)); 68 | 69 | } else if (TextUtils.isEmpty(binding.etPassword.getText())) { 70 | binding.etPassword.setError(getString(R.string.alert_password)); 71 | binding.tilPassword.requestFocus(); 72 | 73 | } else if (binding.etPassword.getText().length() < 8) { 74 | binding.etPassword.setError(getString(R.string.help_password)); 75 | binding.tilPassword.requestFocus(); 76 | 77 | } else if (TextUtils.isEmpty(binding.etConfirmPassword.getText())) { 78 | onValidationFailure(binding.tilConfirmPassword, getString(R.string.help_retype_password)); 79 | 80 | } else if (!binding.etPassword.getText().toString().equals(binding.etConfirmPassword.getText().toString())) { 81 | onValidationFailure(binding.tilConfirmPassword, getString(R.string.alert_retype_password)); 82 | 83 | } else { 84 | resetError(); 85 | onValidationSuccess(); 86 | } 87 | 88 | } 89 | 90 | @Override 91 | public void onValidationFailure(TextInputLayout inputLayout, String error) { 92 | inputLayout.setError(error); 93 | inputLayout.requestFocus(); 94 | } 95 | 96 | @Override 97 | public void onValidationSuccess() { 98 | Snackbar.make(binding.etName, getString(R.string.signup_success), Snackbar.LENGTH_SHORT).show(); 99 | } 100 | 101 | private void resetError() { 102 | binding.tilName.setError(null); 103 | binding.tilUserName.setError(null); 104 | binding.tilPassword.setError(null); 105 | binding.tilConfirmPassword.setError(null); 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /app/src/main/java/com/ddd/materialcomponents/ui/util/IValidator.java: -------------------------------------------------------------------------------- 1 | package com.ddd.materialcomponents.ui.util; 2 | 3 | import android.support.design.widget.TextInputLayout; 4 | 5 | /** 6 | * Created by S.C. on 22/05/18. 7 | */ 8 | 9 | public interface IValidator { 10 | 11 | void validate(); 12 | 13 | void onValidationFailure(TextInputLayout inputLayout, String error); 14 | 15 | void onValidationSuccess(); 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_snackbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/house1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SubirZ/MaterialComponents/eaf84b0030636b61d0e763aa835ba12459b0de4f/app/src/main/res/drawable/house1.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/house2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SubirZ/MaterialComponents/eaf84b0030636b61d0e763aa835ba12459b0de4f/app/src/main/res/drawable/house2.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/house3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SubirZ/MaterialComponents/eaf84b0030636b61d0e763aa835ba12459b0de4f/app/src/main/res/drawable/house3.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_add.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_back.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_bathtub.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_bed.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_dribble.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_email.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_facebook.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_github.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_heart.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_kitchen.xml: -------------------------------------------------------------------------------- 1 | 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 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 | 24 | 26 | 28 | 30 | 32 | 34 | 36 | 38 | 40 | 42 | 44 | 46 | 48 | 50 | 52 | 54 | 56 | 58 | 60 | 62 | 64 | 66 | 68 | 70 | 72 | 74 | 75 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 6 | 8 | 12 | 16 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_linkedin.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_medium.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_milk.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_parking.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_remove.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_sale.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 15 | 18 | 21 | 24 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_television.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_washing_machine.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/login_header.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SubirZ/MaterialComponents/eaf84b0030636b61d0e763aa835ba12459b0de4f/app/src/main/res/drawable/login_header.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/ryan_ronalds.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SubirZ/MaterialComponents/eaf84b0030636b61d0e763aa835ba12459b0de4f/app/src/main/res/drawable/ryan_ronalds.jpg -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_home.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | 9 | 13 | 14 | 26 | 27 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_splash.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | 23 | 24 | 33 | 34 | 45 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_credits.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 18 | 19 | 24 | 25 | 33 | 34 | 42 | 43 | 51 | 52 | 60 | 61 | 62 | 63 | 70 | 71 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_detail.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 11 | 15 | 16 | 20 | 21 | 27 | 28 | 38 | 39 | 50 | 51 | 55 | 56 | 57 | 58 | 70 | 71 | 85 | 86 | 98 | 99 | 100 | 101 | 112 | 113 | 118 | 119 | 120 | 125 | 126 | 136 | 137 | 144 | 145 | 154 | 155 | 156 | 167 | 168 | 179 | 180 | 191 | 192 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 214 | 215 | 225 | 226 | 233 | 234 | 235 | 236 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_home.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | 9 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_login.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | 16 | 17 | 21 | 22 | 27 | 28 | 38 | 39 | 49 | 50 | 54 | 55 | 63 | 64 | 72 | 73 | 86 | 87 | 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_signup.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | 18 | 19 | 22 | 23 | 28 | 29 | 40 | 41 | 50 | 51 | 61 | 62 | 63 | 70 | 71 | 81 | 82 | 83 | 94 | 95 | 103 | 104 | 105 | 115 | 116 | 124 | 125 | 126 | 127 | 130 | 131 | 139 | 140 | 147 | 148 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /app/src/main/res/layout/row_home.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | 9 | 20 | 21 | 25 | 26 | 32 | 33 | 39 | 40 | 51 | 52 | 59 | 60 | 61 | 62 | 67 | 68 | 74 | 75 | 81 | 82 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /app/src/main/res/menu/app_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 8 | 12 | -------------------------------------------------------------------------------- /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/SubirZ/MaterialComponents/eaf84b0030636b61d0e763aa835ba12459b0de4f/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SubirZ/MaterialComponents/eaf84b0030636b61d0e763aa835ba12459b0de4f/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SubirZ/MaterialComponents/eaf84b0030636b61d0e763aa835ba12459b0de4f/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SubirZ/MaterialComponents/eaf84b0030636b61d0e763aa835ba12459b0de4f/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SubirZ/MaterialComponents/eaf84b0030636b61d0e763aa835ba12459b0de4f/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SubirZ/MaterialComponents/eaf84b0030636b61d0e763aa835ba12459b0de4f/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SubirZ/MaterialComponents/eaf84b0030636b61d0e763aa835ba12459b0de4f/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SubirZ/MaterialComponents/eaf84b0030636b61d0e763aa835ba12459b0de4f/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SubirZ/MaterialComponents/eaf84b0030636b61d0e763aa835ba12459b0de4f/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SubirZ/MaterialComponents/eaf84b0030636b61d0e763aa835ba12459b0de4f/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #000000 5 | #F22613 6 | 7 | 8 | #6200EA 9 | #6200EA 10 | 11 | #FFF06292 12 | #FF0063 13 | #5850D3 14 | #5082F6 15 | #82b1ff 16 | #292929 17 | #80292929 18 | #EF4836 19 | #AEA8D3 20 | #C5EFF7 21 | #FDE3A7 22 | #FFE461 23 | #ECF0F1 24 | #D2D7D3 25 | #86E2D5 26 | #2ECC71 27 | #b4ecf0f1 28 | 29 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 16dp 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | MaterialComponents 3 | 4 | Welcome to Rentify 5 | Find perfect accommodations \nfor peaceful living 6 | Don\'t have an account? Sign Up 7 | Already a member? Login 8 | Sign up on Rentify 9 | SignUp 10 | Username 11 | Full name 12 | Password 13 | Confirm Password 14 | home 15 | detail 16 | 2 bedroom 17 | 2 bathroom 18 | 1 kitchen 19 | Breakfast 20 | Television 21 | Parking 22 | Laundry 23 | 24 | Please enter username 25 | Please enter your name 26 | Please enter your password 27 | Passwords do not match! 28 | Please try facebook login! 29 | Password length must be greater than 8 30 | Retype your password 31 | Successfully logged in! 32 | Successfully signed up! 33 | ON SALE 34 | 35 | Malibu Dream Airstream 36 | Unique Cob Cottage 37 | Off-grid itHouse 38 | Hello everyone Sea hut is a home stay with 4 independent double bed rooms on a common veranda.The room has a king size double bed and an aircon in it. Its a perfect retreat for tourist who want to run away from the hectic city\'s. 39 | We have a unique space that gives you an opportunity of being in the wilderness, while staying in the heart of the city. It has a beautiful terrace overlooking the lake, located in hauz khas village one of the best neighbourhoods in South Delhi 40 | WOODEN CHALET ON THE RIVER BANKS is one of the three beautiful Heritage riverside properties (please check out LAZY COTTAGE ON THE RIVER BANKS and SAINT PETER\'S BAY) true Wooden Chalets situated on the banks of one of Goa\'s largest River. 41 | The house is centrally located, just 10 minutes to the Panjim Central Bus Stand which is equidistant from North and South Goa. Just a 5 minutes\' walk from the house to the Ribandar Town Center (or Patto as it is known in Goa), where you will find available dry provisions, fresh vegetables, meats and fish besides a chemist and a fast food shop. The bus stand is also situated here. All buses end their journey at the Panjim Main bus stand from where you can get all sorts of transports and car and two wheeler hire. The road going Eastwards will take you to the ancient Portuguese Capital city of Goa known as Old Goa which is just 6 Km away. Goa was the only overseas State of Portugal known as "Estado da India" and most of the history lies in this city of Old Goa. This is a location having world famous historical sites and numerous Cathedrals including the Cathedral of Bom Jesu where the body of St. Francis Xavier is preserved and visible to date. 42 | Car and bike rental facilities are also available for which information will be provided. 43 | 44 | 45 | HOME HIGHLIGHTS 46 | \n\nHideout is a Superhost · Superhosts are experienced, highly rated hosts who are committed to providing great stays for guests. 47 | \n\nGreat location · 90% of recent guests gave this home’s location a 5-star rating. 48 | \n\nGreat check-in experience · 95% of recent guests gave this home’s check-in process a 5-star rating. 49 | Hii I am subir chakraborty 50 | \n\nsoftware engineer by profession 51 | \ntraveller by soul 52 | \nphotographer by hobby 53 | \ndreamer by nature 54 | \nartist by birth 55 | \n\nI love coding in java and a newbie in kotlin 56 | \nsome dummy info which has no relation at all 57 | \nthanks for nothing 58 | \n\nlorem ipsom 59 | \nlorem ipsum 60 | \nlorem ipsum 61 | \nlorem 62 | \nlorem 63 | \nlorem 64 | Main2Activity 65 | 66 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 13 | 14 | 15 | 24 | 25 | 31 | 32 | 42 | 43 | 47 | 48 |