├── .gitignore ├── README.md ├── app ├── .gitignore ├── build.gradle ├── manifest-merger-release-report.txt ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── application │ │ └── sample │ │ └── selectcardviewprototype │ │ └── app │ │ └── ApplicationTest.java │ └── main │ ├── AndroidManifest.xml │ ├── assets │ ├── data.json │ └── fonts │ │ └── ShadowsIntoLight.ttf │ ├── java │ └── com │ │ └── application │ │ └── sample │ │ └── selectcardviewprototype │ │ └── app │ │ ├── MainActivity.java │ │ ├── SettingsActivity.java │ │ ├── adapter │ │ └── RecyclerviewAdapter.java │ │ ├── animator │ │ └── AnimatorBuilder.java │ │ ├── application │ │ └── SelectCardviewApplication.java │ │ ├── cardviewAnimator │ │ ├── CardViewAnimator.java │ │ └── CardViewAnimatorStrategyInterface.java │ │ ├── fragment │ │ ├── ContactListFragment.java │ │ ├── OnRestoreRecyclerViewInterface.java │ │ └── SettingsFragment.java │ │ ├── model │ │ ├── ContactItem.java │ │ └── Setting.java │ │ ├── singleton │ │ ├── PicassoSingleton.java │ │ ├── RetrieveAssetsSingleton.java │ │ └── StatusSingleton.java │ │ ├── strategies │ │ └── AppearOverAndExpandStrategy.java │ │ └── utils │ │ └── ConnectivityUtils.java │ └── res │ ├── drawable-hdpi │ └── ic_launcher.png │ ├── drawable-mdpi │ └── ic_launcher.png │ ├── drawable-xhdpi │ ├── ic_email_black_48dp.png │ ├── ic_launcher.png │ ├── ic_person_pin_circle_black_48dp.png │ ├── ic_phone_in_talk_black_48dp.png │ ├── ic_query_builder_black_48dp.png │ └── ic_room_black_48dp.png │ ├── drawable-xxhdpi │ └── ic_launcher.png │ ├── drawable-xxxhdpi │ └── ic_launcher.png │ ├── layout │ ├── activity_main.xml │ ├── contact_item_row.xml │ ├── email_layout.xml │ ├── fragment_main.xml │ ├── phone_layout.xml │ ├── position_layout.xml │ ├── setting_item.xml │ └── settings_layout.xml │ ├── menu │ ├── menu_main.xml │ └── menu_settings.xml │ ├── values-v21 │ └── styles.xml │ ├── values-w820dp │ └── dimens.xml │ └── values │ ├── color.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 | lt application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | 15 | # Gradle files 16 | .gradle/ 17 | build/ 18 | 19 | # Local configuration file (sdk path, etc) 20 | local.properties 21 | 22 | # Proguard folder generated by Eclipse 23 | proguard/ 24 | 25 | # Log Files 26 | *.log 27 | 28 | # Android Studio Navigation editor temp files 29 | .navigation/ 30 | 31 | # Android Studio captures folder 32 | captures/ 33 | 34 | 35 | #Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio 36 | 37 | *.iml 38 | 39 | ## Directory-based project format: 40 | .idea/ 41 | # if you remove the above rule, at least ignore the following: 42 | 43 | # User-specific stuff: 44 | # .idea/workspace.xml 45 | # .idea/tasks.xml 46 | # .idea/dictionaries 47 | 48 | # Sensitive or high-churn files: 49 | # .idea/dataSources.ids 50 | # .idea/dataSources.xml 51 | # .idea/sqlDataSources.xml 52 | # .idea/dynamic.xml 53 | # .idea/uiDesigner.xml 54 | 55 | # Gradle: 56 | # .idea/gradle.xml 57 | # .idea/libraries 58 | 59 | # Mongo Explorer plugin: 60 | # .idea/mongoSettings.xml 61 | 62 | ## File-based project format: 63 | *.ipr 64 | *.iws 65 | 66 | ## Plugin-specific files: 67 | 68 | # IntelliJ 69 | /out/ 70 | 71 | # mpeltonen/sbt-idea plugin 72 | .idea_modules/ 73 | 74 | # JIRA plugin 75 | atlassian-ide-plugin.xml 76 | 77 | # Crashlytics plugin (for Android Studio and IntelliJ) 78 | com_crashlytics_export_strings.xml 79 | crashlytics.properties 80 | crashlytics-build.properties 81 | 82 | #keystore 83 | keystore/* 84 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SelectCardViewPrototype 2 | 3 | This is a sample Android app, 4 | you can easily download it from
Google Play:
5 | 6 | [Cardview Animator Sample](https://play.google.com/store/apps/details?hl=en-gb&id=com.application.sample.selectcardviewprototype.app) 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | jcenter() 4 | } 5 | dependencies { 6 | classpath 'com.android.tools.build:gradle:2.2.3' 7 | } 8 | } 9 | apply plugin: 'com.android.application' 10 | 11 | repositories { 12 | jcenter() 13 | } 14 | 15 | android { 16 | compileSdkVersion 25 17 | buildToolsVersion "25.0.2" 18 | 19 | defaultConfig { 20 | vectorDrawables.useSupportLibrary = true 21 | applicationId "com.application.sample.selectcardviewprototype.app" 22 | minSdkVersion 16 23 | targetSdkVersion 25 24 | versionCode 10 25 | versionName "1.0.10" 26 | } 27 | 28 | signingConfigs { 29 | debug { 30 | } 31 | 32 | release { 33 | } 34 | } 35 | 36 | buildTypes { 37 | release { 38 | minifyEnabled false 39 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 40 | signingConfig signingConfigs.release 41 | zipAlignEnabled true 42 | } 43 | } 44 | } 45 | 46 | dependencies { 47 | compile fileTree(dir: 'libs', include: ['*.jar']) 48 | compile 'com.android.support:appcompat-v7:25.1.0' 49 | compile 'com.android.support:cardview-v7:25.1.0' 50 | compile 'com.android.support:recyclerview-v7:25.1.0' 51 | compile 'com.android.support:design:25.1.0' 52 | compile 'com.jakewharton:butterknife:7.0.1' 53 | compile 'com.google.code.gson:gson:2.4' 54 | compile 'com.squareup.picasso:picasso:2.5.2' 55 | compile 'com.flurry.android:analytics:6.3.1' 56 | compile 'com.google.gms:google-services:3.0.0' 57 | compile 'com.google.firebase:firebase-ads:9.2.0' 58 | compile 'uk.co.chrisjenx:calligraphy:2.2.0' 59 | 60 | } 61 | -------------------------------------------------------------------------------- /app/manifest-merger-release-report.txt: -------------------------------------------------------------------------------- 1 | -- Merging decision tree log --- 2 | manifest 3 | ADDED from AndroidManifest.xml:2:1 4 | package 5 | ADDED from AndroidManifest.xml:3:5 6 | INJECTED from AndroidManifest.xml:0:0 7 | INJECTED from AndroidManifest.xml:0:0 8 | android:versionName 9 | INJECTED from AndroidManifest.xml:0:0 10 | INJECTED from AndroidManifest.xml:0:0 11 | xmlns:android 12 | ADDED from AndroidManifest.xml:2:11 13 | android:versionCode 14 | INJECTED from AndroidManifest.xml:0:0 15 | INJECTED from AndroidManifest.xml:0:0 16 | application 17 | ADDED from AndroidManifest.xml:5:5 18 | MERGED from com.android.support:appcompat-v7:23.1.0:22:5 19 | MERGED from com.android.support:support-v4:23.1.0:22:5 20 | MERGED from com.android.support:cardview-v7:23.1.0:22:5 21 | MERGED from com.android.support:support-v4:23.1.0:22:5 22 | MERGED from com.android.support:design:23.1.0:22:5 23 | MERGED from com.android.support:appcompat-v7:23.1.0:22:5 24 | MERGED from com.android.support:support-v4:23.1.0:22:5 25 | MERGED from com.android.support:support-v4:23.1.0:22:5 26 | MERGED from com.android.support:support-v4:23.1.0:22:5 27 | android:label 28 | ADDED from AndroidManifest.xml:8:9 29 | android:allowBackup 30 | ADDED from AndroidManifest.xml:6:9 31 | android:icon 32 | ADDED from AndroidManifest.xml:7:9 33 | android:theme 34 | ADDED from AndroidManifest.xml:9:9 35 | activity#com.application.sample.selectcardviewprototype.app.MainActivity 36 | ADDED from AndroidManifest.xml:10:9 37 | android:screenOrientation 38 | ADDED from AndroidManifest.xml:12:13 39 | android:label 40 | ADDED from AndroidManifest.xml:13:13 41 | android:name 42 | ADDED from AndroidManifest.xml:11:13 43 | intent-filter#android.intent.action.MAIN+android.intent.category.LAUNCHER 44 | ADDED from AndroidManifest.xml:14:13 45 | action#android.intent.action.MAIN 46 | ADDED from AndroidManifest.xml:15:17 47 | android:name 48 | ADDED from AndroidManifest.xml:15:25 49 | category#android.intent.category.LAUNCHER 50 | ADDED from AndroidManifest.xml:17:17 51 | android:name 52 | ADDED from AndroidManifest.xml:17:27 53 | uses-sdk 54 | INJECTED from AndroidManifest.xml:0:0 reason: use-sdk injection requested 55 | MERGED from com.android.support:appcompat-v7:23.1.0:20:5 56 | MERGED from com.android.support:support-v4:23.1.0:20:5 57 | MERGED from com.android.support:cardview-v7:23.1.0:20:5 58 | MERGED from com.android.support:recyclerview-v7:23.1.0:20:5 59 | MERGED from com.android.support:support-v4:23.1.0:20:5 60 | MERGED from com.android.support:design:23.1.0:20:5 61 | MERGED from com.android.support:appcompat-v7:23.1.0:20:5 62 | MERGED from com.android.support:support-v4:23.1.0:20:5 63 | MERGED from com.android.support:recyclerview-v7:23.1.0:20:5 64 | MERGED from com.android.support:support-v4:23.1.0:20:5 65 | MERGED from com.android.support:support-v4:23.1.0:20:5 66 | android:targetSdkVersion 67 | INJECTED from AndroidManifest.xml:0:0 68 | INJECTED from AndroidManifest.xml:0:0 69 | android:minSdkVersion 70 | INJECTED from AndroidManifest.xml:0:0 71 | INJECTED from AndroidManifest.xml:0:0 72 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /home/davide/opt/adt-bundle-linux/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/application/sample/selectcardviewprototype/app/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.application.sample.selectcardviewprototype.app; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 13 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /app/src/main/assets/data.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "gender":"female", 4 | "name":{ 5 | "title":"miss", 6 | "first":"mathilde", 7 | "last":"pedersen" 8 | }, 9 | "location":{ 10 | "street":"8922 tåstrupvej", 11 | "city":"haslev", 12 | "state":"midtjylland", 13 | "postcode":73234 14 | }, 15 | "email":"mathilde.pedersen@example.com", 16 | "phone":"18921995", 17 | "cell":"27651256", 18 | "picture":{ 19 | "large":"https://randomuser.me/api/portraits/women/76.jpg", 20 | "medium":"https://randomuser.me/api/portraits/med/women/76.jpg", 21 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/76.jpg" 22 | }, 23 | "nat":"DK", 24 | "id":0 25 | }, 26 | { 27 | "gender":"male", 28 | "name":{ 29 | "title":"mr", 30 | "first":"jorge", 31 | "last":"fuentes" 32 | }, 33 | "location":{ 34 | "street":"1457 calle de alcalá", 35 | "city":"torrevieja", 36 | "state":"comunidad valenciana", 37 | "postcode":51329 38 | }, 39 | "email":"jorge.fuentes@example.com", 40 | "phone":"989-573-996", 41 | "cell":"644-787-411", 42 | "picture":{ 43 | "large":"https://randomuser.me/api/portraits/men/86.jpg", 44 | "medium":"https://randomuser.me/api/portraits/med/men/86.jpg", 45 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/86.jpg" 46 | }, 47 | "nat":"ES", 48 | "id":1 49 | }, 50 | { 51 | "gender":"female", 52 | "name":{ 53 | "title":"madame", 54 | "first":"lana", 55 | "last":"da silva" 56 | }, 57 | "location":{ 58 | "street":"8606 rue abel-hovelacque", 59 | "city":"cully", 60 | "state":"thurgau", 61 | "postcode":7587 62 | }, 63 | "email":"lana.dasilva@example.com", 64 | "phone":"(050)-664-9238", 65 | "cell":"(718)-092-6454", 66 | "picture":{ 67 | "large":"https://randomuser.me/api/portraits/women/32.jpg", 68 | "medium":"https://randomuser.me/api/portraits/med/women/32.jpg", 69 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/32.jpg" 70 | }, 71 | "nat":"CH", 72 | "id":2 73 | }, 74 | { 75 | "gender":"male", 76 | "name":{ 77 | "title":"mr", 78 | "first":"murat", 79 | "last":"tekelioğlu" 80 | }, 81 | "location":{ 82 | "street":"5816 abanoz sk", 83 | "city":"bolu", 84 | "state":"sivas", 85 | "postcode":40458 86 | }, 87 | "email":"murat.tekelioğlu@example.com", 88 | "phone":"(774)-090-4098", 89 | "cell":"(801)-055-1623", 90 | "picture":{ 91 | "large":"https://randomuser.me/api/portraits/men/83.jpg", 92 | "medium":"https://randomuser.me/api/portraits/med/men/83.jpg", 93 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/83.jpg" 94 | }, 95 | "nat":"TR", 96 | "id":3 97 | }, 98 | { 99 | "gender":"male", 100 | "name":{ 101 | "title":"mr", 102 | "first":"علی رضا", 103 | "last":"کریمی" 104 | }, 105 | "location":{ 106 | "street":"8476 میدان شهیدان رحیمی", 107 | "city":"سنندج", 108 | "state":"سمنان", 109 | "postcode":11256 110 | }, 111 | "email":"علی رضا.کریمی@example.com", 112 | "phone":"089-56984861", 113 | "cell":"0964-047-6021", 114 | "picture":{ 115 | "large":"https://randomuser.me/api/portraits/men/39.jpg", 116 | "medium":"https://randomuser.me/api/portraits/med/men/39.jpg", 117 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/39.jpg" 118 | }, 119 | "nat":"IR", 120 | "id":4 121 | }, 122 | { 123 | "gender":"male", 124 | "name":{ 125 | "title":"mr", 126 | "first":"benedito", 127 | "last":"castro" 128 | }, 129 | "location":{ 130 | "street":"2441 rua três", 131 | "city":"governador valadares", 132 | "state":"roraima", 133 | "postcode":27988 134 | }, 135 | "email":"benedito.castro@example.com", 136 | "phone":"(55) 7170-7825", 137 | "cell":"(90) 3556-6279", 138 | "picture":{ 139 | "large":"https://randomuser.me/api/portraits/men/33.jpg", 140 | "medium":"https://randomuser.me/api/portraits/med/men/33.jpg", 141 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/33.jpg" 142 | }, 143 | "nat":"BR", 144 | "id":5 145 | }, 146 | { 147 | "gender":"male", 148 | "name":{ 149 | "title":"mr", 150 | "first":"eino", 151 | "last":"manni" 152 | }, 153 | "location":{ 154 | "street":"7129 rautatienkatu", 155 | "city":"nokia", 156 | "state":"central finland", 157 | "postcode":39829 158 | }, 159 | "email":"eino.manni@example.com", 160 | "phone":"07-600-668", 161 | "cell":"046-292-57-37", 162 | "picture":{ 163 | "large":"https://randomuser.me/api/portraits/men/6.jpg", 164 | "medium":"https://randomuser.me/api/portraits/med/men/6.jpg", 165 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/6.jpg" 166 | }, 167 | "nat":"FI", 168 | "id":6 169 | }, 170 | { 171 | "gender":"female", 172 | "name":{ 173 | "title":"mrs", 174 | "first":"malou", 175 | "last":"andersen" 176 | }, 177 | "location":{ 178 | "street":"6303 dalgårdsvej", 179 | "city":"århus c.", 180 | "state":"hovedstaden", 181 | "postcode":22410 182 | }, 183 | "email":"malou.andersen@example.com", 184 | "phone":"01406328", 185 | "cell":"00910332", 186 | "picture":{ 187 | "large":"https://randomuser.me/api/portraits/women/14.jpg", 188 | "medium":"https://randomuser.me/api/portraits/med/women/14.jpg", 189 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/14.jpg" 190 | }, 191 | "nat":"DK", 192 | "id":7 193 | }, 194 | { 195 | "gender":"male", 196 | "name":{ 197 | "title":"mr", 198 | "first":"hermes", 199 | "last":"carvalho" 200 | }, 201 | "location":{ 202 | "street":"2861 rua piauí ", 203 | "city":"rio de janeiro", 204 | "state":"rio de janeiro", 205 | "postcode":29000 206 | }, 207 | "email":"hermes.carvalho@example.com", 208 | "phone":"(89) 7809-0395", 209 | "cell":"(08) 8360-5571", 210 | "picture":{ 211 | "large":"https://randomuser.me/api/portraits/men/5.jpg", 212 | "medium":"https://randomuser.me/api/portraits/med/men/5.jpg", 213 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/5.jpg" 214 | }, 215 | "nat":"BR", 216 | "id":8 217 | }, 218 | { 219 | "gender":"female", 220 | "name":{ 221 | "title":"ms", 222 | "first":"lara", 223 | "last":"fischer" 224 | }, 225 | "location":{ 226 | "street":"2728 breslauer straße", 227 | "city":"eisenach", 228 | "state":"mecklenburg-vorpommern", 229 | "postcode":30657 230 | }, 231 | "email":"lara.fischer@example.com", 232 | "phone":"0246-8123144", 233 | "cell":"0173-9300026", 234 | "picture":{ 235 | "large":"https://randomuser.me/api/portraits/women/92.jpg", 236 | "medium":"https://randomuser.me/api/portraits/med/women/92.jpg", 237 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/92.jpg" 238 | }, 239 | "nat":"DE", 240 | "id":9 241 | }, 242 | { 243 | "gender":"male", 244 | "name":{ 245 | "title":"mr", 246 | "first":"nicklas", 247 | "last":"møller" 248 | }, 249 | "location":{ 250 | "street":"8943 humlevej", 251 | "city":"odense sv", 252 | "state":"sjælland", 253 | "postcode":75156 254 | }, 255 | "email":"nicklas.møller@example.com", 256 | "phone":"19652761", 257 | "cell":"74245684", 258 | "picture":{ 259 | "large":"https://randomuser.me/api/portraits/men/14.jpg", 260 | "medium":"https://randomuser.me/api/portraits/med/men/14.jpg", 261 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/14.jpg" 262 | }, 263 | "nat":"DK", 264 | "id":10 265 | }, 266 | { 267 | "gender":"female", 268 | "name":{ 269 | "title":"mrs", 270 | "first":"amanda", 271 | "last":"pulli" 272 | }, 273 | "location":{ 274 | "street":"5653 fredrikinkatu", 275 | "city":"muurame", 276 | "state":"ostrobothnia", 277 | "postcode":94804 278 | }, 279 | "email":"amanda.pulli@example.com", 280 | "phone":"02-937-979", 281 | "cell":"044-681-20-33", 282 | "picture":{ 283 | "large":"https://randomuser.me/api/portraits/women/12.jpg", 284 | "medium":"https://randomuser.me/api/portraits/med/women/12.jpg", 285 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/12.jpg" 286 | }, 287 | "nat":"FI", 288 | "id":11 289 | }, 290 | { 291 | "gender":"male", 292 | "name":{ 293 | "title":"mr", 294 | "first":"cody", 295 | "last":"neal" 296 | }, 297 | "location":{ 298 | "street":"187 james st", 299 | "city":"australian capital territory", 300 | "state":"queensland", 301 | "postcode":7247 302 | }, 303 | "email":"cody.neal@example.com", 304 | "phone":"05-2615-2425", 305 | "cell":"0447-388-861", 306 | "picture":{ 307 | "large":"https://randomuser.me/api/portraits/men/94.jpg", 308 | "medium":"https://randomuser.me/api/portraits/med/men/94.jpg", 309 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/94.jpg" 310 | }, 311 | "nat":"AU", 312 | "id":12 313 | }, 314 | { 315 | "gender":"male", 316 | "name":{ 317 | "title":"mr", 318 | "first":"bastian", 319 | "last":"brinkmann" 320 | }, 321 | "location":{ 322 | "street":"5325 feldstraße", 323 | "city":"nordvorpommern", 324 | "state":"berlin", 325 | "postcode":20921 326 | }, 327 | "email":"bastian.brinkmann@example.com", 328 | "phone":"0215-4512047", 329 | "cell":"0178-1923872", 330 | "picture":{ 331 | "large":"https://randomuser.me/api/portraits/men/68.jpg", 332 | "medium":"https://randomuser.me/api/portraits/med/men/68.jpg", 333 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/68.jpg" 334 | }, 335 | "nat":"DE", 336 | "id":13 337 | }, 338 | { 339 | "gender":"male", 340 | "name":{ 341 | "title":"mr", 342 | "first":"emile", 343 | "last":"boyer" 344 | }, 345 | "location":{ 346 | "street":"7583 rue jean-baldassini", 347 | "city":"pau", 348 | "state":"ille-et-vilaine", 349 | "postcode":63068 350 | }, 351 | "email":"emile.boyer@example.com", 352 | "phone":"03-11-62-35-27", 353 | "cell":"06-57-88-93-14", 354 | "picture":{ 355 | "large":"https://randomuser.me/api/portraits/men/95.jpg", 356 | "medium":"https://randomuser.me/api/portraits/med/men/95.jpg", 357 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/95.jpg" 358 | }, 359 | "nat":"FR", 360 | "id":14 361 | }, 362 | { 363 | "gender":"male", 364 | "name":{ 365 | "title":"mr", 366 | "first":"necati", 367 | "last":"kavaklıoğlu" 368 | }, 369 | "location":{ 370 | "street":"5299 abanoz sk", 371 | "city":"karabük", 372 | "state":"mardin", 373 | "postcode":17745 374 | }, 375 | "email":"necati.kavaklıoğlu@example.com", 376 | "phone":"(642)-328-9782", 377 | "cell":"(945)-411-9640", 378 | "picture":{ 379 | "large":"https://randomuser.me/api/portraits/men/92.jpg", 380 | "medium":"https://randomuser.me/api/portraits/med/men/92.jpg", 381 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/92.jpg" 382 | }, 383 | "nat":"TR", 384 | "id":15 385 | }, 386 | { 387 | "gender":"male", 388 | "name":{ 389 | "title":"mr", 390 | "first":"nathaniel", 391 | "last":"edwards" 392 | }, 393 | "location":{ 394 | "street":"1658 customs street", 395 | "city":"lower hutt", 396 | "state":"auckland", 397 | "postcode":42645 398 | }, 399 | "email":"nathaniel.edwards@example.com", 400 | "phone":"(785)-951-6861", 401 | "cell":"(087)-362-2125", 402 | "picture":{ 403 | "large":"https://randomuser.me/api/portraits/men/68.jpg", 404 | "medium":"https://randomuser.me/api/portraits/med/men/68.jpg", 405 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/68.jpg" 406 | }, 407 | "nat":"NZ", 408 | "id":16 409 | }, 410 | { 411 | "gender":"male", 412 | "name":{ 413 | "title":"mr", 414 | "first":"everett", 415 | "last":"warren" 416 | }, 417 | "location":{ 418 | "street":"3082 edwards rd", 419 | "city":"wichita", 420 | "state":"new mexico", 421 | "postcode":99330 422 | }, 423 | "email":"everett.warren@example.com", 424 | "phone":"(093)-845-1007", 425 | "cell":"(103)-640-1145", 426 | "picture":{ 427 | "large":"https://randomuser.me/api/portraits/men/2.jpg", 428 | "medium":"https://randomuser.me/api/portraits/med/men/2.jpg", 429 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/2.jpg" 430 | }, 431 | "nat":"US", 432 | "id":17 433 | }, 434 | { 435 | "gender":"female", 436 | "name":{ 437 | "title":"mrs", 438 | "first":"pinja", 439 | "last":"lehtonen" 440 | }, 441 | "location":{ 442 | "street":"1571 visiokatu", 443 | "city":"imatra", 444 | "state":"southern ostrobothnia", 445 | "postcode":61955 446 | }, 447 | "email":"pinja.lehtonen@example.com", 448 | "phone":"07-181-673", 449 | "cell":"048-486-80-28", 450 | "picture":{ 451 | "large":"https://randomuser.me/api/portraits/women/73.jpg", 452 | "medium":"https://randomuser.me/api/portraits/med/women/73.jpg", 453 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/73.jpg" 454 | }, 455 | "nat":"FI", 456 | "id":18 457 | }, 458 | { 459 | "gender":"female", 460 | "name":{ 461 | "title":"miss", 462 | "first":"tilde", 463 | "last":"johansen" 464 | }, 465 | "location":{ 466 | "street":"9497 morelvej", 467 | "city":"roskilde", 468 | "state":"syddanmark", 469 | "postcode":33026 470 | }, 471 | "email":"tilde.johansen@example.com", 472 | "phone":"14067420", 473 | "cell":"11678579", 474 | "picture":{ 475 | "large":"https://randomuser.me/api/portraits/women/59.jpg", 476 | "medium":"https://randomuser.me/api/portraits/med/women/59.jpg", 477 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/59.jpg" 478 | }, 479 | "nat":"DK", 480 | "id":19 481 | }, 482 | { 483 | "gender":"male", 484 | "name":{ 485 | "title":"mr", 486 | "first":"friedrich", 487 | "last":"baum" 488 | }, 489 | "location":{ 490 | "street":"1472 neue straße", 491 | "city":"bremen", 492 | "state":"sachsen", 493 | "postcode":65157 494 | }, 495 | "email":"friedrich.baum@example.com", 496 | "phone":"0750-7834089", 497 | "cell":"0175-3419466", 498 | "picture":{ 499 | "large":"https://randomuser.me/api/portraits/men/33.jpg", 500 | "medium":"https://randomuser.me/api/portraits/med/men/33.jpg", 501 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/33.jpg" 502 | }, 503 | "nat":"DE", 504 | "id":20 505 | }, 506 | { 507 | "gender":"male", 508 | "name":{ 509 | "title":"monsieur", 510 | "first":"liam", 511 | "last":"guerin" 512 | }, 513 | "location":{ 514 | "street":"4168 rue du 8 mai 1945", 515 | "city":"les cullayes", 516 | "state":"basel-stadt", 517 | "postcode":1381 518 | }, 519 | "email":"liam.guerin@example.com", 520 | "phone":"(034)-419-6922", 521 | "cell":"(071)-373-4287", 522 | "picture":{ 523 | "large":"https://randomuser.me/api/portraits/men/7.jpg", 524 | "medium":"https://randomuser.me/api/portraits/med/men/7.jpg", 525 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/7.jpg" 526 | }, 527 | "nat":"CH", 528 | "id":21 529 | }, 530 | { 531 | "gender":"male", 532 | "name":{ 533 | "title":"mr", 534 | "first":"xavier", 535 | "last":"johnson" 536 | }, 537 | "location":{ 538 | "street":"4494 main street west", 539 | "city":"upper hutt", 540 | "state":"canterbury", 541 | "postcode":85012 542 | }, 543 | "email":"xavier.johnson@example.com", 544 | "phone":"(866)-964-8643", 545 | "cell":"(756)-298-1361", 546 | "picture":{ 547 | "large":"https://randomuser.me/api/portraits/men/26.jpg", 548 | "medium":"https://randomuser.me/api/portraits/med/men/26.jpg", 549 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/26.jpg" 550 | }, 551 | "nat":"NZ", 552 | "id":22 553 | }, 554 | { 555 | "gender":"female", 556 | "name":{ 557 | "title":"miss", 558 | "first":"jane", 559 | "last":"da paz" 560 | }, 561 | "location":{ 562 | "street":"3047 rua são luiz ", 563 | "city":"ribeirão pires", 564 | "state":"mato grosso", 565 | "postcode":17096 566 | }, 567 | "email":"jane.dapaz@example.com", 568 | "phone":"(73) 7237-1932", 569 | "cell":"(60) 2347-0773", 570 | "picture":{ 571 | "large":"https://randomuser.me/api/portraits/women/91.jpg", 572 | "medium":"https://randomuser.me/api/portraits/med/women/91.jpg", 573 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/91.jpg" 574 | }, 575 | "nat":"BR", 576 | "id":23 577 | }, 578 | { 579 | "gender":"female", 580 | "name":{ 581 | "title":"mrs", 582 | "first":"lea", 583 | "last":"rasmussen" 584 | }, 585 | "location":{ 586 | "street":"1714 græsvangen", 587 | "city":"askeby", 588 | "state":"sjælland", 589 | "postcode":38123 590 | }, 591 | "email":"lea.rasmussen@example.com", 592 | "phone":"18344826", 593 | "cell":"25225520", 594 | "picture":{ 595 | "large":"https://randomuser.me/api/portraits/women/2.jpg", 596 | "medium":"https://randomuser.me/api/portraits/med/women/2.jpg", 597 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/2.jpg" 598 | }, 599 | "nat":"DK", 600 | "id":24 601 | }, 602 | { 603 | "gender":"female", 604 | "name":{ 605 | "title":"ms", 606 | "first":"jessika", 607 | "last":"kunze" 608 | }, 609 | "location":{ 610 | "street":"5479 berliner straße", 611 | "city":"weimar", 612 | "state":"baden-württemberg", 613 | "postcode":50073 614 | }, 615 | "email":"jessika.kunze@example.com", 616 | "phone":"0227-2715432", 617 | "cell":"0174-6587617", 618 | "picture":{ 619 | "large":"https://randomuser.me/api/portraits/women/48.jpg", 620 | "medium":"https://randomuser.me/api/portraits/med/women/48.jpg", 621 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/48.jpg" 622 | }, 623 | "nat":"DE", 624 | "id":25 625 | }, 626 | { 627 | "gender":"male", 628 | "name":{ 629 | "title":"mr", 630 | "first":"nathaniel", 631 | "last":"gregory" 632 | }, 633 | "location":{ 634 | "street":"2420 locust rd", 635 | "city":"frisco", 636 | "state":"wyoming", 637 | "postcode":40886 638 | }, 639 | "email":"nathaniel.gregory@example.com", 640 | "phone":"(931)-125-3545", 641 | "cell":"(085)-474-5537", 642 | "picture":{ 643 | "large":"https://randomuser.me/api/portraits/men/41.jpg", 644 | "medium":"https://randomuser.me/api/portraits/med/men/41.jpg", 645 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/41.jpg" 646 | }, 647 | "nat":"US", 648 | "id":26 649 | }, 650 | { 651 | "gender":"female", 652 | "name":{ 653 | "title":"mrs", 654 | "first":"johanna", 655 | "last":"ackermann" 656 | }, 657 | "location":{ 658 | "street":"1025 kastanienweg", 659 | "city":"alzey-worms", 660 | "state":"bremen", 661 | "postcode":39064 662 | }, 663 | "email":"johanna.ackermann@example.com", 664 | "phone":"0849-4777783", 665 | "cell":"0175-9133267", 666 | "picture":{ 667 | "large":"https://randomuser.me/api/portraits/women/50.jpg", 668 | "medium":"https://randomuser.me/api/portraits/med/women/50.jpg", 669 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/50.jpg" 670 | }, 671 | "nat":"DE", 672 | "id":27 673 | }, 674 | { 675 | "gender":"male", 676 | "name":{ 677 | "title":"mr", 678 | "first":"kes", 679 | "last":"louwerse" 680 | }, 681 | "location":{ 682 | "street":"8730 willem van noortplein", 683 | "city":"hardenberg", 684 | "state":"noord-holland", 685 | "postcode":39567 686 | }, 687 | "email":"kes.louwerse@example.com", 688 | "phone":"(264)-709-5901", 689 | "cell":"(976)-095-2418", 690 | "picture":{ 691 | "large":"https://randomuser.me/api/portraits/men/98.jpg", 692 | "medium":"https://randomuser.me/api/portraits/med/men/98.jpg", 693 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/98.jpg" 694 | }, 695 | "nat":"NL", 696 | "id":28 697 | }, 698 | { 699 | "gender":"male", 700 | "name":{ 701 | "title":"mr", 702 | "first":"guy", 703 | "last":"bowman" 704 | }, 705 | "location":{ 706 | "street":"9395 church road", 707 | "city":"peterborough", 708 | "state":"highlands and islands", 709 | "postcode":"GS1 5GY" 710 | }, 711 | "email":"guy.bowman@example.com", 712 | "phone":"01038 08294", 713 | "cell":"0753-148-918", 714 | "picture":{ 715 | "large":"https://randomuser.me/api/portraits/men/53.jpg", 716 | "medium":"https://randomuser.me/api/portraits/med/men/53.jpg", 717 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/53.jpg" 718 | }, 719 | "nat":"GB", 720 | "id":29 721 | }, 722 | { 723 | "gender":"male", 724 | "name":{ 725 | "title":"mr", 726 | "first":"seth", 727 | "last":"pierce" 728 | }, 729 | "location":{ 730 | "street":"9022 jones road", 731 | "city":"ratoath", 732 | "state":"alabama", 733 | "postcode":71949 734 | }, 735 | "email":"seth.pierce@example.com", 736 | "phone":"031-241-7378", 737 | "cell":"081-531-2831", 738 | "picture":{ 739 | "large":"https://randomuser.me/api/portraits/men/43.jpg", 740 | "medium":"https://randomuser.me/api/portraits/med/men/43.jpg", 741 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/43.jpg" 742 | }, 743 | "nat":"IE", 744 | "id":30 745 | }, 746 | { 747 | "gender":"male", 748 | "name":{ 749 | "title":"mr", 750 | "first":"leonard", 751 | "last":"siebert" 752 | }, 753 | "location":{ 754 | "street":"5438 goethestraße", 755 | "city":"oberhausen", 756 | "state":"thüringen", 757 | "postcode":14563 758 | }, 759 | "email":"leonard.siebert@example.com", 760 | "phone":"0462-3691558", 761 | "cell":"0171-5448677", 762 | "picture":{ 763 | "large":"https://randomuser.me/api/portraits/men/70.jpg", 764 | "medium":"https://randomuser.me/api/portraits/med/men/70.jpg", 765 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/70.jpg" 766 | }, 767 | "nat":"DE", 768 | "id":31 769 | }, 770 | { 771 | "gender":"male", 772 | "name":{ 773 | "title":"mr", 774 | "first":"fatih", 775 | "last":"alpuğan" 776 | }, 777 | "location":{ 778 | "street":"6635 bağdat cd", 779 | "city":"kahramanmaraş", 780 | "state":"iğdır", 781 | "postcode":72349 782 | }, 783 | "email":"fatih.alpuğan@example.com", 784 | "phone":"(848)-401-2950", 785 | "cell":"(548)-374-9925", 786 | "picture":{ 787 | "large":"https://randomuser.me/api/portraits/men/28.jpg", 788 | "medium":"https://randomuser.me/api/portraits/med/men/28.jpg", 789 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/28.jpg" 790 | }, 791 | "nat":"TR", 792 | "id":32 793 | }, 794 | { 795 | "gender":"male", 796 | "name":{ 797 | "title":"mr", 798 | "first":"hector", 799 | "last":"marquez" 800 | }, 801 | "location":{ 802 | "street":"1167 calle de la luna", 803 | "city":"gandía", 804 | "state":"país vasco", 805 | "postcode":52769 806 | }, 807 | "email":"hector.marquez@example.com", 808 | "phone":"967-185-959", 809 | "cell":"645-449-938", 810 | "picture":{ 811 | "large":"https://randomuser.me/api/portraits/men/6.jpg", 812 | "medium":"https://randomuser.me/api/portraits/med/men/6.jpg", 813 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/6.jpg" 814 | }, 815 | "nat":"ES", 816 | "id":33 817 | }, 818 | { 819 | "gender":"male", 820 | "name":{ 821 | "title":"mr", 822 | "first":"اميرعلي", 823 | "last":"كامياران" 824 | }, 825 | "location":{ 826 | "street":"2732 میدان صادقیه", 827 | "city":"بیرجند", 828 | "state":"خراسان جنوبی", 829 | "postcode":86138 830 | }, 831 | "email":"اميرعلي.كامياران@example.com", 832 | "phone":"007-09481982", 833 | "cell":"0940-467-8194", 834 | "picture":{ 835 | "large":"https://randomuser.me/api/portraits/men/57.jpg", 836 | "medium":"https://randomuser.me/api/portraits/med/men/57.jpg", 837 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/57.jpg" 838 | }, 839 | "nat":"IR", 840 | "id":34 841 | }, 842 | { 843 | "gender":"male", 844 | "name":{ 845 | "title":"mr", 846 | "first":"kuzey", 847 | "last":"balaban" 848 | }, 849 | "location":{ 850 | "street":"9015 anafartalar cd", 851 | "city":"gaziantep", 852 | "state":"denizli", 853 | "postcode":43419 854 | }, 855 | "email":"kuzey.balaban@example.com", 856 | "phone":"(913)-741-2955", 857 | "cell":"(693)-830-6504", 858 | "picture":{ 859 | "large":"https://randomuser.me/api/portraits/men/63.jpg", 860 | "medium":"https://randomuser.me/api/portraits/med/men/63.jpg", 861 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/63.jpg" 862 | }, 863 | "nat":"TR", 864 | "id":35 865 | }, 866 | { 867 | "gender":"female", 868 | "name":{ 869 | "title":"mrs", 870 | "first":"lilou", 871 | "last":"meunier" 872 | }, 873 | "location":{ 874 | "street":"6338 place du 8 novembre 1942", 875 | "city":"vitry-sur-seine", 876 | "state":"martinique", 877 | "postcode":79392 878 | }, 879 | "email":"lilou.meunier@example.com", 880 | "phone":"05-88-33-43-48", 881 | "cell":"06-67-66-76-25", 882 | "picture":{ 883 | "large":"https://randomuser.me/api/portraits/women/15.jpg", 884 | "medium":"https://randomuser.me/api/portraits/med/women/15.jpg", 885 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/15.jpg" 886 | }, 887 | "nat":"FR", 888 | "id":36 889 | }, 890 | { 891 | "gender":"female", 892 | "name":{ 893 | "title":"mrs", 894 | "first":"aurélia", 895 | "last":"rodrigues" 896 | }, 897 | "location":{ 898 | "street":"8440 rua rui barbosa ", 899 | "city":"ubá", 900 | "state":"bahia", 901 | "postcode":22321 902 | }, 903 | "email":"aurélia.rodrigues@example.com", 904 | "phone":"(10) 8814-9381", 905 | "cell":"(58) 1329-8252", 906 | "picture":{ 907 | "large":"https://randomuser.me/api/portraits/women/85.jpg", 908 | "medium":"https://randomuser.me/api/portraits/med/women/85.jpg", 909 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/85.jpg" 910 | }, 911 | "nat":"BR", 912 | "id":37 913 | }, 914 | { 915 | "gender":"male", 916 | "name":{ 917 | "title":"mr", 918 | "first":"nathan", 919 | "last":"blanchard" 920 | }, 921 | "location":{ 922 | "street":"6766 rue du cardinal-gerlier", 923 | "city":"aix-en-provence", 924 | "state":"vaucluse", 925 | "postcode":70588 926 | }, 927 | "email":"nathan.blanchard@example.com", 928 | "phone":"05-45-79-46-65", 929 | "cell":"06-69-38-72-36", 930 | "picture":{ 931 | "large":"https://randomuser.me/api/portraits/men/42.jpg", 932 | "medium":"https://randomuser.me/api/portraits/med/men/42.jpg", 933 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/42.jpg" 934 | }, 935 | "nat":"FR", 936 | "id":38 937 | }, 938 | { 939 | "gender":"male", 940 | "name":{ 941 | "title":"monsieur", 942 | "first":"kaïs", 943 | "last":"lemaire" 944 | }, 945 | "location":{ 946 | "street":"1785 rue de l'abbé-patureau", 947 | "city":"montpreveyres", 948 | "state":"glarus", 949 | "postcode":5584 950 | }, 951 | "email":"kaïs.lemaire@example.com", 952 | "phone":"(377)-253-6755", 953 | "cell":"(833)-800-6841", 954 | "picture":{ 955 | "large":"https://randomuser.me/api/portraits/men/79.jpg", 956 | "medium":"https://randomuser.me/api/portraits/med/men/79.jpg", 957 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/79.jpg" 958 | }, 959 | "nat":"CH", 960 | "id":39 961 | }, 962 | { 963 | "gender":"male", 964 | "name":{ 965 | "title":"mr", 966 | "first":"eli", 967 | "last":"morris" 968 | }, 969 | "location":{ 970 | "street":"1688 albany expressway", 971 | "city":"dunedin", 972 | "state":"otago", 973 | "postcode":60387 974 | }, 975 | "email":"eli.morris@example.com", 976 | "phone":"(195)-381-0114", 977 | "cell":"(562)-576-9387", 978 | "picture":{ 979 | "large":"https://randomuser.me/api/portraits/men/55.jpg", 980 | "medium":"https://randomuser.me/api/portraits/med/men/55.jpg", 981 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/55.jpg" 982 | }, 983 | "nat":"NZ", 984 | "id":40 985 | }, 986 | { 987 | "gender":"male", 988 | "name":{ 989 | "title":"mr", 990 | "first":"ethan", 991 | "last":"grewal" 992 | }, 993 | "location":{ 994 | "street":"7315 peel st", 995 | "city":"delta", 996 | "state":"alberta", 997 | "postcode":10207 998 | }, 999 | "email":"ethan.grewal@example.com", 1000 | "phone":"494-135-2273", 1001 | "cell":"906-958-3258", 1002 | "picture":{ 1003 | "large":"https://randomuser.me/api/portraits/men/11.jpg", 1004 | "medium":"https://randomuser.me/api/portraits/med/men/11.jpg", 1005 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/11.jpg" 1006 | }, 1007 | "nat":"CA", 1008 | "id":41 1009 | }, 1010 | { 1011 | "gender":"male", 1012 | "name":{ 1013 | "title":"mr", 1014 | "first":"troy", 1015 | "last":"gonzales" 1016 | }, 1017 | "location":{ 1018 | "street":"2997 fincher rd", 1019 | "city":"brownsville", 1020 | "state":"nebraska", 1021 | "postcode":50481 1022 | }, 1023 | "email":"troy.gonzales@example.com", 1024 | "phone":"(072)-500-8047", 1025 | "cell":"(544)-142-2322", 1026 | "picture":{ 1027 | "large":"https://randomuser.me/api/portraits/men/5.jpg", 1028 | "medium":"https://randomuser.me/api/portraits/med/men/5.jpg", 1029 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/5.jpg" 1030 | }, 1031 | "nat":"US", 1032 | "id":42 1033 | }, 1034 | { 1035 | "gender":"male", 1036 | "name":{ 1037 | "title":"mr", 1038 | "first":"alexander", 1039 | "last":"davies" 1040 | }, 1041 | "location":{ 1042 | "street":"3379 highfield road", 1043 | "city":"leeds", 1044 | "state":"humberside", 1045 | "postcode":"XW0L 6QU" 1046 | }, 1047 | "email":"alexander.davies@example.com", 1048 | "phone":"013873 66623", 1049 | "cell":"0783-501-702", 1050 | "picture":{ 1051 | "large":"https://randomuser.me/api/portraits/men/21.jpg", 1052 | "medium":"https://randomuser.me/api/portraits/med/men/21.jpg", 1053 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/21.jpg" 1054 | }, 1055 | "nat":"GB", 1056 | "id":43 1057 | }, 1058 | { 1059 | "gender":"female", 1060 | "name":{ 1061 | "title":"miss", 1062 | "first":"addison", 1063 | "last":"reynolds" 1064 | }, 1065 | "location":{ 1066 | "street":"7945 hickory creek dr", 1067 | "city":"cairns", 1068 | "state":"western australia", 1069 | "postcode":2801 1070 | }, 1071 | "email":"addison.reynolds@example.com", 1072 | "phone":"04-7956-7254", 1073 | "cell":"0445-326-432", 1074 | "picture":{ 1075 | "large":"https://randomuser.me/api/portraits/women/24.jpg", 1076 | "medium":"https://randomuser.me/api/portraits/med/women/24.jpg", 1077 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/24.jpg" 1078 | }, 1079 | "nat":"AU", 1080 | "id":44 1081 | }, 1082 | { 1083 | "gender":"female", 1084 | "name":{ 1085 | "title":"miss", 1086 | "first":"julia", 1087 | "last":"schön" 1088 | }, 1089 | "location":{ 1090 | "street":"1422 fliederweg", 1091 | "city":"coesfeld", 1092 | "state":"nordrhein-westfalen", 1093 | "postcode":41011 1094 | }, 1095 | "email":"julia.schön@example.com", 1096 | "phone":"0715-7777790", 1097 | "cell":"0174-2098851", 1098 | "picture":{ 1099 | "large":"https://randomuser.me/api/portraits/women/81.jpg", 1100 | "medium":"https://randomuser.me/api/portraits/med/women/81.jpg", 1101 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/81.jpg" 1102 | }, 1103 | "nat":"DE", 1104 | "id":45 1105 | }, 1106 | { 1107 | "gender":"female", 1108 | "name":{ 1109 | "title":"mrs", 1110 | "first":"tietje", 1111 | "last":"spanjer" 1112 | }, 1113 | "location":{ 1114 | "street":"6393 lijnmarkt", 1115 | "city":"gennep", 1116 | "state":"utrecht", 1117 | "postcode":81547 1118 | }, 1119 | "email":"tietje.spanjer@example.com", 1120 | "phone":"(313)-340-0912", 1121 | "cell":"(420)-480-2403", 1122 | "picture":{ 1123 | "large":"https://randomuser.me/api/portraits/women/53.jpg", 1124 | "medium":"https://randomuser.me/api/portraits/med/women/53.jpg", 1125 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/53.jpg" 1126 | }, 1127 | "nat":"NL", 1128 | "id":46 1129 | }, 1130 | { 1131 | "gender":"male", 1132 | "name":{ 1133 | "title":"mr", 1134 | "first":"primo", 1135 | "last":"melo" 1136 | }, 1137 | "location":{ 1138 | "street":"8974 rua são joão ", 1139 | "city":"guarapuava", 1140 | "state":"santa catarina", 1141 | "postcode":90625 1142 | }, 1143 | "email":"primo.melo@example.com", 1144 | "phone":"(87) 9637-8219", 1145 | "cell":"(14) 3386-0157", 1146 | "picture":{ 1147 | "large":"https://randomuser.me/api/portraits/men/84.jpg", 1148 | "medium":"https://randomuser.me/api/portraits/med/men/84.jpg", 1149 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/84.jpg" 1150 | }, 1151 | "nat":"BR", 1152 | "id":47 1153 | }, 1154 | { 1155 | "gender":"male", 1156 | "name":{ 1157 | "title":"mr", 1158 | "first":"mahé", 1159 | "last":"marchand" 1160 | }, 1161 | "location":{ 1162 | "street":"4336 rue dugas-montbel", 1163 | "city":"aubervilliers", 1164 | "state":"martinique", 1165 | "postcode":15126 1166 | }, 1167 | "email":"mahé.marchand@example.com", 1168 | "phone":"04-19-96-73-93", 1169 | "cell":"06-49-56-91-32", 1170 | "picture":{ 1171 | "large":"https://randomuser.me/api/portraits/men/60.jpg", 1172 | "medium":"https://randomuser.me/api/portraits/med/men/60.jpg", 1173 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/60.jpg" 1174 | }, 1175 | "nat":"FR", 1176 | "id":48 1177 | }, 1178 | { 1179 | "gender":"male", 1180 | "name":{ 1181 | "title":"monsieur", 1182 | "first":"tony", 1183 | "last":"thomas" 1184 | }, 1185 | "location":{ 1186 | "street":"2621 rue abel", 1187 | "city":"villars-sous-yens", 1188 | "state":"schwyz", 1189 | "postcode":7416 1190 | }, 1191 | "email":"tony.thomas@example.com", 1192 | "phone":"(062)-017-6927", 1193 | "cell":"(501)-016-1891", 1194 | "picture":{ 1195 | "large":"https://randomuser.me/api/portraits/men/45.jpg", 1196 | "medium":"https://randomuser.me/api/portraits/med/men/45.jpg", 1197 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/45.jpg" 1198 | }, 1199 | "nat":"CH", 1200 | "id":49 1201 | }, 1202 | { 1203 | "gender":"female", 1204 | "name":{ 1205 | "title":"mrs", 1206 | "first":"lascívia", 1207 | "last":"lopes" 1208 | }, 1209 | "location":{ 1210 | "street":"5841 rua mato grosso ", 1211 | "city":"queimados", 1212 | "state":"rondônia", 1213 | "postcode":12048 1214 | }, 1215 | "email":"lascívia.lopes@example.com", 1216 | "phone":"(48) 1041-5446", 1217 | "cell":"(83) 4442-4022", 1218 | "picture":{ 1219 | "large":"https://randomuser.me/api/portraits/women/63.jpg", 1220 | "medium":"https://randomuser.me/api/portraits/med/women/63.jpg", 1221 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/63.jpg" 1222 | }, 1223 | "nat":"BR", 1224 | "id":50 1225 | }, 1226 | { 1227 | "gender":"female", 1228 | "name":{ 1229 | "title":"mrs", 1230 | "first":"tatiana", 1231 | "last":"pires" 1232 | }, 1233 | "location":{ 1234 | "street":"7688 avenida vinícius de morais", 1235 | "city":"betim", 1236 | "state":"rio grande do norte", 1237 | "postcode":69899 1238 | }, 1239 | "email":"tatiana.pires@example.com", 1240 | "phone":"(68) 4917-6875", 1241 | "cell":"(58) 5271-9616", 1242 | "picture":{ 1243 | "large":"https://randomuser.me/api/portraits/women/59.jpg", 1244 | "medium":"https://randomuser.me/api/portraits/med/women/59.jpg", 1245 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/59.jpg" 1246 | }, 1247 | "nat":"BR", 1248 | "id":51 1249 | }, 1250 | { 1251 | "gender":"female", 1252 | "name":{ 1253 | "title":"mrs", 1254 | "first":"lori", 1255 | "last":"hazebroek" 1256 | }, 1257 | "location":{ 1258 | "street":"9490 nicolaasweg", 1259 | "city":"zoeterwoude", 1260 | "state":"gelderland", 1261 | "postcode":14425 1262 | }, 1263 | "email":"lori.hazebroek@example.com", 1264 | "phone":"(084)-836-4054", 1265 | "cell":"(164)-650-3099", 1266 | "picture":{ 1267 | "large":"https://randomuser.me/api/portraits/women/42.jpg", 1268 | "medium":"https://randomuser.me/api/portraits/med/women/42.jpg", 1269 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/42.jpg" 1270 | }, 1271 | "nat":"NL", 1272 | "id":52 1273 | }, 1274 | { 1275 | "gender":"female", 1276 | "name":{ 1277 | "title":"mrs", 1278 | "first":"wilma", 1279 | "last":"schulte" 1280 | }, 1281 | "location":{ 1282 | "street":"2345 im winkel", 1283 | "city":"traunstein", 1284 | "state":"berlin", 1285 | "postcode":88946 1286 | }, 1287 | "email":"wilma.schulte@example.com", 1288 | "phone":"0516-0038832", 1289 | "cell":"0179-4603606", 1290 | "picture":{ 1291 | "large":"https://randomuser.me/api/portraits/women/78.jpg", 1292 | "medium":"https://randomuser.me/api/portraits/med/women/78.jpg", 1293 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/78.jpg" 1294 | }, 1295 | "nat":"DE", 1296 | "id":53 1297 | }, 1298 | { 1299 | "gender":"female", 1300 | "name":{ 1301 | "title":"ms", 1302 | "first":"debbie", 1303 | "last":"hoffman" 1304 | }, 1305 | "location":{ 1306 | "street":"5684 church street", 1307 | "city":"newcastle upon tyne", 1308 | "state":"derbyshire", 1309 | "postcode":"U8 4DN" 1310 | }, 1311 | "email":"debbie.hoffman@example.com", 1312 | "phone":"017683 79894", 1313 | "cell":"0739-987-728", 1314 | "picture":{ 1315 | "large":"https://randomuser.me/api/portraits/women/18.jpg", 1316 | "medium":"https://randomuser.me/api/portraits/med/women/18.jpg", 1317 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/18.jpg" 1318 | }, 1319 | "nat":"GB", 1320 | "id":54 1321 | }, 1322 | { 1323 | "gender":"female", 1324 | "name":{ 1325 | "title":"mrs", 1326 | "first":"lillian", 1327 | "last":"thomas" 1328 | }, 1329 | "location":{ 1330 | "street":"6368 oak lawn ave", 1331 | "city":"launceston", 1332 | "state":"victoria", 1333 | "postcode":265 1334 | }, 1335 | "email":"lillian.thomas@example.com", 1336 | "phone":"00-1508-2014", 1337 | "cell":"0420-091-373", 1338 | "picture":{ 1339 | "large":"https://randomuser.me/api/portraits/women/12.jpg", 1340 | "medium":"https://randomuser.me/api/portraits/med/women/12.jpg", 1341 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/12.jpg" 1342 | }, 1343 | "nat":"AU", 1344 | "id":55 1345 | }, 1346 | { 1347 | "gender":"male", 1348 | "name":{ 1349 | "title":"monsieur", 1350 | "first":"tony", 1351 | "last":"gautier" 1352 | }, 1353 | "location":{ 1354 | "street":"9424 avenue debrousse", 1355 | "city":"boulens", 1356 | "state":"aargau", 1357 | "postcode":9944 1358 | }, 1359 | "email":"tony.gautier@example.com", 1360 | "phone":"(297)-352-1069", 1361 | "cell":"(521)-439-5843", 1362 | "picture":{ 1363 | "large":"https://randomuser.me/api/portraits/men/42.jpg", 1364 | "medium":"https://randomuser.me/api/portraits/med/men/42.jpg", 1365 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/42.jpg" 1366 | }, 1367 | "nat":"CH", 1368 | "id":56 1369 | }, 1370 | { 1371 | "gender":"female", 1372 | "name":{ 1373 | "title":"mrs", 1374 | "first":"christy", 1375 | "last":"stone" 1376 | }, 1377 | "location":{ 1378 | "street":"3663 w campbell ave", 1379 | "city":"hobart", 1380 | "state":"australian capital territory", 1381 | "postcode":897 1382 | }, 1383 | "email":"christy.stone@example.com", 1384 | "phone":"07-1252-5627", 1385 | "cell":"0420-104-710", 1386 | "picture":{ 1387 | "large":"https://randomuser.me/api/portraits/women/16.jpg", 1388 | "medium":"https://randomuser.me/api/portraits/med/women/16.jpg", 1389 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/16.jpg" 1390 | }, 1391 | "nat":"AU", 1392 | "id":57 1393 | }, 1394 | { 1395 | "gender":"female", 1396 | "name":{ 1397 | "title":"mrs", 1398 | "first":"judith", 1399 | "last":"henderson" 1400 | }, 1401 | "location":{ 1402 | "street":"2893 high street", 1403 | "city":"salford", 1404 | "state":"powys", 1405 | "postcode":"W0M 4LE" 1406 | }, 1407 | "email":"judith.henderson@example.com", 1408 | "phone":"017684 38214", 1409 | "cell":"0773-530-079", 1410 | "picture":{ 1411 | "large":"https://randomuser.me/api/portraits/women/54.jpg", 1412 | "medium":"https://randomuser.me/api/portraits/med/women/54.jpg", 1413 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/54.jpg" 1414 | }, 1415 | "nat":"GB", 1416 | "id":58 1417 | }, 1418 | { 1419 | "gender":"female", 1420 | "name":{ 1421 | "title":"mrs", 1422 | "first":"rose", 1423 | "last":"douglas" 1424 | }, 1425 | "location":{ 1426 | "street":"4903 lakeview st", 1427 | "city":"bendigo", 1428 | "state":"victoria", 1429 | "postcode":1067 1430 | }, 1431 | "email":"rose.douglas@example.com", 1432 | "phone":"06-6833-7152", 1433 | "cell":"0478-141-875", 1434 | "picture":{ 1435 | "large":"https://randomuser.me/api/portraits/women/86.jpg", 1436 | "medium":"https://randomuser.me/api/portraits/med/women/86.jpg", 1437 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/86.jpg" 1438 | }, 1439 | "nat":"AU", 1440 | "id":59 1441 | }, 1442 | { 1443 | "gender":"male", 1444 | "name":{ 1445 | "title":"mr", 1446 | "first":"aldo", 1447 | "last":"fernandes" 1448 | }, 1449 | "location":{ 1450 | "street":"8025 rua da saudade", 1451 | "city":"santa maria", 1452 | "state":"paraíba", 1453 | "postcode":18740 1454 | }, 1455 | "email":"aldo.fernandes@example.com", 1456 | "phone":"(04) 6164-9635", 1457 | "cell":"(87) 6096-2488", 1458 | "picture":{ 1459 | "large":"https://randomuser.me/api/portraits/men/47.jpg", 1460 | "medium":"https://randomuser.me/api/portraits/med/men/47.jpg", 1461 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/47.jpg" 1462 | }, 1463 | "nat":"BR", 1464 | "id":60 1465 | }, 1466 | { 1467 | "gender":"male", 1468 | "name":{ 1469 | "title":"mr", 1470 | "first":"eetu", 1471 | "last":"karjala" 1472 | }, 1473 | "location":{ 1474 | "street":"5996 esplanadi", 1475 | "city":"jalasjärvi", 1476 | "state":"north karelia", 1477 | "postcode":30111 1478 | }, 1479 | "email":"eetu.karjala@example.com", 1480 | "phone":"07-185-067", 1481 | "cell":"040-123-13-78", 1482 | "picture":{ 1483 | "large":"https://randomuser.me/api/portraits/men/65.jpg", 1484 | "medium":"https://randomuser.me/api/portraits/med/men/65.jpg", 1485 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/65.jpg" 1486 | }, 1487 | "nat":"FI", 1488 | "id":61 1489 | }, 1490 | { 1491 | "gender":"male", 1492 | "name":{ 1493 | "title":"mr", 1494 | "first":"malik", 1495 | "last":"pelletier" 1496 | }, 1497 | "location":{ 1498 | "street":"7454 grand marais ave", 1499 | "city":"sidney", 1500 | "state":"prince edward island", 1501 | "postcode":24945 1502 | }, 1503 | "email":"malik.pelletier@example.com", 1504 | "phone":"833-700-1685", 1505 | "cell":"419-401-2926", 1506 | "picture":{ 1507 | "large":"https://randomuser.me/api/portraits/men/27.jpg", 1508 | "medium":"https://randomuser.me/api/portraits/med/men/27.jpg", 1509 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/27.jpg" 1510 | }, 1511 | "nat":"CA", 1512 | "id":62 1513 | }, 1514 | { 1515 | "gender":"male", 1516 | "name":{ 1517 | "title":"mr", 1518 | "first":"mads", 1519 | "last":"jørgensen" 1520 | }, 1521 | "location":{ 1522 | "street":"8083 præstevej", 1523 | "city":"samsø", 1524 | "state":"nordjylland", 1525 | "postcode":32294 1526 | }, 1527 | "email":"mads.jørgensen@example.com", 1528 | "phone":"39449301", 1529 | "cell":"25292089", 1530 | "picture":{ 1531 | "large":"https://randomuser.me/api/portraits/men/35.jpg", 1532 | "medium":"https://randomuser.me/api/portraits/med/men/35.jpg", 1533 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/35.jpg" 1534 | }, 1535 | "nat":"DK", 1536 | "id":63 1537 | }, 1538 | { 1539 | "gender":"female", 1540 | "name":{ 1541 | "title":"mrs", 1542 | "first":"nicoline", 1543 | "last":"christiansen" 1544 | }, 1545 | "location":{ 1546 | "street":"8029 mølletoften", 1547 | "city":"brondby", 1548 | "state":"hovedstaden", 1549 | "postcode":63213 1550 | }, 1551 | "email":"nicoline.christiansen@example.com", 1552 | "phone":"30091178", 1553 | "cell":"99260845", 1554 | "picture":{ 1555 | "large":"https://randomuser.me/api/portraits/women/96.jpg", 1556 | "medium":"https://randomuser.me/api/portraits/med/women/96.jpg", 1557 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/96.jpg" 1558 | }, 1559 | "nat":"DK", 1560 | "id":64 1561 | }, 1562 | { 1563 | "gender":"female", 1564 | "name":{ 1565 | "title":"miss", 1566 | "first":"buse", 1567 | "last":"kavaklıoğlu" 1568 | }, 1569 | "location":{ 1570 | "street":"4856 abanoz sk", 1571 | "city":"kahramanmaraş", 1572 | "state":"yalova", 1573 | "postcode":51529 1574 | }, 1575 | "email":"buse.kavaklıoğlu@example.com", 1576 | "phone":"(582)-520-0316", 1577 | "cell":"(858)-456-9753", 1578 | "picture":{ 1579 | "large":"https://randomuser.me/api/portraits/women/36.jpg", 1580 | "medium":"https://randomuser.me/api/portraits/med/women/36.jpg", 1581 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/36.jpg" 1582 | }, 1583 | "nat":"TR", 1584 | "id":65 1585 | }, 1586 | { 1587 | "gender":"male", 1588 | "name":{ 1589 | "title":"mr", 1590 | "first":"arthur", 1591 | "last":"heinze" 1592 | }, 1593 | "location":{ 1594 | "street":"8765 fliederweg", 1595 | "city":"gera", 1596 | "state":"baden-württemberg", 1597 | "postcode":71027 1598 | }, 1599 | "email":"arthur.heinze@example.com", 1600 | "phone":"0477-0728553", 1601 | "cell":"0173-3485945", 1602 | "picture":{ 1603 | "large":"https://randomuser.me/api/portraits/men/6.jpg", 1604 | "medium":"https://randomuser.me/api/portraits/med/men/6.jpg", 1605 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/6.jpg" 1606 | }, 1607 | "nat":"DE", 1608 | "id":66 1609 | }, 1610 | { 1611 | "gender":"female", 1612 | "name":{ 1613 | "title":"miss", 1614 | "first":"amandine", 1615 | "last":"perez" 1616 | }, 1617 | "location":{ 1618 | "street":"4801 rue de l'abbé-soulange-bodin", 1619 | "city":"pau", 1620 | "state":"ain", 1621 | "postcode":67074 1622 | }, 1623 | "email":"amandine.perez@example.com", 1624 | "phone":"02-79-84-97-14", 1625 | "cell":"06-91-75-06-38", 1626 | "picture":{ 1627 | "large":"https://randomuser.me/api/portraits/women/24.jpg", 1628 | "medium":"https://randomuser.me/api/portraits/med/women/24.jpg", 1629 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/24.jpg" 1630 | }, 1631 | "nat":"FR", 1632 | "id":67 1633 | }, 1634 | { 1635 | "gender":"female", 1636 | "name":{ 1637 | "title":"ms", 1638 | "first":"oya", 1639 | "last":"nalbantoğlu" 1640 | }, 1641 | "location":{ 1642 | "street":"8637 bağdat cd", 1643 | "city":"tunceli", 1644 | "state":"gümüşhane", 1645 | "postcode":63303 1646 | }, 1647 | "email":"oya.nalbantoğlu@example.com", 1648 | "phone":"(655)-645-4224", 1649 | "cell":"(309)-411-1491", 1650 | "picture":{ 1651 | "large":"https://randomuser.me/api/portraits/women/77.jpg", 1652 | "medium":"https://randomuser.me/api/portraits/med/women/77.jpg", 1653 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/77.jpg" 1654 | }, 1655 | "nat":"TR", 1656 | "id":68 1657 | }, 1658 | { 1659 | "gender":"male", 1660 | "name":{ 1661 | "title":"mr", 1662 | "first":"edward", 1663 | "last":"hughes" 1664 | }, 1665 | "location":{ 1666 | "street":"3992 nelson quay", 1667 | "city":"gisborne", 1668 | "state":"gisborne", 1669 | "postcode":90416 1670 | }, 1671 | "email":"edward.hughes@example.com", 1672 | "phone":"(313)-805-3558", 1673 | "cell":"(138)-963-9714", 1674 | "picture":{ 1675 | "large":"https://randomuser.me/api/portraits/men/90.jpg", 1676 | "medium":"https://randomuser.me/api/portraits/med/men/90.jpg", 1677 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/90.jpg" 1678 | }, 1679 | "nat":"NZ", 1680 | "id":69 1681 | }, 1682 | { 1683 | "gender":"female", 1684 | "name":{ 1685 | "title":"mrs", 1686 | "first":"maria", 1687 | "last":"berndt" 1688 | }, 1689 | "location":{ 1690 | "street":"9149 grüner weg", 1691 | "city":"stuttgart", 1692 | "state":"bayern", 1693 | "postcode":22634 1694 | }, 1695 | "email":"maria.berndt@example.com", 1696 | "phone":"0184-2589485", 1697 | "cell":"0175-5302072", 1698 | "picture":{ 1699 | "large":"https://randomuser.me/api/portraits/women/28.jpg", 1700 | "medium":"https://randomuser.me/api/portraits/med/women/28.jpg", 1701 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/28.jpg" 1702 | }, 1703 | "nat":"DE", 1704 | "id":70 1705 | }, 1706 | { 1707 | "gender":"male", 1708 | "name":{ 1709 | "title":"mr", 1710 | "first":"florian", 1711 | "last":"gärtner" 1712 | }, 1713 | "location":{ 1714 | "street":"5828 kirchweg", 1715 | "city":"nordwestmecklenburg", 1716 | "state":"bayern", 1717 | "postcode":82774 1718 | }, 1719 | "email":"florian.gärtner@example.com", 1720 | "phone":"0122-8617955", 1721 | "cell":"0171-9745373", 1722 | "picture":{ 1723 | "large":"https://randomuser.me/api/portraits/men/43.jpg", 1724 | "medium":"https://randomuser.me/api/portraits/med/men/43.jpg", 1725 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/43.jpg" 1726 | }, 1727 | "nat":"DE", 1728 | "id":71 1729 | }, 1730 | { 1731 | "gender":"male", 1732 | "name":{ 1733 | "title":"mr", 1734 | "first":"victor", 1735 | "last":"thomsen" 1736 | }, 1737 | "location":{ 1738 | "street":"6391 vestre landevej", 1739 | "city":"aalborg s.ø.", 1740 | "state":"hovedstaden", 1741 | "postcode":36059 1742 | }, 1743 | "email":"victor.thomsen@example.com", 1744 | "phone":"28082913", 1745 | "cell":"24373715", 1746 | "picture":{ 1747 | "large":"https://randomuser.me/api/portraits/men/93.jpg", 1748 | "medium":"https://randomuser.me/api/portraits/med/men/93.jpg", 1749 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/93.jpg" 1750 | }, 1751 | "nat":"DK", 1752 | "id":72 1753 | }, 1754 | { 1755 | "gender":"female", 1756 | "name":{ 1757 | "title":"ms", 1758 | "first":"tilde", 1759 | "last":"poulsen" 1760 | }, 1761 | "location":{ 1762 | "street":"5412 h.c. ørsteds vej", 1763 | "city":"billum", 1764 | "state":"syddanmark", 1765 | "postcode":92860 1766 | }, 1767 | "email":"tilde.poulsen@example.com", 1768 | "phone":"49939882", 1769 | "cell":"89307413", 1770 | "picture":{ 1771 | "large":"https://randomuser.me/api/portraits/women/96.jpg", 1772 | "medium":"https://randomuser.me/api/portraits/med/women/96.jpg", 1773 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/96.jpg" 1774 | }, 1775 | "nat":"DK", 1776 | "id":73 1777 | }, 1778 | { 1779 | "gender":"female", 1780 | "name":{ 1781 | "title":"ms", 1782 | "first":"denise", 1783 | "last":"rodrigues" 1784 | }, 1785 | "location":{ 1786 | "street":"4637 travessa dos açorianos", 1787 | "city":"mogi das cruzes", 1788 | "state":"mato grosso do sul", 1789 | "postcode":29111 1790 | }, 1791 | "email":"denise.rodrigues@example.com", 1792 | "phone":"(79) 3995-7149", 1793 | "cell":"(38) 8662-1541", 1794 | "picture":{ 1795 | "large":"https://randomuser.me/api/portraits/women/51.jpg", 1796 | "medium":"https://randomuser.me/api/portraits/med/women/51.jpg", 1797 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/51.jpg" 1798 | }, 1799 | "nat":"BR", 1800 | "id":74 1801 | }, 1802 | { 1803 | "gender":"female", 1804 | "name":{ 1805 | "title":"ms", 1806 | "first":"luisa", 1807 | "last":"cortes" 1808 | }, 1809 | "location":{ 1810 | "street":"2860 calle de bravo murillo", 1811 | "city":"alcalá de henares", 1812 | "state":"extremadura", 1813 | "postcode":14015 1814 | }, 1815 | "email":"luisa.cortes@example.com", 1816 | "phone":"921-262-604", 1817 | "cell":"623-630-709", 1818 | "picture":{ 1819 | "large":"https://randomuser.me/api/portraits/women/79.jpg", 1820 | "medium":"https://randomuser.me/api/portraits/med/women/79.jpg", 1821 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/79.jpg" 1822 | }, 1823 | "nat":"ES", 1824 | "id":75 1825 | }, 1826 | { 1827 | "gender":"female", 1828 | "name":{ 1829 | "title":"ms", 1830 | "first":"jasmine", 1831 | "last":"harris" 1832 | }, 1833 | "location":{ 1834 | "street":"2302 west ave", 1835 | "city":"carleton", 1836 | "state":"québec", 1837 | "postcode":20749 1838 | }, 1839 | "email":"jasmine.harris@example.com", 1840 | "phone":"056-712-4648", 1841 | "cell":"550-306-4074", 1842 | "picture":{ 1843 | "large":"https://randomuser.me/api/portraits/women/82.jpg", 1844 | "medium":"https://randomuser.me/api/portraits/med/women/82.jpg", 1845 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/82.jpg" 1846 | }, 1847 | "nat":"CA", 1848 | "id":76 1849 | }, 1850 | { 1851 | "gender":"male", 1852 | "name":{ 1853 | "title":"mr", 1854 | "first":"matthew", 1855 | "last":"taylor" 1856 | }, 1857 | "location":{ 1858 | "street":"5315 dieppe ave", 1859 | "city":"sutton", 1860 | "state":"northwest territories", 1861 | "postcode":96688 1862 | }, 1863 | "email":"matthew.taylor@example.com", 1864 | "phone":"389-980-5838", 1865 | "cell":"320-784-2327", 1866 | "picture":{ 1867 | "large":"https://randomuser.me/api/portraits/men/64.jpg", 1868 | "medium":"https://randomuser.me/api/portraits/med/men/64.jpg", 1869 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/64.jpg" 1870 | }, 1871 | "nat":"CA", 1872 | "id":77 1873 | }, 1874 | { 1875 | "gender":"female", 1876 | "name":{ 1877 | "title":"ms", 1878 | "first":"نازنین", 1879 | "last":"سلطانی نژاد" 1880 | }, 1881 | "location":{ 1882 | "street":"3345 شهید آرش مهر", 1883 | "city":"کرج", 1884 | "state":"خراسان جنوبی", 1885 | "postcode":39958 1886 | }, 1887 | "email":"نازنین.سلطانینژاد@example.com", 1888 | "phone":"001-86610290", 1889 | "cell":"0959-085-7954", 1890 | "picture":{ 1891 | "large":"https://randomuser.me/api/portraits/women/84.jpg", 1892 | "medium":"https://randomuser.me/api/portraits/med/women/84.jpg", 1893 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/84.jpg" 1894 | }, 1895 | "nat":"IR", 1896 | "id":78 1897 | }, 1898 | { 1899 | "gender":"female", 1900 | "name":{ 1901 | "title":"mrs", 1902 | "first":"thaïs", 1903 | "last":"lacroix" 1904 | }, 1905 | "location":{ 1906 | "street":"8815 rue de gerland", 1907 | "city":"caen", 1908 | "state":"val-de-marne", 1909 | "postcode":84708 1910 | }, 1911 | "email":"thaïs.lacroix@example.com", 1912 | "phone":"05-65-27-18-90", 1913 | "cell":"06-14-78-41-12", 1914 | "picture":{ 1915 | "large":"https://randomuser.me/api/portraits/women/19.jpg", 1916 | "medium":"https://randomuser.me/api/portraits/med/women/19.jpg", 1917 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/19.jpg" 1918 | }, 1919 | "nat":"FR", 1920 | "id":79 1921 | }, 1922 | { 1923 | "gender":"female", 1924 | "name":{ 1925 | "title":"ms", 1926 | "first":"eleanor", 1927 | "last":"hernandez" 1928 | }, 1929 | "location":{ 1930 | "street":"7230 george street", 1931 | "city":"ely", 1932 | "state":"west glamorgan", 1933 | "postcode":"CA8 1RU" 1934 | }, 1935 | "email":"eleanor.hernandez@example.com", 1936 | "phone":"015242 65625", 1937 | "cell":"0708-736-104", 1938 | "picture":{ 1939 | "large":"https://randomuser.me/api/portraits/women/36.jpg", 1940 | "medium":"https://randomuser.me/api/portraits/med/women/36.jpg", 1941 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/36.jpg" 1942 | }, 1943 | "nat":"GB", 1944 | "id":80 1945 | }, 1946 | { 1947 | "gender":"female", 1948 | "name":{ 1949 | "title":"miss", 1950 | "first":"alexis", 1951 | "last":"carpenter" 1952 | }, 1953 | "location":{ 1954 | "street":"4917 w campbell ave", 1955 | "city":"darwin", 1956 | "state":"tasmania", 1957 | "postcode":2999 1958 | }, 1959 | "email":"alexis.carpenter@example.com", 1960 | "phone":"06-7426-1700", 1961 | "cell":"0444-154-735", 1962 | "picture":{ 1963 | "large":"https://randomuser.me/api/portraits/women/58.jpg", 1964 | "medium":"https://randomuser.me/api/portraits/med/women/58.jpg", 1965 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/58.jpg" 1966 | }, 1967 | "nat":"AU", 1968 | "id":81 1969 | }, 1970 | { 1971 | "gender":"female", 1972 | "name":{ 1973 | "title":"mrs", 1974 | "first":"bertha", 1975 | "last":"carroll" 1976 | }, 1977 | "location":{ 1978 | "street":"8166 college st", 1979 | "city":"hayward", 1980 | "state":"maryland", 1981 | "postcode":90576 1982 | }, 1983 | "email":"bertha.carroll@example.com", 1984 | "phone":"(553)-869-4587", 1985 | "cell":"(269)-351-0723", 1986 | "picture":{ 1987 | "large":"https://randomuser.me/api/portraits/women/38.jpg", 1988 | "medium":"https://randomuser.me/api/portraits/med/women/38.jpg", 1989 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/38.jpg" 1990 | }, 1991 | "nat":"US", 1992 | "id":82 1993 | }, 1994 | { 1995 | "gender":"male", 1996 | "name":{ 1997 | "title":"mr", 1998 | "first":"alexis", 1999 | "last":"novak" 2000 | }, 2001 | "location":{ 2002 | "street":"1196 cedar st", 2003 | "city":"waterloo", 2004 | "state":"québec", 2005 | "postcode":24523 2006 | }, 2007 | "email":"alexis.novak@example.com", 2008 | "phone":"876-653-9821", 2009 | "cell":"849-799-1524", 2010 | "picture":{ 2011 | "large":"https://randomuser.me/api/portraits/men/31.jpg", 2012 | "medium":"https://randomuser.me/api/portraits/med/men/31.jpg", 2013 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/31.jpg" 2014 | }, 2015 | "nat":"CA", 2016 | "id":83 2017 | }, 2018 | { 2019 | "gender":"female", 2020 | "name":{ 2021 | "title":"miss", 2022 | "first":"eva", 2023 | "last":"lopez" 2024 | }, 2025 | "location":{ 2026 | "street":"7339 the crescent", 2027 | "city":"mullingar", 2028 | "state":"michigan", 2029 | "postcode":89689 2030 | }, 2031 | "email":"eva.lopez@example.com", 2032 | "phone":"031-442-1500", 2033 | "cell":"081-078-6247", 2034 | "picture":{ 2035 | "large":"https://randomuser.me/api/portraits/women/38.jpg", 2036 | "medium":"https://randomuser.me/api/portraits/med/women/38.jpg", 2037 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/38.jpg" 2038 | }, 2039 | "nat":"IE", 2040 | "id":84 2041 | }, 2042 | { 2043 | "gender":"male", 2044 | "name":{ 2045 | "title":"monsieur", 2046 | "first":"timothe", 2047 | "last":"morel" 2048 | }, 2049 | "location":{ 2050 | "street":"8667 rue pierre-delore", 2051 | "city":"montpreveyres", 2052 | "state":"st. gallen", 2053 | "postcode":2702 2054 | }, 2055 | "email":"timothe.morel@example.com", 2056 | "phone":"(179)-000-2547", 2057 | "cell":"(306)-618-5206", 2058 | "picture":{ 2059 | "large":"https://randomuser.me/api/portraits/men/28.jpg", 2060 | "medium":"https://randomuser.me/api/portraits/med/men/28.jpg", 2061 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/28.jpg" 2062 | }, 2063 | "nat":"CH", 2064 | "id":85 2065 | }, 2066 | { 2067 | "gender":"female", 2068 | "name":{ 2069 | "title":"madame", 2070 | "first":"lya", 2071 | "last":"duval" 2072 | }, 2073 | "location":{ 2074 | "street":"2204 esplanade du 9 novembre 1989", 2075 | "city":"mollens vd", 2076 | "state":"basel-stadt", 2077 | "postcode":3292 2078 | }, 2079 | "email":"lya.duval@example.com", 2080 | "phone":"(728)-709-4634", 2081 | "cell":"(082)-464-2159", 2082 | "picture":{ 2083 | "large":"https://randomuser.me/api/portraits/women/61.jpg", 2084 | "medium":"https://randomuser.me/api/portraits/med/women/61.jpg", 2085 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/61.jpg" 2086 | }, 2087 | "nat":"CH", 2088 | "id":86 2089 | }, 2090 | { 2091 | "gender":"male", 2092 | "name":{ 2093 | "title":"mr", 2094 | "first":"jose", 2095 | "last":"parra" 2096 | }, 2097 | "location":{ 2098 | "street":"3768 calle de ferraz", 2099 | "city":"san sebastián de los reyes", 2100 | "state":"cataluña", 2101 | "postcode":98914 2102 | }, 2103 | "email":"jose.parra@example.com", 2104 | "phone":"989-078-580", 2105 | "cell":"629-017-119", 2106 | "picture":{ 2107 | "large":"https://randomuser.me/api/portraits/men/44.jpg", 2108 | "medium":"https://randomuser.me/api/portraits/med/men/44.jpg", 2109 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/44.jpg" 2110 | }, 2111 | "nat":"ES", 2112 | "id":87 2113 | }, 2114 | { 2115 | "gender":"male", 2116 | "name":{ 2117 | "title":"mr", 2118 | "first":"timótheüs", 2119 | "last":"stork" 2120 | }, 2121 | "location":{ 2122 | "street":"2509 israëlslaan", 2123 | "city":"groesbeek", 2124 | "state":"friesland", 2125 | "postcode":12504 2126 | }, 2127 | "email":"timótheüs.stork@example.com", 2128 | "phone":"(471)-382-7738", 2129 | "cell":"(719)-855-4534", 2130 | "picture":{ 2131 | "large":"https://randomuser.me/api/portraits/men/0.jpg", 2132 | "medium":"https://randomuser.me/api/portraits/med/men/0.jpg", 2133 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/0.jpg" 2134 | }, 2135 | "nat":"NL", 2136 | "id":88 2137 | }, 2138 | { 2139 | "gender":"female", 2140 | "name":{ 2141 | "title":"miss", 2142 | "first":"ella", 2143 | "last":"singh" 2144 | }, 2145 | "location":{ 2146 | "street":"9071 15th st", 2147 | "city":"windsor", 2148 | "state":"québec", 2149 | "postcode":11610 2150 | }, 2151 | "email":"ella.singh@example.com", 2152 | "phone":"463-774-6841", 2153 | "cell":"661-129-9237", 2154 | "picture":{ 2155 | "large":"https://randomuser.me/api/portraits/women/39.jpg", 2156 | "medium":"https://randomuser.me/api/portraits/med/women/39.jpg", 2157 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/39.jpg" 2158 | }, 2159 | "nat":"CA", 2160 | "id":89 2161 | }, 2162 | { 2163 | "gender":"female", 2164 | "name":{ 2165 | "title":"ms", 2166 | "first":"یلدا", 2167 | "last":"زارعی" 2168 | }, 2169 | "location":{ 2170 | "street":"7937 ستارخان", 2171 | "city":"بروجرد", 2172 | "state":"لرستان", 2173 | "postcode":35398 2174 | }, 2175 | "email":"یلدا.زارعی@example.com", 2176 | "phone":"014-55022489", 2177 | "cell":"0963-362-9206", 2178 | "picture":{ 2179 | "large":"https://randomuser.me/api/portraits/women/16.jpg", 2180 | "medium":"https://randomuser.me/api/portraits/med/women/16.jpg", 2181 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/16.jpg" 2182 | }, 2183 | "nat":"IR", 2184 | "id":90 2185 | }, 2186 | { 2187 | "gender":"female", 2188 | "name":{ 2189 | "title":"ms", 2190 | "first":"تینا", 2191 | "last":"حسینی" 2192 | }, 2193 | "location":{ 2194 | "street":"8937 شهید سرتیپ نامجو", 2195 | "city":"ملارد", 2196 | "state":"یزد", 2197 | "postcode":47661 2198 | }, 2199 | "email":"تینا.حسینی@example.com", 2200 | "phone":"078-37533588", 2201 | "cell":"0962-535-6767", 2202 | "picture":{ 2203 | "large":"https://randomuser.me/api/portraits/women/68.jpg", 2204 | "medium":"https://randomuser.me/api/portraits/med/women/68.jpg", 2205 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/68.jpg" 2206 | }, 2207 | "nat":"IR", 2208 | "id":91 2209 | }, 2210 | { 2211 | "gender":"female", 2212 | "name":{ 2213 | "title":"miss", 2214 | "first":"debra", 2215 | "last":"lord" 2216 | }, 2217 | "location":{ 2218 | "street":"1787 george street", 2219 | "city":"ardee", 2220 | "state":"delaware", 2221 | "postcode":89976 2222 | }, 2223 | "email":"debra.lord@example.com", 2224 | "phone":"031-580-3352", 2225 | "cell":"081-517-5753", 2226 | "picture":{ 2227 | "large":"https://randomuser.me/api/portraits/women/43.jpg", 2228 | "medium":"https://randomuser.me/api/portraits/med/women/43.jpg", 2229 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/43.jpg" 2230 | }, 2231 | "nat":"IE", 2232 | "id":92 2233 | }, 2234 | { 2235 | "gender":"female", 2236 | "name":{ 2237 | "title":"ms", 2238 | "first":"jenny", 2239 | "last":"fox" 2240 | }, 2241 | "location":{ 2242 | "street":"9317 south street", 2243 | "city":"tipperary", 2244 | "state":"colorado", 2245 | "postcode":90537 2246 | }, 2247 | "email":"jenny.fox@example.com", 2248 | "phone":"011-292-8923", 2249 | "cell":"081-898-7554", 2250 | "picture":{ 2251 | "large":"https://randomuser.me/api/portraits/women/1.jpg", 2252 | "medium":"https://randomuser.me/api/portraits/med/women/1.jpg", 2253 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/1.jpg" 2254 | }, 2255 | "nat":"IE", 2256 | "id":93 2257 | }, 2258 | { 2259 | "gender":"female", 2260 | "name":{ 2261 | "title":"miss", 2262 | "first":"نازنین", 2263 | "last":"پارسا" 2264 | }, 2265 | "location":{ 2266 | "street":"4718 شهید کبیری طامه", 2267 | "city":"بیرجند", 2268 | "state":"آذربایجان شرقی", 2269 | "postcode":34943 2270 | }, 2271 | "email":"نازنین.پارسا@example.com", 2272 | "phone":"008-44764194", 2273 | "cell":"0907-383-8657", 2274 | "picture":{ 2275 | "large":"https://randomuser.me/api/portraits/women/51.jpg", 2276 | "medium":"https://randomuser.me/api/portraits/med/women/51.jpg", 2277 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/51.jpg" 2278 | }, 2279 | "nat":"IR", 2280 | "id":94 2281 | }, 2282 | { 2283 | "gender":"female", 2284 | "name":{ 2285 | "title":"mrs", 2286 | "first":"scarlett", 2287 | "last":"kumar" 2288 | }, 2289 | "location":{ 2290 | "street":"7282 fenton street", 2291 | "city":"gisborne", 2292 | "state":"wellington", 2293 | "postcode":31194 2294 | }, 2295 | "email":"scarlett.kumar@example.com", 2296 | "phone":"(353)-104-5636", 2297 | "cell":"(193)-061-3405", 2298 | "picture":{ 2299 | "large":"https://randomuser.me/api/portraits/women/31.jpg", 2300 | "medium":"https://randomuser.me/api/portraits/med/women/31.jpg", 2301 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/31.jpg" 2302 | }, 2303 | "nat":"NZ", 2304 | "id":95 2305 | }, 2306 | { 2307 | "gender":"male", 2308 | "name":{ 2309 | "title":"mr", 2310 | "first":"frederik", 2311 | "last":"madsen" 2312 | }, 2313 | "location":{ 2314 | "street":"5639 syrenvej", 2315 | "city":"sundby/erslev", 2316 | "state":"danmark", 2317 | "postcode":16477 2318 | }, 2319 | "email":"frederik.madsen@example.com", 2320 | "phone":"42863318", 2321 | "cell":"88902544", 2322 | "picture":{ 2323 | "large":"https://randomuser.me/api/portraits/men/17.jpg", 2324 | "medium":"https://randomuser.me/api/portraits/med/men/17.jpg", 2325 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/17.jpg" 2326 | }, 2327 | "nat":"DK", 2328 | "id":96 2329 | }, 2330 | { 2331 | "gender":"female", 2332 | "name":{ 2333 | "title":"mrs", 2334 | "first":"an", 2335 | "last":"demandt" 2336 | }, 2337 | "location":{ 2338 | "street":"8723 vismarkt", 2339 | "city":"halderberge", 2340 | "state":"zuid-holland", 2341 | "postcode":59656 2342 | }, 2343 | "email":"an.demandt@example.com", 2344 | "phone":"(297)-398-0236", 2345 | "cell":"(342)-798-2963", 2346 | "picture":{ 2347 | "large":"https://randomuser.me/api/portraits/women/15.jpg", 2348 | "medium":"https://randomuser.me/api/portraits/med/women/15.jpg", 2349 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/15.jpg" 2350 | }, 2351 | "nat":"NL", 2352 | "id":97 2353 | }, 2354 | { 2355 | "gender":"female", 2356 | "name":{ 2357 | "title":"mademoiselle", 2358 | "first":"agathe", 2359 | "last":"roy" 2360 | }, 2361 | "location":{ 2362 | "street":"5239 rue de la gare", 2363 | "city":"senarclens", 2364 | "state":"vaud", 2365 | "postcode":8905 2366 | }, 2367 | "email":"agathe.roy@example.com", 2368 | "phone":"(377)-525-5363", 2369 | "cell":"(779)-986-9799", 2370 | "picture":{ 2371 | "large":"https://randomuser.me/api/portraits/women/38.jpg", 2372 | "medium":"https://randomuser.me/api/portraits/med/women/38.jpg", 2373 | "thumbnail":"https://randomuser.me/api/portraits/thumb/women/38.jpg" 2374 | }, 2375 | "nat":"CH", 2376 | "id":98 2377 | }, 2378 | { 2379 | "gender":"male", 2380 | "name":{ 2381 | "title":"mr", 2382 | "first":"paulino", 2383 | "last":"castro" 2384 | }, 2385 | "location":{ 2386 | "street":"2655 rua paraíba ", 2387 | "city":"valinhos", 2388 | "state":"ceará", 2389 | "postcode":97088 2390 | }, 2391 | "email":"paulino.castro@example.com", 2392 | "phone":"(68) 5253-3385", 2393 | "cell":"(01) 2547-8128", 2394 | "picture":{ 2395 | "large":"https://randomuser.me/api/portraits/men/36.jpg", 2396 | "medium":"https://randomuser.me/api/portraits/med/men/36.jpg", 2397 | "thumbnail":"https://randomuser.me/api/portraits/thumb/men/36.jpg" 2398 | }, 2399 | "nat":"BR", 2400 | "id":99 2401 | } 2402 | ] -------------------------------------------------------------------------------- /app/src/main/assets/fonts/ShadowsIntoLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadoz/SelectCardViewPrototype/227699410cc0a4d8b6ef6d16d035a633f7c039bd/app/src/main/assets/fonts/ShadowsIntoLight.ttf -------------------------------------------------------------------------------- /app/src/main/java/com/application/sample/selectcardviewprototype/app/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.application.sample.selectcardviewprototype.app; 2 | 3 | import android.content.Context; 4 | import android.os.Bundle; 5 | import android.support.v7.app.ActionBar; 6 | import android.support.v7.app.AppCompatActivity; 7 | import android.view.Menu; 8 | import android.view.MenuItem; 9 | import com.application.sample.selectcardviewprototype.app.fragment.OnRestoreRecyclerViewInterface; 10 | import com.application.sample.selectcardviewprototype.app.fragment.ContactListFragment; 11 | import com.application.sample.selectcardviewprototype.app.singleton.StatusSingleton; 12 | import com.flurry.android.FlurryAgent; 13 | 14 | import uk.co.chrisjenx.calligraphy.CalligraphyContextWrapper; 15 | 16 | import static com.application.sample.selectcardviewprototype.app.singleton.StatusSingleton.*; 17 | import static com.application.sample.selectcardviewprototype.app.singleton.StatusSingleton.StatusEnum.*; 18 | import static com.application.sample.selectcardviewprototype.app.singleton.StatusSingleton.StatusEnum.NOT_SET; 19 | 20 | 21 | public class MainActivity extends AppCompatActivity { 22 | 23 | @Override 24 | protected void attachBaseContext(Context newBase) { 25 | super.attachBaseContext(CalligraphyContextWrapper.wrap(newBase)); 26 | } 27 | 28 | @Override 29 | protected void onCreate(Bundle savedInstanceState) { 30 | super.onCreate(savedInstanceState); 31 | setContentView(R.layout.activity_main); 32 | FlurryAgent.onStartSession(this); 33 | 34 | if (savedInstanceState == null) { 35 | getSupportFragmentManager() 36 | .beginTransaction() 37 | .add(R.id.container, new ContactListFragment()) 38 | .commit(); 39 | } 40 | } 41 | 42 | @Override 43 | public boolean onCreateOptionsMenu(Menu menu) { 44 | return true; 45 | } 46 | 47 | @Override 48 | public boolean onOptionsItemSelected(MenuItem item) { 49 | return super.onOptionsItemSelected(item); 50 | } 51 | 52 | @Override 53 | public void onBackPressed() { 54 | if (StatusSingleton.getInstance().getStatus() == SELECTED) { 55 | getFragment().onRestoreRecyclerView(); 56 | StatusSingleton.getInstance().setStatus(NOT_SET); 57 | return; 58 | } 59 | 60 | if (getFragment() != null) { 61 | getFragment().destroyBehavior(); 62 | } 63 | super.onBackPressed(); 64 | } 65 | 66 | /** 67 | * get fragment 68 | * @return 69 | */ 70 | private OnRestoreRecyclerViewInterface getFragment() { 71 | final int CONTACT_LIST_FRAGMENT_ID = 0; 72 | return ((OnRestoreRecyclerViewInterface) getSupportFragmentManager() 73 | .getFragments().get(CONTACT_LIST_FRAGMENT_ID)); 74 | } 75 | 76 | } 77 | -------------------------------------------------------------------------------- /app/src/main/java/com/application/sample/selectcardviewprototype/app/SettingsActivity.java: -------------------------------------------------------------------------------- 1 | package com.application.sample.selectcardviewprototype.app; 2 | 3 | import android.content.Context; 4 | import android.os.Bundle; 5 | import android.support.v7.app.AppCompatActivity; 6 | import android.view.Menu; 7 | import android.view.MenuItem; 8 | 9 | import com.application.sample.selectcardviewprototype.app.fragment.ContactListFragment; 10 | import com.application.sample.selectcardviewprototype.app.fragment.OnRestoreRecyclerViewInterface; 11 | import com.application.sample.selectcardviewprototype.app.fragment.SettingsFragment; 12 | import com.application.sample.selectcardviewprototype.app.singleton.StatusSingleton; 13 | 14 | import uk.co.chrisjenx.calligraphy.CalligraphyContextWrapper; 15 | 16 | import static com.application.sample.selectcardviewprototype.app.singleton.StatusSingleton.StatusEnum.NOT_SET; 17 | import static com.application.sample.selectcardviewprototype.app.singleton.StatusSingleton.StatusEnum.SELECTED; 18 | import static com.application.sample.selectcardviewprototype.app.singleton.StatusSingleton.getInstance; 19 | 20 | 21 | public class SettingsActivity extends AppCompatActivity { 22 | @Override 23 | protected void attachBaseContext(Context newBase) { 24 | super.attachBaseContext(CalligraphyContextWrapper.wrap(newBase)); 25 | } 26 | 27 | @Override 28 | protected void onCreate(Bundle savedInstanceState) { 29 | super.onCreate(savedInstanceState); 30 | setContentView(R.layout.activity_main); 31 | if (savedInstanceState == null) { 32 | getSupportFragmentManager() 33 | .beginTransaction() 34 | .add(R.id.container, new SettingsFragment()) 35 | .commit(); 36 | } 37 | } 38 | 39 | @Override 40 | public boolean onCreateOptionsMenu(Menu menu) { 41 | return true; 42 | } 43 | 44 | @Override 45 | public boolean onOptionsItemSelected(MenuItem item) { 46 | return super.onOptionsItemSelected(item); 47 | } 48 | 49 | @Override 50 | public void onBackPressed() { 51 | super.onBackPressed(); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /app/src/main/java/com/application/sample/selectcardviewprototype/app/adapter/RecyclerviewAdapter.java: -------------------------------------------------------------------------------- 1 | package com.application.sample.selectcardviewprototype.app.adapter; 2 | 3 | import android.content.Context; 4 | import android.support.v4.content.ContextCompat; 5 | import android.support.v7.widget.RecyclerView; 6 | import android.util.Log; 7 | import android.view.LayoutInflater; 8 | import android.view.View; 9 | import android.view.ViewGroup; 10 | import android.widget.ImageView; 11 | import android.widget.TextView; 12 | import com.application.sample.selectcardviewprototype.app.R; 13 | import com.application.sample.selectcardviewprototype.app.model.ContactItem; 14 | import com.application.sample.selectcardviewprototype.app.singleton.PicassoSingleton; 15 | 16 | import java.lang.ref.WeakReference; 17 | import java.util.ArrayList; 18 | import java.util.List; 19 | 20 | public class RecyclerviewAdapter extends RecyclerView.Adapter { 21 | private final List itemList; 22 | private final WeakReference listener; 23 | private final WeakReference context; 24 | private final WeakReference picassoListener; 25 | 26 | 27 | public RecyclerviewAdapter(ArrayList list, 28 | WeakReference listener, 29 | WeakReference listener2, 30 | WeakReference ctx) { 31 | this.itemList = list; 32 | this.listener = listener; 33 | this.picassoListener = listener2; 34 | this.context = ctx; 35 | } 36 | 37 | @Override 38 | public ShoppingItemViewHolder onCreateViewHolder(ViewGroup parent, int i) { 39 | View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.contact_item_row, parent, false); 40 | ShoppingItemViewHolder vh = new ShoppingItemViewHolder(view, listener, picassoListener); 41 | view.setOnClickListener(vh); 42 | return vh; 43 | } 44 | 45 | @Override 46 | public void onBindViewHolder(ShoppingItemViewHolder vh, int position) { 47 | vh.bindTo(context, itemList.get(position), position); 48 | } 49 | 50 | @Override 51 | public int getItemCount() { 52 | return (null != itemList ? itemList.size() : 0); 53 | } 54 | 55 | public List getAllItems() { 56 | return itemList; 57 | } 58 | 59 | /** 60 | * View Holder 61 | */ 62 | public static class ShoppingItemViewHolder extends RecyclerView.ViewHolder 63 | implements View.OnClickListener { 64 | 65 | private final TextView nameTextView; 66 | private final ImageView thumbnailImageView; 67 | private TextView surnameTextView; 68 | private final WeakReference listener; 69 | private int currentPosition; 70 | private WeakReference picassoListener; 71 | 72 | public ShoppingItemViewHolder(View view, 73 | WeakReference listener, 74 | WeakReference listener2) { 75 | super(view); 76 | this.nameTextView = (TextView) view.findViewById(R.id.nameTextViewId); 77 | this.surnameTextView = (TextView) view.findViewById(R.id.surnameTextViewId); 78 | this.thumbnailImageView = (ImageView) view.findViewById(R.id.thumbnailImageViewId); 79 | this.listener = listener; 80 | this.picassoListener = listener2; 81 | } 82 | 83 | /** 84 | * 85 | * @param context 86 | * @param item 87 | * @param currentPosition 88 | */ 89 | public void bindTo(WeakReference context, ContactItem item, int currentPosition) { 90 | this.currentPosition = currentPosition; 91 | nameTextView.setText(item.getName()); 92 | surnameTextView.setText(item.getSurname()); 93 | PicassoSingleton.getInstance(context, picassoListener) 94 | .setProfilePictureAsync(thumbnailImageView, item.getThumbnail(), 95 | ContextCompat.getDrawable(context.get(), R.drawable.ic_person_pin_circle_black_48dp)); 96 | } 97 | 98 | @Override 99 | public void onClick(View view) { 100 | if (listener != null) { 101 | listener.get().onItemClicked(currentPosition); 102 | } 103 | } 104 | } 105 | 106 | /** 107 | * interface to handle onItemClicked 108 | */ 109 | public interface OnItemSelectedListenerCustom { 110 | void onItemClicked(int selectedPosition); 111 | } 112 | 113 | } -------------------------------------------------------------------------------- /app/src/main/java/com/application/sample/selectcardviewprototype/app/animator/AnimatorBuilder.java: -------------------------------------------------------------------------------- 1 | package com.application.sample.selectcardviewprototype.app.animator; 2 | 3 | import android.animation.Animator; 4 | import android.animation.ArgbEvaluator; 5 | import android.animation.ObjectAnimator; 6 | import android.animation.ValueAnimator; 7 | import android.content.Context; 8 | import android.support.annotation.NonNull; 9 | import android.view.View; 10 | 11 | import java.lang.ref.WeakReference; 12 | 13 | public class AnimatorBuilder { 14 | 15 | private static final String TOP = "top"; 16 | private final int duration; 17 | private static final String TRANSLATION_Y ="translationY"; 18 | private String ALPHA = "alpha"; 19 | private String BOTTOM = "bottom"; 20 | 21 | /** 22 | * TODO follow up builder design pattern 23 | * @param context 24 | * @return 25 | */ 26 | public static AnimatorBuilder getInstance(WeakReference context) { 27 | return new AnimatorBuilder(context); 28 | } 29 | 30 | 31 | public AnimatorBuilder(WeakReference context) { 32 | this.duration = context.get().getResources(). 33 | getInteger(android.R.integer.config_mediumAnimTime); 34 | } 35 | 36 | /** 37 | * 38 | * @param view 39 | * @param endHeight 40 | * @return 41 | */ 42 | public Animator buildResizeBottomAnimator(@NonNull View view, @NonNull int endHeight) { 43 | Animator animator = ObjectAnimator.ofInt(view, BOTTOM, endHeight); 44 | animator.setDuration(duration); 45 | return animator; 46 | } 47 | /** 48 | * 49 | * @param view 50 | * @param endHeight 51 | * @return 52 | */ 53 | public Animator buildResizeTopAnimator(@NonNull View view, @NonNull int endHeight) { 54 | Animator animator = ObjectAnimator.ofInt(view, TOP, endHeight); 55 | animator.setDuration(duration); 56 | return animator; 57 | } 58 | 59 | /** 60 | * 61 | * @param view 62 | * @param startY 63 | * @param endY 64 | * @return 65 | */ 66 | public Animator buildTranslationAnimator(@NonNull View view, @NonNull float startY, 67 | @NonNull float endY) { 68 | Animator animator = ObjectAnimator.ofFloat(view, TRANSLATION_Y, startY, endY); 69 | animator.setDuration(duration); 70 | return animator; 71 | } 72 | 73 | /** 74 | * 75 | * @param colorFrom 76 | * @param colorTo 77 | * @return 78 | */ 79 | private ValueAnimator buildColorTransitionAnimator(@NonNull int colorFrom, @NonNull int colorTo) { 80 | ValueAnimator animator = ValueAnimator.ofObject(new ArgbEvaluator(), colorFrom, colorTo); 81 | animator.setDuration(duration); 82 | return animator; 83 | } 84 | 85 | /** 86 | * 87 | * @param view 88 | * @param endAlpha 89 | * @param startAlpha 90 | * @return 91 | */ 92 | public Animator buildAlphaAnimator(View view, float startAlpha, float endAlpha) { 93 | Animator animator = ObjectAnimator.ofFloat(view, ALPHA, startAlpha, endAlpha); 94 | animator.setDuration(duration); 95 | return animator; 96 | } 97 | 98 | /** 99 | * 100 | * @param view 101 | * @param expanding 102 | * @return 103 | */ 104 | public Animator getHideAnimator( View view, boolean expanding) { 105 | int start = expanding ? 1 : 0; 106 | int end = expanding ? 0 : 1; 107 | return buildAlphaAnimator(view, start, end); 108 | } 109 | /** 110 | * 111 | * @param colorFrom 112 | * @param colorTo 113 | * @param expanding 114 | * @return 115 | */ 116 | public ValueAnimator getColorTransitionAnimator(int colorFrom, int colorTo, boolean expanding) { 117 | return expanding ? 118 | buildColorTransitionAnimator(colorFrom, colorTo) : 119 | buildColorTransitionAnimator(colorTo, colorFrom); 120 | } 121 | 122 | /** 123 | * 124 | * @param view 125 | * @param marginTop 126 | * @param expanding 127 | * @return 128 | */ 129 | public Animator getTranslationAnimator( View view, int marginTop, boolean expanding) { 130 | int start = expanding ? 0 : -marginTop; 131 | int end = expanding ? -marginTop : 0; 132 | return buildTranslationAnimator(view, start, end); 133 | 134 | } 135 | 136 | /** 137 | * 138 | * @param view 139 | * @param initialViewHeight 140 | * @param marginTop 141 | * @param containerHeight 142 | * @param expanding 143 | * @return 144 | */ 145 | public Animator getResizeBottomAnimator(View view, int initialViewHeight, int marginTop, 146 | int containerHeight, boolean expanding) { 147 | int start = expanding ? 148 | containerHeight + marginTop : 149 | initialViewHeight + marginTop; 150 | return buildResizeBottomAnimator(view, start); 151 | } 152 | 153 | 154 | } 155 | -------------------------------------------------------------------------------- /app/src/main/java/com/application/sample/selectcardviewprototype/app/application/SelectCardviewApplication.java: -------------------------------------------------------------------------------- 1 | package com.application.sample.selectcardviewprototype.app.application; 2 | 3 | import android.app.Application; 4 | 5 | import com.application.sample.selectcardviewprototype.app.R; 6 | import com.flurry.android.FlurryAgent; 7 | 8 | import uk.co.chrisjenx.calligraphy.CalligraphyConfig; 9 | 10 | public class SelectCardviewApplication extends Application { 11 | @Override 12 | public void onCreate() { 13 | super.onCreate(); 14 | CalligraphyConfig.initDefault(new CalligraphyConfig.Builder() 15 | .setDefaultFontPath("fonts/ShadowsIntoLight.ttf") 16 | .setFontAttrId(R.attr.fontPath) 17 | .build() 18 | ); 19 | new FlurryAgent.Builder() 20 | .withLogEnabled(false) 21 | .build(this, getString(R.string.FLURRY_API_KEY)); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/com/application/sample/selectcardviewprototype/app/cardviewAnimator/CardViewAnimator.java: -------------------------------------------------------------------------------- 1 | package com.application.sample.selectcardviewprototype.app.cardviewAnimator; 2 | 3 | public class CardViewAnimator { 4 | public static CardViewAnimator cardViewStrategyRef; 5 | private CardViewAnimatorStrategyInterface strategyRef; 6 | 7 | public static CardViewAnimator getInstance() { 8 | return cardViewStrategyRef == null ? 9 | cardViewStrategyRef = new CardViewAnimator() : 10 | cardViewStrategyRef; 11 | } 12 | 13 | private CardViewAnimator() { 14 | } 15 | 16 | /** 17 | * 18 | * @param ref 19 | */ 20 | public void setStrategy(CardViewAnimatorStrategyInterface ref) { 21 | strategyRef = ref; 22 | } 23 | 24 | /** 25 | * expand animation 26 | * @param position 27 | */ 28 | public void expand(int position) { 29 | strategyRef.expand(position); 30 | } 31 | 32 | /** 33 | * collapse animation 34 | */ 35 | public void collapse() { 36 | strategyRef.collapse(); 37 | } 38 | 39 | 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/com/application/sample/selectcardviewprototype/app/cardviewAnimator/CardViewAnimatorStrategyInterface.java: -------------------------------------------------------------------------------- 1 | package com.application.sample.selectcardviewprototype.app.cardviewAnimator; 2 | 3 | /** 4 | * Created by davide on 14/09/15. 5 | */ 6 | public interface CardViewAnimatorStrategyInterface { 7 | void expand(int position); 8 | void collapse(); 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/java/com/application/sample/selectcardviewprototype/app/fragment/ContactListFragment.java: -------------------------------------------------------------------------------- 1 | package com.application.sample.selectcardviewprototype.app.fragment; 2 | 3 | import android.app.Activity; 4 | import android.app.Dialog; 5 | import android.content.Context; 6 | import android.content.Intent; 7 | import android.os.Bundle; 8 | import android.support.v4.app.Fragment; 9 | import android.support.v7.app.ActionBar; 10 | import android.support.v7.app.AlertDialog; 11 | import android.support.v7.app.AppCompatActivity; 12 | import android.support.v7.widget.LinearLayoutManager; 13 | import android.support.v7.widget.RecyclerView; 14 | import android.util.Log; 15 | import android.view.LayoutInflater; 16 | import android.view.Menu; 17 | import android.view.MenuInflater; 18 | import android.view.MenuItem; 19 | import android.view.View; 20 | import android.view.ViewGroup; 21 | import android.widget.FrameLayout; 22 | 23 | import butterknife.Bind; 24 | import butterknife.ButterKnife; 25 | import com.application.sample.selectcardviewprototype.app.R; 26 | import com.application.sample.selectcardviewprototype.app.SettingsActivity; 27 | import com.application.sample.selectcardviewprototype.app.adapter.RecyclerviewAdapter; 28 | import com.application.sample.selectcardviewprototype.app.singleton.PicassoSingleton; 29 | import com.application.sample.selectcardviewprototype.app.singleton.RetrieveAssetsSingleton; 30 | import com.application.sample.selectcardviewprototype.app.cardviewAnimator.CardViewAnimator; 31 | import com.application.sample.selectcardviewprototype.app.strategies.AppearOverAndExpandStrategy; 32 | import com.application.sample.selectcardviewprototype.app.model.ContactItem; 33 | import com.application.sample.selectcardviewprototype.app.singleton.StatusSingleton; 34 | import com.google.gson.Gson; 35 | import com.google.gson.GsonBuilder; 36 | import com.google.gson.reflect.TypeToken; 37 | 38 | import java.io.IOException; 39 | import java.lang.ref.WeakReference; 40 | import java.lang.reflect.Type; 41 | import java.util.ArrayList; 42 | 43 | public class ContactListFragment extends Fragment 44 | implements OnRestoreRecyclerViewInterface, RecyclerviewAdapter.OnItemSelectedListenerCustom, 45 | PicassoSingleton.PicassoCallbacksInterface { 46 | @Bind(R.id.recyclerViewId) 47 | RecyclerView mRecyclerView; 48 | @Bind(R.id.overlayViewId) 49 | FrameLayout mOverlayView; 50 | 51 | private CardViewAnimator cardBehavior; 52 | private StatusSingleton mStatus; 53 | private RetrieveAssetsSingleton assetsSingleton; 54 | 55 | 56 | @Override 57 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 58 | Bundle savedInstanceState) { 59 | View view = inflater.inflate(R.layout.fragment_main, container, false); 60 | ButterKnife.bind(this, view); 61 | mStatus = StatusSingleton.getInstance(); 62 | assetsSingleton = RetrieveAssetsSingleton.getInstance(new WeakReference(getActivity())); 63 | onInitView(); 64 | return view; 65 | } 66 | 67 | 68 | /** 69 | * init cardview 70 | */ 71 | public void onInitView() { 72 | setHasOptionsMenu(true); 73 | setActionbarTitle(); 74 | initRecyclerView(getData()); 75 | setCardViewAnimator(); 76 | } 77 | 78 | /** 79 | * init actionbar 80 | */ 81 | public void setActionbarTitle() { 82 | ActionBar actionbar = ((AppCompatActivity) getActivity()).getSupportActionBar(); 83 | if (actionbar != null) { 84 | actionbar.setTitle(R.string.app_name); 85 | actionbar.setDisplayHomeAsUpEnabled(false); 86 | actionbar.setDisplayShowHomeEnabled(false); 87 | } 88 | } 89 | 90 | @Override 91 | public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { 92 | inflater.inflate(R.menu.menu_main, menu); 93 | super.onCreateOptionsMenu(menu, inflater); 94 | } 95 | 96 | /** 97 | * 98 | * @param shoppingItems 99 | */ 100 | private void initRecyclerView(ArrayList shoppingItems) { 101 | RecyclerviewAdapter adapter = new RecyclerviewAdapter(shoppingItems, 102 | new WeakReference(this), 103 | new WeakReference(this), 104 | new WeakReference<>(getContext())); 105 | RecyclerView.LayoutManager lm = new LinearLayoutManager(getActivity()); 106 | mRecyclerView.setLayoutManager(lm); 107 | mRecyclerView.setAdapter(adapter); 108 | } 109 | 110 | /** 111 | * 112 | */ 113 | private void setCardViewAnimator() { 114 | cardBehavior = CardViewAnimator.getInstance(); 115 | cardBehavior.setStrategy(new AppearOverAndExpandStrategy(mRecyclerView, 116 | new WeakReference<>(getContext()), 117 | new WeakReference(this), 118 | mOverlayView)); 119 | } 120 | 121 | /** 122 | * 123 | * @return 124 | */ 125 | public ArrayList getData() { 126 | try { 127 | Type listType = new TypeToken>() {}.getType(); 128 | return new Gson().fromJson(assetsSingleton.getJsonDataFromAssets(), 129 | listType); 130 | } catch (IOException e) { 131 | e.printStackTrace(); 132 | } 133 | return null; 134 | } 135 | 136 | @Override 137 | public void onRestoreRecyclerView() { 138 | cardBehavior.collapse(); 139 | } 140 | 141 | @Override 142 | public void destroyBehavior() { 143 | } 144 | 145 | @Override 146 | public void onItemClicked(int selectedPosition) { 147 | if (!mStatus.isSelected()) { 148 | mStatus.setPosition(selectedPosition); 149 | cardBehavior.expand(selectedPosition); 150 | } 151 | } 152 | 153 | @Override 154 | public boolean onOptionsItemSelected(MenuItem item) { 155 | switch (item.getItemId()) { 156 | case R.id.action_settings: 157 | changeActivity(SettingsActivity.class); 158 | return true; 159 | case android.R.id.home: 160 | if (mStatus.isSelected()) { 161 | cardBehavior.collapse(); 162 | } 163 | return true; 164 | } 165 | return super.onOptionsItemSelected(item); 166 | } 167 | 168 | /** 169 | * 170 | * @param activityClass 171 | */ 172 | private void changeActivity(Class activityClass) { 173 | startActivity(new Intent(getActivity(), activityClass)); 174 | } 175 | 176 | @Override 177 | public void onPicassoSuccessCallback() { 178 | } 179 | 180 | @Override 181 | public void onPicassoErrorCallback() { 182 | Log.e("TAG", "error"); 183 | } 184 | } 185 | -------------------------------------------------------------------------------- /app/src/main/java/com/application/sample/selectcardviewprototype/app/fragment/OnRestoreRecyclerViewInterface.java: -------------------------------------------------------------------------------- 1 | package com.application.sample.selectcardviewprototype.app.fragment; 2 | 3 | /** 4 | * Created by davide on 12/09/15. 5 | */ 6 | public interface OnRestoreRecyclerViewInterface { 7 | void onRestoreRecyclerView(); 8 | void destroyBehavior(); 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/java/com/application/sample/selectcardviewprototype/app/fragment/SettingsFragment.java: -------------------------------------------------------------------------------- 1 | package com.application.sample.selectcardviewprototype.app.fragment; 2 | 3 | import android.content.Context; 4 | import android.content.res.Resources; 5 | import android.os.Bundle; 6 | import android.support.v4.app.Fragment; 7 | import android.support.v7.app.ActionBar; 8 | import android.support.v7.app.AppCompatActivity; 9 | import android.support.v7.widget.SwitchCompat; 10 | import android.view.LayoutInflater; 11 | import android.view.Menu; 12 | import android.view.MenuInflater; 13 | import android.view.MenuItem; 14 | import android.view.View; 15 | import android.view.ViewGroup; 16 | import android.widget.Adapter; 17 | import android.widget.ArrayAdapter; 18 | import android.widget.ListView; 19 | import android.widget.TextView; 20 | 21 | import com.application.sample.selectcardviewprototype.app.BuildConfig; 22 | import com.application.sample.selectcardviewprototype.app.R; 23 | import com.application.sample.selectcardviewprototype.app.model.Setting; 24 | import com.google.android.gms.ads.AdView; 25 | 26 | import java.lang.ref.WeakReference; 27 | import java.util.ArrayList; 28 | 29 | import butterknife.Bind; 30 | import butterknife.ButterKnife; 31 | 32 | public class SettingsFragment extends Fragment 33 | implements OnRestoreRecyclerViewInterface { 34 | @Bind(R.id.settingsListViewId) ListView settingsListView; 35 | private static final String SETTINGS_ACTIONBAR_TITLE = "Settings"; 36 | 37 | @Override 38 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 39 | Bundle savedInstanceState) { 40 | View view = inflater.inflate(R.layout.settings_layout, container, false); 41 | ButterKnife.bind(this, view); 42 | onInitView(); 43 | return view; 44 | } 45 | 46 | /** 47 | * 48 | */ 49 | private void onInitView() { 50 | Resources res = getActivity().getResources(); 51 | setHasOptionsMenu(true); 52 | initActionbar(); 53 | ArrayList settingList = new ArrayList(); 54 | settingList.add(new Setting("Author", res.getString(R.string.author))); 55 | settingList.add(new Setting("Contacts", res.getString(R.string.contact_email))); 56 | settingList.add(new Setting("Build version", BuildConfig.VERSION_NAME)); 57 | settingsListView.setAdapter(new SettingsAdapter(getActivity().getApplicationContext(), 58 | R.layout.setting_item, settingList)); 59 | } 60 | 61 | 62 | /** 63 | * 64 | */ 65 | public void initActionbar() { 66 | ActionBar actionBar = ((AppCompatActivity) getActivity()).getSupportActionBar(); 67 | if (actionBar != null) { 68 | actionBar.setDisplayHomeAsUpEnabled(true); 69 | actionBar.setTitle(SETTINGS_ACTIONBAR_TITLE); 70 | } 71 | } 72 | @Override 73 | public void onRestoreRecyclerView() { 74 | } 75 | 76 | @Override 77 | public void destroyBehavior() { 78 | } 79 | 80 | @Override 81 | public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { 82 | inflater.inflate(R.menu.menu_settings, menu); 83 | super.onCreateOptionsMenu(menu, inflater); 84 | } 85 | 86 | @Override 87 | public boolean onOptionsItemSelected(MenuItem item) { 88 | switch (item.getItemId()) { 89 | case android.R.id.home: 90 | getActivity().onBackPressed(); 91 | break; 92 | } 93 | return true; 94 | } 95 | 96 | /** 97 | * array adapter 98 | */ 99 | public class SettingsAdapter extends ArrayAdapter { 100 | private final ArrayList settingList; 101 | 102 | /** 103 | * 104 | * @param context 105 | * @param resource 106 | * @param data 107 | */ 108 | public SettingsAdapter(Context context, int resource, ArrayList data) { 109 | super(context, resource, data); 110 | this.settingList = data; 111 | } 112 | 113 | /** 114 | * 115 | * @param position 116 | * @param convertView 117 | * @param parent 118 | * @return 119 | */ 120 | public View getView(final int position, View convertView, ViewGroup parent) { 121 | Setting settingObj = settingList.get(position); 122 | 123 | if (convertView == null) { 124 | convertView = getActivity().getLayoutInflater().inflate(R.layout.setting_item, parent, false); 125 | } 126 | TextView label = (TextView) convertView.findViewById(R.id.settingLabelTextId); 127 | TextView description = ((TextView) convertView.findViewById(R.id.settingDescriptionTextId)); 128 | 129 | label.setText(settingObj.getLabel()); 130 | description.setVisibility(settingObj.getDescription() == null ? View.GONE : View.VISIBLE); 131 | description.setText(settingObj.getDescription()); 132 | 133 | return convertView; 134 | } 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /app/src/main/java/com/application/sample/selectcardviewprototype/app/model/ContactItem.java: -------------------------------------------------------------------------------- 1 | package com.application.sample.selectcardviewprototype.app.model; 2 | 3 | 4 | public class ContactItem { 5 | // private String name; 6 | // private String surname; 7 | // private final String position; 8 | // private Bitmap thumbnail; 9 | private Name name; 10 | private Location location; 11 | private String id; 12 | private final String gender; 13 | private Picture picture; 14 | private final String phone; 15 | private final String email; 16 | 17 | /** 18 | * 19 | * @param gender 20 | * @param id 21 | * @param picture 22 | * @param name 23 | */ 24 | public ContactItem(String gender, String id, Picture picture, Name name, String phone, 25 | String email, Location location) { 26 | this.gender = gender; 27 | this.id = id; 28 | this.picture = picture; 29 | this.name = name; 30 | this.phone = phone; 31 | this.email = email; 32 | this.location = location; 33 | } 34 | 35 | /** 36 | * 37 | * @return 38 | */ 39 | public String getThumbnail() { 40 | return picture.getLarge(); 41 | } 42 | 43 | /** 44 | * 45 | * @return 46 | */ 47 | public String getName() { 48 | return name.getFirst(); 49 | } 50 | 51 | /** 52 | * 53 | * @return 54 | */ 55 | public String getSurname() { 56 | return name.getLast(); 57 | } 58 | 59 | /** 60 | * 61 | * @return 62 | */ 63 | public String getPosition() { 64 | return location.getFullLocation(); 65 | } 66 | 67 | /** 68 | * 69 | * @return 70 | */ 71 | public String getPhone() { 72 | return phone; 73 | } 74 | 75 | /** 76 | * 77 | * @return 78 | */ 79 | public String getEmail() { 80 | return email; 81 | } 82 | 83 | /** 84 | * 85 | */ 86 | private class Name { 87 | private String title; 88 | private String first; 89 | private String last; 90 | 91 | /** 92 | * 93 | * @param title 94 | * @param first 95 | * @param last 96 | */ 97 | private Name(String title, String first, String last) { 98 | this.title = title; 99 | this.first = first; 100 | this.last = last; 101 | } 102 | 103 | public String getTitle() { 104 | return title; 105 | } 106 | 107 | public String getLast() { 108 | return last; 109 | } 110 | 111 | public String getFirst() { 112 | return first; 113 | } 114 | } 115 | 116 | /** 117 | * 118 | */ 119 | private class Location { 120 | private String street; 121 | private String city; 122 | private String state; 123 | private String postcode; 124 | 125 | private Location(String street, String city, String state, String postcode) { 126 | this.street = street; 127 | this.city = city; 128 | this.state = state; 129 | this.postcode = postcode; 130 | } 131 | 132 | /** 133 | * 134 | * @return 135 | */ 136 | public String getFullLocation() { 137 | return street + " - " + city + " (" + state + ")"; 138 | } 139 | } 140 | 141 | /** 142 | * 143 | */ 144 | private class Picture { 145 | private String large; 146 | private String medium; 147 | private String thumbnail; 148 | 149 | private Picture(String large, String medium, String thumbnail) { 150 | this.large = large; 151 | this.medium = medium; 152 | this.thumbnail = thumbnail; 153 | } 154 | 155 | public String getThumbnail() { 156 | return thumbnail; 157 | } 158 | 159 | public String getMedium() { 160 | return medium; 161 | } 162 | 163 | public String getLarge() { 164 | return large; 165 | } 166 | } 167 | } 168 | -------------------------------------------------------------------------------- /app/src/main/java/com/application/sample/selectcardviewprototype/app/model/Setting.java: -------------------------------------------------------------------------------- 1 | package com.application.sample.selectcardviewprototype.app.model; 2 | 3 | public class Setting { 4 | private String label; 5 | private String description; 6 | 7 | public Setting(String s, String s1) { 8 | this.label = s; 9 | this.description = s1; 10 | } 11 | 12 | public String getLabel() { 13 | return label; 14 | } 15 | 16 | public String getDescription() { 17 | return description; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/application/sample/selectcardviewprototype/app/singleton/PicassoSingleton.java: -------------------------------------------------------------------------------- 1 | package com.application.sample.selectcardviewprototype.app.singleton; 2 | 3 | import android.content.Context; 4 | import android.graphics.Bitmap; 5 | import android.graphics.BitmapShader; 6 | import android.graphics.Canvas; 7 | import android.graphics.Paint; 8 | import android.graphics.drawable.Drawable; 9 | import android.net.Uri; 10 | import android.widget.ImageView; 11 | 12 | import com.squareup.picasso.Callback; 13 | import com.squareup.picasso.Picasso; 14 | import com.squareup.picasso.Transformation; 15 | 16 | import java.lang.ref.WeakReference; 17 | 18 | /** 19 | * Created by davide on 29/04/16. 20 | */ 21 | public class PicassoSingleton implements Callback { 22 | 23 | private static PicassoSingleton instance; 24 | private static WeakReference contextWeakRef; 25 | private static WeakReference listenerWeakRef; 26 | 27 | public static PicassoSingleton getInstance(WeakReference context, 28 | WeakReference listener) { 29 | contextWeakRef = context; 30 | listenerWeakRef = listener; 31 | return instance == null ? instance = new PicassoSingleton() : instance; 32 | } 33 | 34 | private PicassoSingleton() { 35 | } 36 | 37 | /** 38 | * 39 | * @param imageView 40 | * @param photoUrl 41 | */ 42 | public void setPhotoAsync(final ImageView imageView, String photoUrl, Drawable defaultIcon) { 43 | Picasso 44 | .with(contextWeakRef.get()) 45 | .load(photoUrl) 46 | .placeholder(defaultIcon) 47 | .fit() 48 | .centerCrop() 49 | .into(imageView, this); 50 | } 51 | 52 | /** 53 | * 54 | * @param imageView 55 | * @param profilePictUrl 56 | */ 57 | public void setProfilePictureAsync(final ImageView imageView, String profilePictUrl, Drawable defaultIcon) { 58 | Picasso 59 | .with(contextWeakRef.get()) 60 | .load(profilePictUrl) 61 | .transform(new CircleTransform()) 62 | .placeholder(defaultIcon) 63 | .fit() 64 | .centerCrop() 65 | .into(imageView, this); 66 | } 67 | 68 | @Override 69 | public void onSuccess() { 70 | if (listenerWeakRef != null && 71 | listenerWeakRef.get() != null) { 72 | listenerWeakRef.get().onPicassoSuccessCallback(); 73 | } 74 | } 75 | 76 | @Override 77 | public void onError() { 78 | if (listenerWeakRef != null && 79 | listenerWeakRef.get() != null) { 80 | listenerWeakRef.get().onPicassoErrorCallback(); 81 | } 82 | 83 | } 84 | 85 | /** 86 | * picasso callbacks interface 87 | */ 88 | public interface PicassoCallbacksInterface { 89 | void onPicassoSuccessCallback(); 90 | void onPicassoErrorCallback(); 91 | } 92 | 93 | /** 94 | * 95 | */ 96 | public class CircleTransform implements Transformation { 97 | @Override 98 | public Bitmap transform(Bitmap source) { 99 | int size = Math.min(source.getWidth(), source.getHeight()); 100 | 101 | int x = (source.getWidth() - size) / 2; 102 | int y = (source.getHeight() - size) / 2; 103 | 104 | Bitmap squaredBitmap = Bitmap.createBitmap(source, x, y, size, size); 105 | if (squaredBitmap != source) { 106 | source.recycle(); 107 | } 108 | 109 | Bitmap bitmap = Bitmap.createBitmap(size, size, source.getConfig()); 110 | 111 | Canvas canvas = new Canvas(bitmap); 112 | Paint paint = new Paint(); 113 | BitmapShader shader = new BitmapShader(squaredBitmap, 114 | BitmapShader.TileMode.CLAMP, BitmapShader.TileMode.CLAMP); 115 | paint.setShader(shader); 116 | paint.setAntiAlias(true); 117 | 118 | float r = size / 2f; 119 | canvas.drawCircle(r, r, r, paint); 120 | 121 | squaredBitmap.recycle(); 122 | return bitmap; 123 | } 124 | 125 | @Override 126 | public String key() { 127 | return "circle"; 128 | } 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /app/src/main/java/com/application/sample/selectcardviewprototype/app/singleton/RetrieveAssetsSingleton.java: -------------------------------------------------------------------------------- 1 | package com.application.sample.selectcardviewprototype.app.singleton; 2 | 3 | import android.app.Activity; 4 | import android.content.res.AssetManager; 5 | 6 | import java.io.BufferedReader; 7 | import java.io.IOException; 8 | import java.io.InputStreamReader; 9 | import java.lang.ref.WeakReference; 10 | 11 | /** 12 | * Created by davide on 04/11/15. 13 | */ 14 | public class RetrieveAssetsSingleton { 15 | private final WeakReference activity; 16 | private final AssetManager assetManager; 17 | private static RetrieveAssetsSingleton singletonRef; 18 | 19 | /** 20 | * 21 | * @param activity 22 | * @return 23 | */ 24 | public static RetrieveAssetsSingleton getInstance(WeakReference activity) { 25 | return singletonRef == null ? 26 | singletonRef = new RetrieveAssetsSingleton(activity) : 27 | singletonRef; 28 | } 29 | 30 | private RetrieveAssetsSingleton(WeakReference activityWeakReference) { 31 | activity = activityWeakReference; 32 | assetManager = activity.get().getAssets(); 33 | } 34 | 35 | /** 36 | * 37 | * @return 38 | * @throws IOException 39 | */ 40 | public String getJsonDataFromAssets() throws IOException { 41 | String line; 42 | String result = ""; 43 | InputStreamReader is = new InputStreamReader(assetManager.open("data.json")); 44 | BufferedReader bufferedReader = new BufferedReader(is); 45 | while ((line = bufferedReader.readLine()) != null) { 46 | result = result.concat(line); 47 | } 48 | is.close(); 49 | return result.equals("") ? null : result; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /app/src/main/java/com/application/sample/selectcardviewprototype/app/singleton/StatusSingleton.java: -------------------------------------------------------------------------------- 1 | package com.application.sample.selectcardviewprototype.app.singleton; 2 | 3 | import static com.application.sample.selectcardviewprototype.app.singleton.StatusSingleton.StatusEnum.SELECTED; 4 | 5 | /** 6 | * Created by davide on 11/09/15. 7 | */ 8 | public class StatusSingleton { 9 | private static StatusSingleton mInstance; 10 | 11 | public enum StatusEnum { SELECTED, IDLE, NOT_SET }; 12 | private StatusEnum mStatus = StatusEnum.NOT_SET; 13 | private int position; 14 | private StatusSingleton() { 15 | } 16 | 17 | /** 18 | * 19 | * @return 20 | */ 21 | public static StatusSingleton getInstance() { 22 | return mInstance == null ? mInstance = new StatusSingleton() : mInstance; 23 | } 24 | 25 | /** 26 | * 27 | * @return 28 | */ 29 | public StatusEnum getStatus() { 30 | return mStatus; 31 | } 32 | 33 | /** 34 | * 35 | * @param status 36 | */ 37 | public void setStatus(StatusEnum status) { 38 | this.mStatus = status; 39 | } 40 | 41 | /** 42 | * 43 | * @return 44 | */ 45 | public int getPosition() { 46 | return position; 47 | } 48 | 49 | /** 50 | * 51 | * @param position 52 | */ 53 | public void setPosition(int position) { 54 | this.position = position; 55 | } 56 | 57 | /** 58 | * 59 | * @return 60 | */ 61 | public boolean isSelected() { 62 | return mStatus == SELECTED; 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /app/src/main/java/com/application/sample/selectcardviewprototype/app/strategies/AppearOverAndExpandStrategy.java: -------------------------------------------------------------------------------- 1 | package com.application.sample.selectcardviewprototype.app.strategies; 2 | 3 | import android.animation.Animator; 4 | import android.animation.AnimatorSet; 5 | import android.animation.ValueAnimator; 6 | import android.app.Activity; 7 | import android.content.Context; 8 | import android.content.res.TypedArray; 9 | import android.graphics.Color; 10 | import android.graphics.PorterDuff; 11 | import android.os.Build; 12 | import android.support.v4.content.ContextCompat; 13 | import android.support.v7.app.ActionBar; 14 | import android.support.v7.app.AppCompatActivity; 15 | import android.support.v7.widget.CardView; 16 | import android.support.v7.widget.RecyclerView; 17 | import android.util.Log; 18 | import android.util.TypedValue; 19 | import android.view.MotionEvent; 20 | import android.view.View; 21 | import android.widget.FrameLayout; 22 | import android.widget.ImageView; 23 | import android.widget.TextView; 24 | 25 | import com.application.sample.selectcardviewprototype.app.R; 26 | import com.application.sample.selectcardviewprototype.app.adapter.RecyclerviewAdapter; 27 | import com.application.sample.selectcardviewprototype.app.animator.AnimatorBuilder; 28 | import com.application.sample.selectcardviewprototype.app.cardviewAnimator.CardViewAnimatorStrategyInterface; 29 | import com.application.sample.selectcardviewprototype.app.model.ContactItem; 30 | import com.application.sample.selectcardviewprototype.app.singleton.PicassoSingleton; 31 | import com.application.sample.selectcardviewprototype.app.singleton.StatusSingleton; 32 | 33 | import java.lang.ref.WeakReference; 34 | import java.util.ArrayList; 35 | 36 | import static com.application.sample.selectcardviewprototype.app.singleton.StatusSingleton.StatusEnum.NOT_SET; 37 | import static com.application.sample.selectcardviewprototype.app.singleton.StatusSingleton.StatusEnum.SELECTED; 38 | 39 | 40 | public class AppearOverAndExpandStrategy implements CardViewAnimatorStrategyInterface { 41 | private static final long MIN_DELAY = 400; 42 | private static final int CUSTOM_MARGIN_BOTTOM = 600; 43 | private final RecyclerView recyclerView; 44 | private final StatusSingleton status; 45 | private final FrameLayout frameLayout; 46 | private final WeakReference picassoListener; 47 | private final WeakReference context; 48 | private View selectedView; 49 | private AnimatorBuilder animatorBuilder; 50 | private boolean expanding = false; 51 | private int initialHeight; 52 | private AnimatorSet animatorSet; 53 | private Animator translationAnimator; 54 | private Animator alphaAnimator; 55 | private Animator bottomAnimator; 56 | private AnimatorSet animatorSet1; 57 | private Animator bottomAnimatorContent; 58 | private AnimatorSet animatorSet2; 59 | private ValueAnimator alphaFramelayoutAnimator; 60 | private int purpleColor; 61 | private int transparentColor; 62 | 63 | public AppearOverAndExpandStrategy(RecyclerView rv, 64 | WeakReference ctx, 65 | WeakReference listener, 66 | FrameLayout fl) { 67 | context = ctx; 68 | recyclerView = rv; 69 | frameLayout = fl; 70 | status = StatusSingleton.getInstance(); 71 | animatorBuilder = new AnimatorBuilder(new WeakReference<>(context.get().getApplicationContext())); 72 | picassoListener = listener; 73 | purpleColor = ContextCompat.getColor(context.get(), R.color.orange_600); 74 | transparentColor = Color.TRANSPARENT; 75 | 76 | } 77 | 78 | @Override 79 | public void expand(int position) { 80 | expanding = true; 81 | status.setStatus(SELECTED); 82 | selectedView = recyclerView.getLayoutManager().findViewByPosition(position); 83 | initialHeight = selectedView.getHeight(); 84 | ContactItem selectedItem = getSelectedItem(position); 85 | View cardView = initOverLayout(selectedItem); 86 | initAnimator(cardView, expanding); 87 | recyclerView.setOnTouchListener(scrollListenerRecyclerView); 88 | 89 | } 90 | 91 | @Override 92 | public void collapse() { 93 | expanding = false; 94 | status.setStatus(NOT_SET); 95 | View cardView = getInflatedCardView(); 96 | initAnimator(cardView, expanding); 97 | recyclerView.setOnTouchListener(null); 98 | } 99 | 100 | /** 101 | * @param view 102 | * @param expanding 103 | */ 104 | public void initAnimator(final View view, final boolean expanding) { 105 | showOverLayout(true); 106 | 107 | animatorSet = new AnimatorSet(); 108 | animatorSet1 = new AnimatorSet(); 109 | animatorSet2 = new AnimatorSet(); 110 | translationAnimator = animatorBuilder.getTranslationAnimator(view, 111 | getMarginTop(), expanding); 112 | bottomAnimator = animatorBuilder.getResizeBottomAnimator(view, initialHeight, 113 | getMarginTop(), recyclerView.getHeight() - CUSTOM_MARGIN_BOTTOM, expanding); 114 | bottomAnimatorContent = animatorBuilder 115 | .getResizeBottomAnimator(view.findViewById(R.id.mainContentViewId), initialHeight, 116 | getMarginTop(), recyclerView.getHeight(), expanding); 117 | alphaAnimator = animatorBuilder.getHideAnimator(recyclerView, expanding); 118 | alphaFramelayoutAnimator = animatorBuilder.getColorTransitionAnimator(transparentColor, 119 | purpleColor, expanding); 120 | 121 | buildAnimatorSet(expanding); 122 | animatorSet1.start(); 123 | } 124 | 125 | /** 126 | * 127 | * @param expanding 128 | */ 129 | private boolean buildAnimatorSet(boolean expanding) { 130 | return expanding ? onExpanding() : onCollapsing(); 131 | } 132 | 133 | /** 134 | * 135 | */ 136 | public boolean onExpanding() { 137 | animatorSet.playTogether(alphaAnimator, translationAnimator); 138 | animatorSet2.playTogether(bottomAnimator, bottomAnimatorContent); 139 | animatorSet1.play(animatorSet).before(animatorSet2).before(alphaFramelayoutAnimator); 140 | animatorSet1.addListener(new Animator.AnimatorListener() { 141 | @Override 142 | public void onAnimationStart(Animator animation) { 143 | setActionBar(true); 144 | } 145 | 146 | @Override 147 | public void onAnimationEnd(Animator animation) { 148 | initCardviewContentAnimation(); 149 | } 150 | 151 | @Override 152 | public void onAnimationCancel(Animator animation) { 153 | 154 | } 155 | 156 | @Override 157 | public void onAnimationRepeat(Animator animation) { 158 | 159 | } 160 | }); 161 | alphaFramelayoutAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { 162 | @Override 163 | public void onAnimationUpdate(ValueAnimator animation) { 164 | Integer color = (Integer) animation.getAnimatedValue(); 165 | frameLayout.setBackgroundColor(color); 166 | } 167 | }); 168 | return true; 169 | } 170 | 171 | /** 172 | * @return 173 | */ 174 | private void initCardviewContentAnimation() { 175 | AnimatorSet animatorSet = new AnimatorSet(); 176 | animatorSet.playSequentially(getCardviewContentAnimatorArray()); 177 | animatorSet.start(); 178 | } 179 | 180 | 181 | /** 182 | * 183 | * @return 184 | */ 185 | public boolean onCollapsing() { 186 | alphaAnimator.setStartDelay(MIN_DELAY); 187 | animatorSet.play(translationAnimator); 188 | animatorSet1.play(animatorSet).before(bottomAnimator).before(alphaAnimator).before(alphaFramelayoutAnimator); 189 | animatorSet1.addListener(new Animator.AnimatorListener() { 190 | @Override 191 | public void onAnimationStart(Animator animation) { 192 | setActionBar(false); 193 | } 194 | 195 | @Override 196 | public void onAnimationEnd(Animator animation) { 197 | showOverLayout(false); 198 | } 199 | 200 | @Override 201 | public void onAnimationCancel(Animator animation) { 202 | } 203 | 204 | @Override 205 | public void onAnimationRepeat(Animator animation) { 206 | } 207 | }); 208 | alphaFramelayoutAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { 209 | @Override 210 | public void onAnimationUpdate(ValueAnimator animation) { 211 | Integer color = (Integer) animation.getAnimatedValue(); 212 | frameLayout.setBackgroundColor(color); 213 | } 214 | }); 215 | return true; 216 | } 217 | /** 218 | * 219 | * @param selectedItem 220 | */ 221 | private View initOverLayout(ContactItem selectedItem) { 222 | View cardView = inflateCardView(); 223 | initCardView(cardView, selectedItem, getMarginTop()); 224 | return cardView; 225 | } 226 | 227 | /** 228 | * 229 | * @return 230 | */ 231 | private View inflateCardView() { 232 | View view = ((Activity )context.get()).getLayoutInflater().inflate(R.layout.contact_item_row, 233 | frameLayout); 234 | updateContentDescription(view); 235 | return view.findViewById(R.id.mainViewId); 236 | } 237 | 238 | /** 239 | * 240 | * @return 241 | * @param selectedItem 242 | */ 243 | private void initCardView(View view, ContactItem selectedItem, int oldMarginTop) { 244 | CardView.LayoutParams lp = (CardView.LayoutParams) view.getLayoutParams(); 245 | lp.setMargins(0, oldMarginTop, 0, 0); 246 | view.setLayoutParams(lp); 247 | ((TextView) view.findViewById(R.id.nameTextViewId)) 248 | .setText(selectedItem.getName()); 249 | ((TextView) view.findViewById(R.id.surnameTextViewId)) 250 | .setText(selectedItem.getSurname()); 251 | 252 | //update description view 253 | initDescriptionView(view, selectedItem); 254 | } 255 | 256 | /** 257 | * 258 | * @param view 259 | * @param selectedItem 260 | */ 261 | private void initDescriptionView(View view, ContactItem selectedItem) { 262 | setPhoneView((TextView) view.findViewById(R.id.phoneTextId), 263 | selectedItem.getPhone()); 264 | setEmailView((TextView) view.findViewById(R.id.emailTextId), 265 | selectedItem.getEmail()); 266 | setPositionView((TextView) view.findViewById(R.id.positionTextId), 267 | selectedItem.getPosition()); 268 | } 269 | /** 270 | * 271 | * @param view 272 | * @param phone 273 | */ 274 | private void setPhoneView(TextView view, String phone) { 275 | if (phone == null) { 276 | ((View) view.getParent().getParent()).setVisibility(View.GONE); 277 | return; 278 | } 279 | 280 | view.setText(phone); 281 | } 282 | 283 | /** 284 | * 285 | * @param view 286 | * @param email 287 | */ 288 | private void setEmailView(TextView view, String email) { 289 | if (email == null) { 290 | ((View) view.getParent().getParent()).setVisibility(View.GONE); 291 | return; 292 | } 293 | 294 | view.setText(email); 295 | } 296 | 297 | /** 298 | * 299 | * @param view 300 | * @param position 301 | */ 302 | private void setPositionView(TextView view, String position) { 303 | if (position == null) { 304 | ((View) view.getParent().getParent()).setVisibility(View.GONE); 305 | return; 306 | } 307 | 308 | view.setText(position); 309 | } 310 | 311 | /** 312 | * 313 | * @return 314 | */ 315 | private void updateContentDescription(final View view) { 316 | setColorFilterToDrawable(((ImageView) view.findViewById(R.id.phoneImageId)), 317 | R.color.green_400); 318 | setColorFilterToDrawable(((ImageView) view.findViewById(R.id.emailImageId)), 319 | R.color.pink_400); 320 | setColorFilterToDrawable(((ImageView) view.findViewById(R.id.positionImageId)), 321 | R.color.blue_grey_600); 322 | } 323 | 324 | /** 325 | * 326 | * @param view 327 | * @param colorId 328 | */ 329 | private void setColorFilterToDrawable(ImageView view, int colorId) { 330 | int color = ContextCompat.getColor(context.get(), colorId); 331 | view.getDrawable().setColorFilter(color, PorterDuff.Mode.SRC_ATOP); 332 | } 333 | 334 | /** 335 | * get selected item by pos 336 | * @param position 337 | * @return 338 | */ 339 | private ContactItem getSelectedItem(int position) { 340 | return ((RecyclerviewAdapter) recyclerView.getAdapter()) 341 | .getAllItems().get(position); 342 | } 343 | 344 | /** 345 | * get selected item margin top on recycler view 346 | * @return 347 | */ 348 | public int getMarginTop() { 349 | int offset = 0; 350 | return getSelectedViewPosition() - getRecyclerViewPosition() + offset; 351 | } 352 | 353 | /** 354 | * 355 | * @return 356 | */ 357 | public View getInflatedCardView() { 358 | return frameLayout.getChildAt(0); 359 | } 360 | 361 | /** 362 | * 363 | * @return 364 | */ 365 | public int getSelectedViewPosition() { 366 | if (selectedView == null) { 367 | return 0; 368 | } 369 | 370 | int[] positionArray = new int[2]; 371 | selectedView.getLocationInWindow(positionArray); 372 | int y = positionArray[1]; 373 | return y; 374 | } 375 | 376 | /** 377 | * 378 | * @return 379 | */ 380 | public int getRecyclerViewPosition() { 381 | int[] positionArray = new int[2]; 382 | recyclerView.getLocationInWindow(positionArray); 383 | int rvY = positionArray[1]; 384 | return rvY; 385 | } 386 | 387 | /** 388 | * 389 | * @param isShowing 390 | */ 391 | private void showOverLayout(boolean isShowing) { 392 | frameLayout.setVisibility(isShowing ? View.VISIBLE : View.GONE); 393 | if (!isShowing) { 394 | frameLayout.removeAllViews(); 395 | } 396 | } 397 | 398 | /** 399 | * set actionBar 400 | * @param isExpanding 401 | */ 402 | private void setActionBar(boolean isExpanding) { 403 | ActionBar actionBar = ((AppCompatActivity) context.get()) 404 | .getSupportActionBar(); 405 | if (actionBar != null) { 406 | actionBar.setDisplayHomeAsUpEnabled(isExpanding); 407 | actionBar.setDisplayShowHomeEnabled(isExpanding); 408 | actionBar.setElevation(isExpanding ? 0 : 20); 409 | actionBar.setTitle(isExpanding ? R.string.account_details : R.string.app_name); 410 | } 411 | } 412 | 413 | /** 414 | * 415 | * @return 416 | */ 417 | public View[] getCardviewDescriptionViewArray() { 418 | return new View[] { 419 | getInflatedCardView().findViewById(R.id.phoneLayoutId), 420 | getInflatedCardView().findViewById(R.id.emailLayoutId), 421 | getInflatedCardView().findViewById(R.id.positionLayoutId), 422 | }; 423 | } 424 | 425 | /** 426 | * description or content animator 427 | * @return 428 | */ 429 | public ArrayList getCardviewContentAnimatorArray() { 430 | View[] viewArray = getCardviewDescriptionViewArray(); 431 | ArrayList alphaAnimatorArrayList = new ArrayList<>(); 432 | for (View view: viewArray) { 433 | if (view.getVisibility() == View.VISIBLE) { 434 | alphaAnimatorArrayList.add(animatorBuilder.getHideAnimator(view, !expanding)); 435 | } 436 | } 437 | return alphaAnimatorArrayList; 438 | } 439 | 440 | /** 441 | * TODO crash down (resource not found) 442 | * @return 443 | */ 444 | public int getPrimaryColor() { 445 | TypedArray typedArray = context.get().getTheme().obtainStyledAttributes(new int[] { R.attr.colorPrimary }); 446 | int color = typedArray.getColor(0, Color.BLACK); 447 | typedArray.recycle(); 448 | return color; 449 | } 450 | 451 | /** 452 | * 453 | */ 454 | View.OnTouchListener scrollListenerRecyclerView = new View.OnTouchListener() { 455 | @Override 456 | public boolean onTouch(View view, MotionEvent motionEvent) { 457 | return true; 458 | } 459 | }; 460 | } 461 | -------------------------------------------------------------------------------- /app/src/main/java/com/application/sample/selectcardviewprototype/app/utils/ConnectivityUtils.java: -------------------------------------------------------------------------------- 1 | package com.application.sample.selectcardviewprototype.app.utils; 2 | 3 | import android.content.Context; 4 | import android.net.ConnectivityManager; 5 | import android.net.NetworkInfo; 6 | 7 | import java.lang.ref.WeakReference; 8 | 9 | 10 | public class ConnectivityUtils { 11 | /** 12 | * 13 | * @param contextWeakReference 14 | * @return 15 | */ 16 | public static boolean isConnected(WeakReference contextWeakReference) { 17 | ConnectivityManager connectivityManager = (ConnectivityManager) contextWeakReference.get() 18 | .getSystemService(Context.CONNECTIVITY_SERVICE); 19 | NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo(); 20 | return networkInfo != null && 21 | networkInfo.isConnectedOrConnecting(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadoz/SelectCardViewPrototype/227699410cc0a4d8b6ef6d16d035a633f7c039bd/app/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadoz/SelectCardViewPrototype/227699410cc0a4d8b6ef6d16d035a633f7c039bd/app/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_email_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadoz/SelectCardViewPrototype/227699410cc0a4d8b6ef6d16d035a633f7c039bd/app/src/main/res/drawable-xhdpi/ic_email_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadoz/SelectCardViewPrototype/227699410cc0a4d8b6ef6d16d035a633f7c039bd/app/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_person_pin_circle_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadoz/SelectCardViewPrototype/227699410cc0a4d8b6ef6d16d035a633f7c039bd/app/src/main/res/drawable-xhdpi/ic_person_pin_circle_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_phone_in_talk_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadoz/SelectCardViewPrototype/227699410cc0a4d8b6ef6d16d035a633f7c039bd/app/src/main/res/drawable-xhdpi/ic_phone_in_talk_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_query_builder_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadoz/SelectCardViewPrototype/227699410cc0a4d8b6ef6d16d035a633f7c039bd/app/src/main/res/drawable-xhdpi/ic_query_builder_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_room_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadoz/SelectCardViewPrototype/227699410cc0a4d8b6ef6d16d035a633f7c039bd/app/src/main/res/drawable-xhdpi/ic_room_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadoz/SelectCardViewPrototype/227699410cc0a4d8b6ef6d16d035a633f7c039bd/app/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadoz/SelectCardViewPrototype/227699410cc0a4d8b6ef6d16d035a633f7c039bd/app/src/main/res/drawable-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/layout/contact_item_row.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 17 | 24 | 32 | 39 | 46 | 47 | 48 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /app/src/main/res/layout/email_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 16 | 22 | 23 | 30 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_main.xml: -------------------------------------------------------------------------------- 1 | 8 | 13 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/layout/phone_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 14 | 20 | 21 | 28 | 35 | 36 | -------------------------------------------------------------------------------- /app/src/main/res/layout/position_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 16 | 22 | 23 | 32 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /app/src/main/res/layout/setting_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 14 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/layout/settings_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 5 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/color.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFEBEE 4 | #FFCDD2 5 | #EF9A9A 6 | #E57373 7 | #EF5350 8 | #F44336 9 | #E53935 10 | #D32F2F 11 | #C62828 12 | #B71C1C 13 | #FF8A80 14 | #FF5252 15 | #FF1744 16 | #D50000 17 | 18 | #EDE7F6 19 | #D1C4E9 20 | #B39DDB 21 | #9575CD 22 | #7E57C2 23 | #673AB7 24 | #5E35B1 25 | #512DA8 26 | #4527A0 27 | #311B92 28 | #B388FF 29 | #7C4DFF 30 | #651FFF 31 | #6200EA 32 | 33 | #E1F5FE 34 | #B3E5FC 35 | #81D4FA 36 | #4FC3F7 37 | #29B6F6 38 | #03A9F4 39 | #039BE5 40 | #0288D1 41 | #0277BD 42 | #01579B 43 | #80D8FF 44 | #40C4FF 45 | #00B0FF 46 | #0091EA 47 | 48 | #E8F5E9 49 | #C8E6C9 50 | #A5D6A7 51 | #81C784 52 | #66BB6A 53 | #4CAF50 54 | #43A047 55 | #388E3C 56 | #2E7D32 57 | #1B5E20 58 | #B9F6CA 59 | #69F0AE 60 | #00E676 61 | #00C853 62 | 63 | #FFFDE7 64 | #FFF9C4 65 | #FFF59D 66 | #FFF176 67 | #FFEE58 68 | #FFEB3B 69 | #FDD835 70 | #FBC02D 71 | #F9A825 72 | #F57F17 73 | #FFFF8D 74 | #FFFF00 75 | #FFEA00 76 | #FFD600 77 | 78 | #FBE9E7 79 | #FFCCBC 80 | #FFAB91 81 | #FF8A65 82 | #FF7043 83 | #FF5722 84 | #F4511E 85 | #E64A19 86 | #D84315 87 | #BF360C 88 | #FF9E80 89 | #FF6E40 90 | #FF3D00 91 | #DD2C00 92 | 93 | #ECEFF1 94 | #CFD8DC 95 | #B0BEC5 96 | #90A4AE 97 | #78909C 98 | #607D8B 99 | #546E7A 100 | #455A64 101 | #37474F 102 | #263238 103 | 104 | #FCE4EC 105 | #F8BBD0 106 | #F48FB1 107 | #F06292 108 | #EC407A 109 | #E91E63 110 | #D81B60 111 | #C2185B 112 | #AD1457 113 | #880E4F 114 | #FF80AB 115 | #FF4081 116 | #F50057 117 | #C51162 118 | 119 | #E8EAF6 120 | #C5CAE9 121 | #9FA8DA 122 | #7986CB 123 | #5C6BC0 124 | #3F51B5 125 | #3949AB 126 | #303F9F 127 | #283593 128 | #1A237E 129 | #8C9EFF 130 | #536DFE 131 | #3D5AFE 132 | #304FFE 133 | 134 | #E0F7FA 135 | #B2EBF2 136 | #80DEEA 137 | #4DD0E1 138 | #26C6DA 139 | #00BCD4 140 | #00ACC1 141 | #0097A7 142 | #00838F 143 | #006064 144 | #84FFFF 145 | #18FFFF 146 | #00E5FF 147 | #00B8D4 148 | 149 | #F1F8E9 150 | #DCEDC8 151 | #C5E1A5 152 | #AED581 153 | #9CCC65 154 | #8BC34A 155 | #7CB342 156 | #689F38 157 | #558B2F 158 | #33691E 159 | #CCFF90 160 | #B2FF59 161 | #76FF03 162 | #64DD17 163 | 164 | #FFF8E1 165 | #FFECB3 166 | #FFE082 167 | #FFD54F 168 | #FFCA28 169 | #FFC107 170 | #FFB300 171 | #FFA000 172 | #FF8F00 173 | #FF6F00 174 | #FFE57F 175 | #FFD740 176 | #FFC400 177 | #FFAB00 178 | 179 | #EFEBE9 180 | #D7CCC8 181 | #BCAAA4 182 | #A1887F 183 | #8D6E63 184 | #795548 185 | #6D4C41 186 | #5D4037 187 | #4E342E 188 | #3E2723 189 | 190 | #F3E5F5 191 | #E1BEE7 192 | #CE93D8 193 | #BA68C8 194 | #AB47BC 195 | #9C27B0 196 | #8E24AA 197 | #7B1FA2 198 | #6A1B9A 199 | #4A148C 200 | #EA80FC 201 | #E040FB 202 | #D500F9 203 | #AA00FF 204 | 205 | #E3F2FD 206 | #BBDEFB 207 | #90CAF9 208 | #64B5F6 209 | #42A5F5 210 | #2196F3 211 | #1E88E5 212 | #1976D2 213 | #1565C0 214 | #0D47A1 215 | #82B1FF 216 | #448AFF 217 | #2979FF 218 | #2962FF 219 | 220 | #E0F2F1 221 | #B2DFDB 222 | #80CBC4 223 | #4DB6AC 224 | #26A69A 225 | #009688 226 | #00897B 227 | #00796B 228 | #00695C 229 | #004D40 230 | #A7FFEB 231 | #64FFDA 232 | #1DE9B6 233 | #00BFA5 234 | 235 | #F9FBE7 236 | #F0F4C3 237 | #E6EE9C 238 | #DCE775 239 | #D4E157 240 | #CDDC39 241 | #C0CA33 242 | #AFB42B 243 | #9E9D24 244 | #827717 245 | #F4FF81 246 | #EEFF41 247 | #C6FF00 248 | #AEEA00 249 | 250 | #FFF3E0 251 | #FFE0B2 252 | #FFCC80 253 | #FFB74D 254 | #FFA726 255 | #FF9800 256 | #FB8C00 257 | #F57C00 258 | #EF6C00 259 | #E65100 260 | #FFD180 261 | #FFAB40 262 | #FF9100 263 | #FF6D00 264 | 265 | #FAFAFA 266 | #F5F5F5 267 | #EEEEEE 268 | #E0E0E0 269 | #BDBDBD 270 | #9E9E9E 271 | #757575 272 | #616161 273 | #424242 274 | #212121 275 | 276 | #ffffff 277 | #000000 278 | 279 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 16dp 6 | 20dp 7 | 4dp 8 | 8dp 9 | 84dp 10 | 60dp 11 | 20dp 12 | 240dp 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CardView Animator Sample 5 | Hello world! 6 | Settings 7 | tunnus.android@gmail.com 8 | Davide LM 9 | Settings 10 | 11 | FB74GZXF6DH74M7CCZQX 12 | ca-app-pub-3777798024824179/5682773043 13 | Account Details 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:2.2.3' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | jcenter() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dadoz/SelectCardViewPrototype/227699410cc0a4d8b6ef6d16d035a633f7c039bd/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Sep 12 20:58:12 CEST 2016 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip 7 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # For Cygwin, ensure paths are in UNIX format before anything is touched. 46 | if $cygwin ; then 47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 48 | fi 49 | 50 | # Attempt to set APP_HOME 51 | # Resolve links: $0 may be a link 52 | PRG="$0" 53 | # Need this for relative symlinks. 54 | while [ -h "$PRG" ] ; do 55 | ls=`ls -ld "$PRG"` 56 | link=`expr "$ls" : '.*-> \(.*\)$'` 57 | if expr "$link" : '/.*' > /dev/null; then 58 | PRG="$link" 59 | else 60 | PRG=`dirname "$PRG"`"/$link" 61 | fi 62 | done 63 | SAVED="`pwd`" 64 | cd "`dirname \"$PRG\"`/" >&- 65 | APP_HOME="`pwd -P`" 66 | cd "$SAVED" >&- 67 | 68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 69 | 70 | # Determine the Java command to use to start the JVM. 71 | if [ -n "$JAVA_HOME" ] ; then 72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 73 | # IBM's JDK on AIX uses strange locations for the executables 74 | JAVACMD="$JAVA_HOME/jre/sh/java" 75 | else 76 | JAVACMD="$JAVA_HOME/bin/java" 77 | fi 78 | if [ ! -x "$JAVACMD" ] ; then 79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 80 | 81 | Please set the JAVA_HOME variable in your environment to match the 82 | location of your Java installation." 83 | fi 84 | else 85 | JAVACMD="java" 86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 87 | 88 | Please set the JAVA_HOME variable in your environment to match the 89 | location of your Java installation." 90 | fi 91 | 92 | # Increase the maximum file descriptors if we can. 93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 94 | MAX_FD_LIMIT=`ulimit -H -n` 95 | if [ $? -eq 0 ] ; then 96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 97 | MAX_FD="$MAX_FD_LIMIT" 98 | fi 99 | ulimit -n $MAX_FD 100 | if [ $? -ne 0 ] ; then 101 | warn "Could not set maximum file descriptor limit: $MAX_FD" 102 | fi 103 | else 104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 105 | fi 106 | fi 107 | 108 | # For Darwin, add options to specify how the application appears in the dock 109 | if $darwin; then 110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 111 | fi 112 | 113 | # For Cygwin, switch paths to Windows format before running java 114 | if $cygwin ; then 115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 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 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 158 | function splitJvmOpts() { 159 | JVM_OPTS=("$@") 160 | } 161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 163 | 164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 165 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | --------------------------------------------------------------------------------