GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — material-components-android/docs/contributing.md at master · FHendro/material-components-android

Expand file tree

/

contributing.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
83 lines (63 loc) · 2.41 KB
/

contributing.md

Copy path

File metadata and controls

83 lines (63 loc) · 2.41 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

General Contributing Guidelines

The Material Components contributing policies and procedures can be found in the main Material Components documentation repository’s contributing page.

To make a contribution, you'll need to be able to build the library from source and run our tests.

Building From Source

Take a look at our instructions on how to build the library from source.

Running Tests

Material Components for Android has JVM tests as well as Emulator tests.

To run the JVM tests, do:

./gradlew test

To run the emulator tests, ensure you have a virtual device set up and do:

./gradlew connectedAndroidTest

Code Conventions

Since we all want to spend more time coding and less time fiddling with whitespace, Material Components for Android uses code conventions and styles to encourage consistency. Code with a consistent style is easier (and less error-prone!) to review, maintain, and understand.

Be consistent

If the style guide is not explicit about a particular situation, the cardinal rule is to be consistent. For example, take a look at the surrounding code and follow its lead, or look for similar cases elsewhere in the codebase.

Java

We follow the Google Java Style Guide.

XML

  • 2 space indentation
  • Resource naming (including IDs) is lowercase_with_underscores
  • Attribute ordering:
    1. xmlns:android
    2. other xmlns:
    3. android:id
    4. style
    5. android:layout_ attributes
    6. android:padding attributes
    7. other android: attributes
    8. app: attributes
    9. tool: attributes

Useful Links

  • Getting Started
  • Building From Source
  • Catalog App
  • Class documentation
  • MDC-Android on Stack Overflow
  • Android Developer’s Guide
  • Material.io
  • Material Design Guidelines
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.