{"id":33147073,"url":"https://github.com/saulmm/Android-L-Preview-Concepts","last_synced_at":"2025-11-16T12:01:02.543Z","repository":{"id":18344585,"uuid":"21524303","full_name":"saulmm/Android-L-Preview-Concepts","owner":"saulmm","description":"This project is focused on the sample using the API's new preview version of Android-L, use of transitions, shadows etc...","archived":false,"fork":false,"pushed_at":"2014-07-06T11:39:00.000Z","size":1067,"stargazers_count":165,"open_issues_count":0,"forks_count":41,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-15T17:47:15.944Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saulmm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-05T17:04:47.000Z","updated_at":"2022-11-10T08:34:16.000Z","dependencies_parsed_at":"2022-07-12T15:14:52.868Z","dependency_job_id":null,"html_url":"https://github.com/saulmm/Android-L-Preview-Concepts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/saulmm/Android-L-Preview-Concepts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saulmm%2FAndroid-L-Preview-Concepts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saulmm%2FAndroid-L-Preview-Concepts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saulmm%2FAndroid-L-Preview-Concepts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saulmm%2FAndroid-L-Preview-Concepts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saulmm","download_url":"https://codeload.github.com/saulmm/Android-L-Preview-Concepts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saulmm%2FAndroid-L-Preview-Concepts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284704131,"owners_count":27049848,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-16T02:00:05.974Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-11-15T13:00:40.327Z","updated_at":"2025-11-16T12:01:02.537Z","avatar_url":"https://github.com/saulmm.png","language":"Java","funding_links":[],"categories":["Libs","\u003ca name=\"Showcase\"\u003eShowcase\u003c/a\u003e"],"sub_categories":["\u003cA NAME=\"Demo\"\u003e\u003c/A\u003eDemo","Personal Blog"],"readme":"Android L preview example\n=========================\n\n### Description\n\nThis project is focused on the sample using the API's new preview version of Android-L, use of transitions, shadows etc...,\n\n![Alt text](https://googledrive.com/host/0B62SZ3WRM2R2VHJFNk1JOWNCbHM)\n\n\n### UI\n\nThis app is aimed to use the new Material Design released at the Google I/0 14, to use the `Material` theme on your app, you only \nhave to set the parent of your app style to `@android:style/Theme.Material` or `@android:style/Theme.Material.Light` and `@android:style/Theme.Material.DarkActionBar`.\n\n#### Customize the Color Palette of your app\n\nIn the `theme.xml` of the `MainActivity`:\n\n```xml\n    \u003c!-- App colors --\u003e\n    \u003ccolor name=\"lollipop_theme_default_primary\"\u003e#3F51B5\u003c/color\u003e\n    \u003ccolor name=\"lollipop_theme_default_primary_dark\"\u003e#303F9F\u003c/color\u003e\n    \u003ccolor name=\"lollipop_theme_default_accent\"\u003e#C5CAE9\u003c/color\u003e\n    \u003ccolor name=\"fab_color\"\u003e#FF4081\u003c/color\u003e\n\n\n    \u003c!-- Main theme colors --\u003e\n    \u003cstyle name=\"MainLollipopTheme\" parent=\"android:Theme.Material.Light\"\u003e\n        \u003citem name=\"android:colorPrimary\"\u003e@color/lollipop_theme_default_primary\u003c/item\u003e\n        \u003citem name=\"android:colorPrimaryDark\"\u003e@color/lollipop_theme_default_primary\u003c/item\u003e\n        \u003citem name=\"android:statusBarColor\"\u003e@color/lollipop_theme_default_primary_dark\u003c/item\u003e\n        \u003citem name=\"android:colorAccent\"\u003e@color/lollipop_theme_default_accent\u003c/item\u003e\n        \u003citem name=\"android:colorControlHighlight\"\u003e@color/lollipop_theme_default_accent\u003c/item\u003e\n        \u003citem name=\"android:navigationBarColor\"\u003e@color/lollipop_theme_default_primary\u003c/item\u003e\n\n        \u003c!-- Main theme action bar--\u003e\n        \u003citem name=\"android:actionBarStyle\"\u003e@style/MainActionBar\u003c/item\u003e\n        \u003citem name=\"android:actionBarTheme\"\u003e@style/MainActionBarThemeOverlay\u003c/item\u003e\n\n\n        \u003c!-- lag indicating whether this window requests that content changes be performed\n             as scene changes with transitions --\u003e\n        \u003citem name=\"android:windowContentTransitions\"\u003etrue\u003c/item\u003e\n\n        \u003c!-- Flag indicating whether this Window's transition should overlap with\n             the exiting transition of the calling Activity. --\u003e\n        \u003citem name=\"android:windowAllowEnterTransitionOverlap\"\u003etrue\u003c/item\u003e\n\n        \u003c!--Flag indicating whether this Window's transition should overlap with\n             the exiting transition of the called Activity when the called Activity\n             finishes. --\u003e\n        \u003citem name=\"android:windowAllowExitTransitionOverlap\"\u003etrue\u003c/item\u003e\n\n        \u003c!-- Flag indicating whether this window's Action Bar should overlay --\u003e\n        \u003citem name=\"android:windowActionBarOverlay\"\u003efalse\u003c/item\u003e\n\n        \u003c!-- Flag indicating whether this window's Action Bar content should overlay --\u003e\n        \u003citem name=\"android:windowContentOverlay\"\u003e@null\u003c/item\u003e\n    \u003c/style\u003e\n```\n\n[Customizing the material theme](https://camo.githubusercontent.com/898d8cbb7bd0a7b0b06d9fde7f60296fd55ecada/687474703a2f2f646576656c6f7065722e616e64726f69642e636f6d2f707265766965772f6d6174657269616c2f696d616765732f5468656d65436f6c6f72732e706e67) \u003c- \nThis easy picture on [Android Developers](http://developer.android.com/preview/material/theme.html/) explains where are the attributes that of the previous code.\n\n### The FAB Button\n\nAndroid-L introduces a new way to manage view with elevation and shadows, _\"Outlines represent the outer shape of a graphics object and define the ripple area for touch feedback.\"_ [Android Developers](https://developer.android.com/preview/material/views-shadows.html), the `fab` button is defined as a `ImageButton` in the xml:\n\n```xml\n...\n    \u003c!-- fab button --\u003e\n    \u003cImageButton\n        android:id=\"@+id/fab\"\n        android:layout_alignParentRight=\"true\"\n        android:layout_alignParentBottom=\"true\"\n        android:layout_width=\"@dimen/fab_size\"\n        android:layout_height=\"@dimen/fab_size\"\n        android:layout_gravity=\"bottom|right\"\n        android:layout_marginRight=\"16dp\"\n        android:layout_marginBottom=\"16dp\"\n        android:background=\"@drawable/fab_ripple\"\n        android:elevation=\"@dimen/button_elevation\"\n        android:onClick=\"onFabClicked\"\n        android:src=\"@drawable/ic_action_add\"/\u003e\n...\n```\n\n```java\n        // Configure the FAB button\n        int size = getResources().getDimensionPixelSize(R.dimen.fab_size);\n        Outline outline = new Outline();\n        outline.setOval(0, 0, size, size);\n        findViewById(R.id.fab).setOutline(outline);\n```\n\n### Activity transitions\n\nNow, with Android-L you can specify custom animations for enter and exit transitions, and for transition of shared elements between activities, to do that, first, you have to enable the window content transitions, in my case, at `themes.xml` you can set this values from java code as well.\n\n\n```xml\n    \u003cstyle name=\"MainLollipopTheme\" parent=\"android:Theme.Material.Light\"\u003e\n        ...\n        \u003c!-- lag indicating whether this window requests that content changes be performed\n       as scene changes with transitions --\u003e\n        \u003citem name=\"android:windowContentTransitions\"\u003etrue\u003c/item\u003e\n\n        \u003c!-- Flag indicating whether this Window's transition should overlap with\n             the exiting transition of the calling Activity. --\u003e\n        \u003citem name=\"android:windowAllowEnterTransitionOverlap\"\u003etrue\u003c/item\u003e\n\n        \u003c!--Flag indicating whether this Window's transition should overlap with\n             the exiting transition of the called Activity when the called Activity\n             finishes. --\u003e\n        \u003citem name=\"android:windowAllowExitTransitionOverlap\"\u003etrue\u003c/item\u003e\n\n        \u003c!-- Flag indicating whether this window's Action Bar should overlay --\u003e\n        \u003citem name=\"android:windowActionBarOverlay\"\u003efalse\u003c/item\u003e\n\n        \u003c!-- Flag indicating whether this window's Action Bar content should overlay --\u003e\n        \u003citem name=\"android:windowContentOverlay\"\u003e@null\u003c/item\u003e\n        ...\n    \u003c/style\u003e\n    \n```\n\n```java\n        // Setup the transition to the detail activity\n        ActivityOptions options =  ActivityOptions.makeSceneTransitionAnimation(MainActivity.this, view, \"photo\" + i);\n        startActivity(detailIntent, options.toBundle());\n```\n\n\n### Tools \u0026 References:\n\n- [Android Studio](https://developer.android.com/sdk/installing/studio.html)\n- [Romain Gui - Google I/O 2014 app] (http://www.curious-creature.org/2014/06/26/google-io-2014-slides-and-demo/)\n- [Gradle Please](http://gradleplease.appspot.com/)\n- [Random User generator api] (http://randomuser.me/)\n- [Gson] (https://code.google.com/p/google-gson/)\n- [Gabriel Mariotti] (https://plus.google.com/u/0/+GabrieleMariotti/posts)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaulmm%2FAndroid-L-Preview-Concepts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaulmm%2FAndroid-L-Preview-Concepts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaulmm%2FAndroid-L-Preview-Concepts/lists"}