Convert Figma logo to code with AI

nickbutcher logoplaid

An Android app which provides design news & inspiration as well as being an example of implementing material design.

16,255
3,157
16,255
104

Top Related Projects

Modular and customizable Material Design UI components for Android

21,786

The Google I/O Android App

Render After Effects animations natively on Android and iOS, Web, and React Native

A curated list of awesome Android UI/UX libraries

Official Jetpack Compose samples.

A collection of extension libraries for Jetpack Compose

Quick Overview

Plaid is an open-source Android app that showcases Material Design and serves as a companion to the Android Design in Action video series. It demonstrates the implementation of various Material Design components and patterns, providing developers with practical examples of how to apply these design principles in their own Android applications.

Pros

  • Excellent showcase of Material Design principles and components
  • Provides real-world examples for Android developers to learn from
  • Regularly updated to reflect the latest Material Design guidelines
  • Open-source, allowing developers to explore and contribute to the codebase

Cons

  • Primarily focused on design implementation, may not cover all aspects of Android development
  • Some features may require newer Android versions, limiting compatibility with older devices
  • As a showcase app, it may not be directly usable as a library in other projects
  • Learning curve may be steep for beginners due to advanced design concepts

Code Examples

Here are a few code examples from the Plaid project:

  1. Using Material Components:
class DesignerNewsStory : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_designer_news_story)

        // Using Material Components
        val toolbar = findViewById<Toolbar>(R.id.toolbar)
        setSupportActionBar(toolbar)
        supportActionBar?.setDisplayHomeAsUpEnabled(true)
    }
}
  1. Implementing custom transitions:
class HomeActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_home)

        // Custom transition
        window.enterTransition = TransitionInflater.from(this)
            .inflateTransition(R.transition.home_enter)
    }
}
  1. Using custom views:
class FeedAdapter(
    private val items: List<PlaidItem>,
    private val columns: Int
) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {

    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
        return when (viewType) {
            TYPE_DRIBBBLE_SHOT -> DribbbleShotHolder(
                DribbbleShotView(parent.context).apply {
                    layoutParams = ViewGroup.LayoutParams(
                        ViewGroup.LayoutParams.MATCH_PARENT,
                        ViewGroup.LayoutParams.WRAP_CONTENT
                    )
                }
            )
            // Other view types...
            else -> throw IllegalArgumentException("Unsupported view type: $viewType")
        }
    }
}

Getting Started

To get started with Plaid:

  1. Clone the repository:

    git clone https://github.com/nickbutcher/plaid.git
    
  2. Open the project in Android Studio.

  3. Build and run the app on an emulator or physical device.

  4. Explore the codebase to learn about Material Design implementation and Android development best practices.

Competitor Comparisons

Modular and customizable Material Design UI components for Android

Pros of Material Components for Android

  • Official Google library, ensuring consistency with Material Design guidelines
  • Comprehensive set of pre-built UI components for rapid development
  • Regular updates and maintenance by a dedicated team

Cons of Material Components for Android

  • Less flexibility for custom designs compared to Plaid's approach
  • Steeper learning curve for developers new to Material Design principles
  • Larger library size, potentially impacting app size and performance

Code Comparison

Material Components for Android:

MaterialButton(
    onClick = { /* Handle click */ },
    text = { Text("Click me") },
    modifier = Modifier.padding(16.dp)
)

Plaid:

Button(
    onClick = { /* Handle click */ },
    colors = ButtonDefaults.buttonColors(backgroundColor = plaidColors.primary),
    modifier = Modifier.padding(16.dp)
) {
    Text("Click me")
}

Summary

Material Components for Android offers a robust, officially supported library for implementing Material Design, while Plaid provides a more customizable approach with a focus on design showcase. The choice between the two depends on project requirements, design flexibility needs, and development team preferences.

21,786

The Google I/O Android App

Pros of iosched

  • Official Google I/O app, providing a reference implementation for Google's latest Android development practices
  • Extensive use of Jetpack libraries and Architecture Components
  • Comprehensive testing suite, including unit and integration tests

Cons of iosched

  • Focused solely on Android development, lacking cross-platform support
  • More complex architecture, potentially steeper learning curve for beginners
  • Less frequent updates compared to Plaid

Code Comparison

iosched (Kotlin):

@Composable
fun Schedule(
    sessions: List<Session>,
    onSessionClick: (Session) -> Unit
) {
    LazyColumn {
        items(sessions) { session ->
            SessionItem(session, onSessionClick)
        }
    }
}

Plaid (Java):

@Override
public void bindTo(PlaidItem item, int position) {
    if (!(item instanceof Shot)) return;
    Shot shot = (Shot) item;
    bindImage(shot);
    bindTitle(shot);
    bindDescription(shot);
    bindLikes(shot);
}

Both repositories showcase modern Android development practices, with iosched focusing on Jetpack Compose and Kotlin, while Plaid demonstrates Material Design principles and Java implementation. iosched offers a more comprehensive example of a full-featured app, while Plaid excels in demonstrating beautiful UI design and transitions.

Render After Effects animations natively on Android and iOS, Web, and React Native

Pros of Lottie-Android

  • Focused on animation rendering, providing a powerful and efficient solution for complex animations
  • Extensive documentation and community support, making it easier for developers to integrate and use
  • Cross-platform compatibility, allowing animations to be shared across iOS, Android, and web

Cons of Lottie-Android

  • Limited to animation rendering, while Plaid offers a more comprehensive UI toolkit
  • Requires external tools (like Adobe After Effects) to create animations, adding complexity to the workflow
  • Larger file size and potential performance impact for complex animations

Code Comparison

Lottie-Android:

val animationView = findViewById<LottieAnimationView>(R.id.animation_view)
animationView.setAnimation(R.raw.animation)
animationView.playAnimation()

Plaid:

val transitionManager = TransitionInflater.from(context)
    .inflateTransitionManager(R.transition.grid_transition_manager, grid)
transitionManager.setTransition(R.id.start, R.id.end)
TransitionManager.beginDelayedTransition(grid)

Both repositories offer valuable tools for Android developers, but with different focuses. Lottie-Android excels in animation rendering, while Plaid provides a broader set of UI components and transitions. The choice between them depends on the specific needs of your project.

A curated list of awesome Android UI/UX libraries

Pros of awesome-android-ui

  • Comprehensive collection of UI libraries and resources
  • Regularly updated with new contributions from the community
  • Easy to navigate and find specific UI components or effects

Cons of awesome-android-ui

  • Not a standalone app or library, just a curated list
  • Lacks in-depth examples or implementation details
  • May include outdated or unmaintained libraries

Code comparison

While a direct code comparison isn't relevant due to the nature of these repositories, here's a brief example of how they differ:

awesome-android-ui:

## Animation
* [AndroidViewAnimations](https://github.com/daimajia/AndroidViewAnimations) - Cute view animation collection.
* [AnimationEasingFunctions](https://github.com/daimajia/AnimationEasingFunctions) - Android Animation Easing Functions.

Plaid:

@Composable
fun HomeContent(
    feedState: State<HomeFeedUiState>,
    onSourceClicked: (Source) -> Unit,
    onPostClicked: (Long) -> Unit,
    modifier: Modifier = Modifier
) {
    // Implementation details...
}

awesome-android-ui serves as a directory of UI resources, while Plaid provides a complete implementation of a design news and inspiration app.

Official Jetpack Compose samples.

Pros of compose-samples

  • Focuses specifically on Jetpack Compose, providing a wide range of examples for modern Android UI development
  • Regularly updated with new samples and best practices for Compose
  • Officially maintained by the Android team, ensuring high-quality and up-to-date code

Cons of compose-samples

  • Less comprehensive in terms of overall app architecture compared to Plaid
  • Doesn't showcase integration with traditional Android Views or legacy code
  • May be less suitable for developers looking for a complete app example

Code Comparison

Plaid (XML-based layout):

<androidx.coordinatorlayout.widget.CoordinatorLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <!-- Layout content -->
</androidx.coordinatorlayout.widget.CoordinatorLayout>

compose-samples (Jetpack Compose):

@Composable
fun MainScreen() {
    Scaffold(
        topBar = { /* Top app bar content */ },
        content = { /* Main content */ }
    )
}

Summary

While Plaid offers a comprehensive example of a full-featured Android app using traditional XML layouts and Material Design principles, compose-samples focuses on demonstrating various aspects of Jetpack Compose. Plaid is better suited for developers looking to understand overall app architecture and integration with existing Android components, while compose-samples is ideal for those wanting to learn and implement modern UI development using Compose.

A collection of extension libraries for Jetpack Compose

Pros of Accompanist

  • Focused on Jetpack Compose UI components and utilities
  • Regularly updated and maintained by Google
  • Provides a wide range of composables for common UI patterns

Cons of Accompanist

  • Limited to Jetpack Compose, not as versatile for other Android development approaches
  • Smaller community and fewer third-party contributions compared to Plaid
  • Less comprehensive in terms of full app architecture and design patterns

Code Comparison

Accompanist (SwipeRefresh):

SwipeRefresh(
    state = rememberSwipeRefreshState(isRefreshing),
    onRefresh = { /* refresh logic */ },
) {
    // Content
}

Plaid (Custom refresh indicator):

CustomSwipeRefreshLayout(
    isRefreshing = isRefreshing,
    onRefresh = { /* refresh logic */ },
    indicatorColor = Color.White
) {
    // Content
}

Summary

Accompanist focuses on Jetpack Compose UI components, offering a more specialized toolkit for modern Android development. It benefits from Google's direct involvement and frequent updates. Plaid, on the other hand, provides a more comprehensive example of app architecture and design, showcasing Material Design principles across various Android development approaches. While Accompanist is more current in terms of Compose support, Plaid offers a broader learning resource for Android developers looking to understand full app implementation.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

[ 🚧 Work in progress 👷‍♀️⛏👷🔧️👷🔧 🚧 ] Plaid 2.0

Rewriting Plaid using Android Architecture Components, in Kotlin.

👀 "Up for grabs" issues – We're happy to get your contributions on those!

👍 Comments and new issues created are welcomed.

🛑 We're currently not accepting external PRs that touch on the app's architecture.

CircleCI

Background

Plaid was written with one big goal: showcase material design in Android in a real application. While Plaid successfully achieved its goal, from an architecture point of view, it lacks all features that would make it a modular, scalable, testable and maintainable app: with UI logic in Android classes, no tests and only one module. Plaid represents a great real world app example: it provides a fairly complex set of functionalities, it has technical debt, it has features that have to be dealt with as APIs are being removed. All of these problems are encountered by many projects in the Android community and therefore, make Plaid a suitable showcase for all the advantages that architecture components bring.

More information

Goals

  • Migrate Plaid to Architecture Components. The refactoring will follow the architecture described in Guide to App Architecture.
  • Convert to Kotlin, while migrating to Architecture Components.
  • Modularize the app using dynamic feature modules.
  • Showcase the extensibility of the architecture by adding an extra data source, once the migration is finished.

Non-Goals

Changes to the styles, themes, icons, animations, transitions or any other UI elements that were the initial focus of Plaid, are outside the scope of this refactoring.

Android Studio IDE setup

Plaid requires Android Studio version 3.6 or higher.

Plaid uses ktlint to enforce Kotlin coding styles. Here's how to configure it for use with Android Studio (instructions adapted from the ktlint README):

  • Close Android Studio if it's open

  • Download ktlint using these installation instructions

  • Inside the project root directory run:

    ./ktlint --apply-to-idea-project --android

  • Remove ktlint if desired:

    rm ktlint

  • Start Android Studio


Plaid 1.0

Design news and inspiration.

Plaid is a showcase of material design that we hope you will keep installed. It pulls in news & inspiration from Designer News, Dribbble & Product Hunt. It demonstrates the use of material principles to create tactile, bold, understandable UIs.

Install on Google Play (Beta Testing)

Screenshots

Non-Goals

Plaid is a UI sample and seeks to demonstrate how to implement material design. To make this as clear as possible it explicitly does not attempt to:

  • Provide opinionated architecture/testing advice; it utilizes vanilla Android components. For advice on this, I'd recommend Blueprints.
  • Support pre-Lollipop devices. Doing so is entirely possible, but complicates things. For advice on doing this, see this fork.

License

Copyright 2015 Google LLC.

Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements. See the NOTICE file distributed with this work for
additional information regarding copyright ownership. The ASF licenses this
file to you under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.