Giter Site home page Giter Site logo

nguyenngan / shrine-materialdesign2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from florent37/shrine-materialdesign2

0.0 1.0 0.0 2.62 MB

implementation of Material Design 2 Shrine project

Home Page: https://github.com/florent37/ShapeOfView

License: Apache License 2.0

Kotlin 100.00%

shrine-materialdesign2's Introduction

Shrine-MaterialDesign2

Trying to reproduce some elements of Material Design 2 Shrine project on Android

https://material.io/design/material-studies/shrine.html#about-shrine

shrine_video

About Shrine

The Shrine app provides an online marketplace featuring lifestyle and fashion items from promoted labels. Shrine’s brand aesthetic is modern, elegant, and sophisticated, and is the unifying concept behind the various brands and products showcased.

shrine_info_1

Overlapping sheets

The underlying theme of Shrine’s interaction model is that of three overlapping sheets. The bottom sheet has the navigation and branding elements; the middle sheet has the main content; and the top sheet has the shopping cart. shrine_info_2

Implementation

I used ShapeOfView to allow views to have a custom shape,

https://github.com/florent37/ShapeOfView

implementation 'com.github.florent37:shapeofview:1.0.7'

Here, to remove my view's corners, using CutCornerView

shrine_info_2

Button

shape_button

 <com.github.florent37.shapeofview.shapes.CutCornerView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        
        android:elevation="3dp"
        
        app:shape_cutCorner_bottomLeftSize="12dp"
        app:shape_cutCorner_bottomRightSize="12dp"
        app:shape_cutCorner_topLeftSize="12dp"
        app:shape_cutCorner_topRightSize="12dp">

        <android.support.constraint.ConstraintLayout
            android:id="@+id/addToCart"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@android:color/white"
            android:foreground="?attr/selectableItemBackground">
            
            <ImageView ... />
            
            <TextView ... />

Sheets

sheets

<com.github.florent37.shapeofview.shapes.CutCornerView
    android:id="@+id/middleSheet"
    android:layout_width="0dp"
    android:layout_height="0dp"
    android:layout_marginTop="16dp"
    android:elevation="4dp"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toBottomOf="@+id/menu"
    app:shape_cutCorner_topLeftSize="42dp"
    tools:showIn="@layout/activity_main">

    <android.support.constraint.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@android:color/white">

Fiches Plateau Moto : https://www.fiches-plateau-moto.fr/

shrine-materialdesign2's People

Contributors

florent37 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.