Easily adding gaps inside such as Columns and Rows for Jetpack Compose.

Overview

Compose Gap

Easily adding gaps inside such as Columns and Rows for Jetpack Compose.

Inspired by Flutter's Gap.

Introduction

When it comes to add empty space between widgets inside a Column or a Row, we have multiple options:

We can either add a Padding around these widgets but it's very verbose Or we can add Spacer widgets between them. Gap is another option. It's like Spacer but you don't have to know if it's inside a Row or a Column. So that it's less verbose than using a Spacer.

Features

Gradle settings

implementation 'jp.wasabeef:gap:1.1.0'

Then you just have to add a Gap inside a Column or a Row with the specified extent.

  Column {
    Text(text = "Hello")
    Gap(20.dp) // Adds an empty space of 20 dps.
    Text(text = "World")
  }

  Row {
    Text(text = "Hello")
    Gap(20.dp) // Adds an empty space of 20 dps.
    Text(text = "World")
  }

Contributing

Feel free to open a issue or submit a pull request for any bugs/improvements.

Comments
  • Update actions/setup-java action to v2

    Update actions/setup-java action to v2

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | actions/setup-java | action | major | v1 -> v2 |


    Release Notes

    actions/setup-java

    v2

    Compare Source


    Configuration

    📅 Schedule: "before 10am on monday" in timezone Asia/Tokyo.

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    dependencies 
    opened by renovate[bot] 1
  • Update dependency gradle to v7.3.1

    Update dependency gradle to v7.3.1

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Update | Change | |---|---|---| | gradle (source) | minor | 7.2 -> 7.3.1 |


    Release Notes

    gradle/gradle

    v7.3.1

    This is a patch release for Gradle 7.3.

    It fixes the following issues:

    • #​19058 Consider reverting breaking change about test configuration
    • #​19067 Fix multiple annotation processing issues discovered by Micronaut

    We recommend users upgrade to 7.3.1 instead of 7.3.

    Upgrade Instructions

    Switch your build to use Gradle 7.3.1 by updating your wrapper:

    ./gradlew wrapper --gradle-version=7.3.1
    

    See the Gradle 7.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading to Gradle 7.3.1.

    Reporting Problems

    If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines. If you're not sure you're encountering a bug, please use the forum.


    Configuration

    📅 Schedule: "before 10am on monday" in timezone Asia/Tokyo.

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    dependencies 
    opened by renovate[bot] 0
  • Configure Renovate

    Configure Renovate

    WhiteSource Renovate

    Welcome to Renovate! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin.

    🚦 To activate Renovate, merge this Pull Request. To disable Renovate, simply close this Pull Request unmerged.


    Detected Package Files

    • .github/workflows/android-ci.yml (github-actions)
    • .github/workflows/deploy-docs.yml (github-actions)
    • gradle.properties (gradle)
    • build.gradle.kts (gradle)
    • settings.gradle.kts (gradle)
    • buildSrc/build.gradle.kts (gradle)
    • buildSrc/settings.gradle.kts (gradle)
    • buildSrc/src/main/java/detekt-config.gradle.kts (gradle)
    • buildSrc/src/main/java/module-config.gradle.kts (gradle)
    • gap/build.gradle.kts (gradle)
    • sample/build.gradle.kts (gradle)
    • gradle/wrapper/gradle-wrapper.properties (gradle-wrapper)

    Configuration Summary

    Based on the default config's presets, Renovate will:

    • Start dependency updates only once this onboarding PR is merged
    • Enable Renovate Dependency Dashboard creation
    • If semantic commits detected, use semantic commit type fix for dependencies and chore for all others
    • Ignore node_modules, bower_components, vendor and various test/tests directories
    • Autodetect whether to pin dependencies or maintain ranges
    • Rate limit PR creation to a maximum of two per hour
    • Limit to maximum 20 open PRs at any time
    • Group known monorepo packages together
    • Use curated list of recommended non-monorepo package groupings
    • Fix some problems with very old Maven commons versions
    • Ignore spring cloud 1.x releases
    • Ignore http4s digest-based 1.x milestones
    • Use node versioning for @types/node
    • Limit concurrent requests to reduce load on Repology servers until we can fix this properly, see issue 10133

    🔡 Would you like to change the way Renovate is upgrading your dependencies? Simply edit the renovate.json in this branch with your custom config and the list of Pull Requests in the "What to Expect" section below will be updated the next time Renovate runs.


    What to Expect

    With your current configuration, Renovate will create 1 Pull Request:

    chore(deps): update actions/setup-java action to v2
    • Schedule: ["at any time"]
    • Branch name: renovate/actions-setup-java-2.x
    • Merge into: main
    • Upgrade actions/setup-java to v2

    ❓ Got questions? Check out Renovate's Docs, particularly the Getting Started section. If you need any further assistance then you can also request help here.


    This PR has been generated by WhiteSource Renovate. View repository job log here.

    dependencies 
    opened by renovate[bot] 0
  • Update actions/setup-java action to v3

    Update actions/setup-java action to v3

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | actions/setup-java | action | major | v1 -> v3 |


    Release Notes

    actions/setup-java

    v3

    Compare Source

    v2

    Compare Source


    Configuration

    📅 Schedule: Branch creation - "before 10am on monday" in timezone Asia/Tokyo, Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    dependencies 
    opened by renovate[bot] 0
  • Update actions/checkout action to v3

    Update actions/checkout action to v3

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | actions/checkout | action | major | v2 -> v3 |


    Release Notes

    actions/checkout

    v3

    Compare Source


    Configuration

    📅 Schedule: Branch creation - "before 10am on monday" in timezone Asia/Tokyo, Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    dependencies 
    opened by renovate[bot] 0
  • Update actions/cache action to v3

    Update actions/cache action to v3

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | actions/cache | action | major | v2 -> v3 |


    Release Notes

    actions/cache

    v3

    Compare Source


    Configuration

    📅 Schedule: Branch creation - "before 10am on monday" in timezone Asia/Tokyo, Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    dependencies 
    opened by renovate[bot] 0
  • Update plugin de.fayard.refreshVersions to v0.51.0

    Update plugin de.fayard.refreshVersions to v0.51.0

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | de.fayard.refreshVersions | 0.23.0 -> 0.51.0 | age | adoption | passing | confidence |


    Configuration

    📅 Schedule: Branch creation - "before 10am on monday" in timezone Asia/Tokyo, Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    dependencies 
    opened by renovate[bot] 0
  • Update dependency gradle to v7.5.1

    Update dependency gradle to v7.5.1

    Mend Renovate

    This PR contains the following updates:

    | Package | Update | Change | |---|---|---| | gradle (source) | minor | 7.3.1 -> 7.5.1 |


    Release Notes

    gradle/gradle

    v7.5.1: 7.5.1

    This is a patch release for 7.5. We recommend using 7.5.1 instead of 7.5

    Read the Release Notes

    We would like to thank the following community members for their contributions to this release of Gradle: Michael Bailey, Josh Kasten, Marcono1234, mataha, Lieven Vaneeckhaute, kiwi-oss, Stefan Neuhaus, George Thomas, Anja Papatola, Björn Kautler, David Burström, Vladimir Sitnikov, Roland Weisleder, Konstantin Gribov, David Op de Beeck, aSemy, Rene Groeschke, Jonathan Leitschuh, Aurimas Liutikas, Jamie Tanna, Xin Wang, Atsuto Yamashita, Taeik Lim, Peter Gafert, Alex Landau, Jerry Wiltse, Tyler Burke, Matthew Haughton, Filip Daca, Simão Gomes Viana, Vaidotas Valuckas, Edgars Jasmans, Tomasz Godzik, Jeff, Lajos Veres

    Upgrade instructions

    Switch your build to use Gradle 7.5.1 by updating your wrapper:

    ./gradlew wrapper --gradle-version=7.5.1

    See the Gradle 7.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading.

    Reporting Problems

    If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines. If you're not sure you're encountering a bug, please use the forum.

    v7.4.2: 7.4.2

    This is a patch release for Gradle 7.4.

    See the list of fixed issues: https://docs.gradle.org/7.4.2/release-notes.html

    We recommend users upgrade to 7.4.2 instead of 7.4 or another patch release.

    Upgrade Instructions

    Switch your build to use Gradle 7.4.2 by updating your wrapper:

    ./gradlew wrapper --gradle-version=7.4.2
    

    See the Gradle 7.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading to Gradle 7.4.2.

    Reporting Problems

    If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines. If you're not sure you're encountering a bug, please use the forum.

    v7.4.1: 7.4.1

    This is a patch release for Gradle 7.4.

    See the list of fixed issues: https://docs.gradle.org/7.4.1/release-notes.html

    We recommend users upgrade to 7.4.1 instead of 7.4.

    Upgrade Instructions

    Switch your build to use Gradle 7.4.1 by updating your wrapper:

    ./gradlew wrapper --gradle-version=7.4.1
    

    See the Gradle 7.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading to Gradle 7.4.1.

    Reporting Problems

    If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines. If you're not sure you're encountering a bug, please use the forum.

    v7.3.3: 7.3.3

    This is a patch release for Gradle 7.3.

    It fixes the following issues:

    We recommend users upgrade to 7.3.3 instead of 7.3.

    Given the context of the Log4Shell vulnerability, make sure you take a look at our blog post on this topic.

    Upgrade Instructions

    Switch your build to use Gradle 7.3.3 by updating your wrapper:

    ./gradlew wrapper --gradle-version=7.3.3
    

    See the Gradle 7.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading to Gradle 7.3.3.

    Reporting Problems

    If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines. If you're not sure you're encountering a bug, please use the forum.

    v7.3.2: 7.3.2

    This is a patch release for Gradle 7.3.

    It fixes the following issues:

    • #​19300 Mitigations for log4j vulnerability in Gradle builds
    • #​19257 Incremental java compilation fails when renaming classname with $ character

    We recommend users upgrade to 7.3.2 instead of 7.3.

    Given the context of the Log4Shell vulnerability, make sure you take a look at our blog post on this topic.

    Upgrade Instructions

    Switch your build to use Gradle 7.3.2 by updating your wrapper:

    ./gradlew wrapper --gradle-version=7.3.2
    

    See the Gradle 7.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading to Gradle 7.3.2.

    Reporting Problems

    If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines. If you're not sure you're encountering a bug, please use the forum.


    Configuration

    📅 Schedule: Branch creation - "before 10am on monday" in timezone Asia/Tokyo, Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    dependencies 
    opened by renovate[bot] 0
  • Dependency Dashboard

    Dependency Dashboard

    This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

    Awaiting Schedule

    These updates are awaiting their schedule. Click on a checkbox to get an update now.

    • [ ] Lock file maintenance

    Open

    These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

    Detected dependencies

    github-actions
    .github/workflows/android-ci.yml
    • actions/checkout v2
    • gradle/wrapper-validation-action v1
    • actions/setup-java v1
    • actions/cache v2
    .github/workflows/deploy-docs.yml
    • actions/checkout v2
    • gradle/wrapper-validation-action v1
    • actions/setup-java v1
    • actions/cache v2
    gradle
    gradle.properties
    settings.gradle.kts
    • de.fayard.refreshVersions 0.23.0
    build.gradle.kts
    buildSrc/settings.gradle.kts
    • de.fayard.refreshVersions 0.23.0
    buildSrc/build.gradle.kts
    buildSrc/src/main/java/detekt-config.gradle.kts
    buildSrc/src/main/java/module-config.gradle.kts
    gap/build.gradle.kts
    sample/build.gradle.kts
    gradle-wrapper
    gradle/wrapper/gradle-wrapper.properties
    • gradle 7.3.1

    • [ ] Check this box to trigger a request for Renovate to run again on this repository
    opened by renovate[bot] 0
Releases(v1.1.0)
  • v1.1.0(Oct 25, 2021)

    Features

    • Added Modifier parameter to Row and Column Gap.
    Column(modifier = Modifier.width(IntrinsicSize.Min)) {
      Text(text = "Jetpack")
      Gap(20.dp, modifier = Modifier.fillMaxWidth().background(Color.Red))
      Text(text = "Compose")
    }
    
    • Added Gap to LazyRow and LazyColumn.
    LazyColumn {
      item {
        Text(text = "Top")
        Gap(20.dp)
        Text(text = "Bottom")
      }
    }
    
    Source code(tar.gz)
    Source code(zip)
Owner
Daichi Furiya
Google Developers Expert for Android
Daichi Furiya
💻 A cross-platform desktop application to identify libraries used inside an android application. Made possible by Compose Desktop ⚡

?? stackzy A desktop app to analyse APK. Built using Compose desktop ✨ Demo Watch demo ??️ Usage Show usage ?? Install Platform Download Status Linux

theapache64 876 Dec 24, 2022
A simple authentication application using Jetpack compose to illustrate signin and sign up using Mvvm, Kotlin and jetpack compose

Authentication A simple authentication application using Jetpack compose to illustrate signin and sign up using Mvvm, Kotlin and jetpack compose Scree

Felix Kariuki 5 Dec 29, 2022
Compose-navigation - Set of utils to help with integrating Jetpack Compose and Jetpack's Navigation

Jetpack Compose Navigation Set of utils to help with integrating Jetpack Compose

Adam Kobus 5 Apr 5, 2022
Jetpack Compose Boids | Flocking Insect 🐜. bird or Fish simulation using Jetpack Compose Desktop 🚀, using Canvas API 🎨

?? ?? ?? Compose flocking Ants(boids) ?? ?? ?? Jetpack compose Boids | Flocking Insect. bird or Fish simulation using Jetpack Compose Desktop ?? , usi

Chetan Gupta 38 Sep 25, 2022
A collection of animations, compositions, UIs using Jetpack Compose. You can say Jetpack Compose cookbook or play-ground if you want!

Why Not Compose! A collection of animations, compositions, UIs using Jetpack Compose. You can say Jetpack Compose cookbook or play-ground if you want!

Md. Mahmudul Hasan Shohag 186 Jan 1, 2023
Learn Jetpack Compose for Android by Examples. Learn how to use Jetpack Compose for Android App Development. Android’s modern toolkit for building native UI.

Learn Jetpack Compose for Android by Examples. Learn how to use Jetpack Compose for Android App Development. Android’s modern toolkit for building native UI.

MindOrks 382 Jan 5, 2023
This is a sample app(For beginners - App #2) built using Jetpack Compose. It demonstrates the concept of State Hoisting in Jetpack Compose.

JetBMICalculator This is a sample app(For beginners - App #2) built using Jetpack Compose. It demonstrates the concept of State Hoisting in Jetpack Co

BHAVNA THACKER 3 Dec 31, 2022
Jetpack-Compose-Demo - Instagram Profile UI using Jetpack Compose

Jetpack-Compose-Demo Instagram Profile UI using Jetpack Compose

omar 1 Aug 11, 2022
Jetpack-compose-animations-examples - Cool animations implemented with Jetpack compose

Jetpack-compose-animations-examples This repository consists of 4 animations: St

Canopas Software 180 Jan 2, 2023
Jetpack-compose-uis - A collection of some UIs using Jetpack Compose. built using Katalog

Jetpack Compose UIs This is a collection of some UIs using Jetpack Compose. It i

Mori Atsushi 3 Dec 15, 2022
About-icons - Android library to easily give credit if using icons which require attribution

Android About Icons Library About this project Features How to use Planned improvements Screenshots Contribute Apps using this library License About t

Niko Diamadis 4 Nov 6, 2022
An application that i developed with a aim of learning Jetpack compose and many other jetpack libraries

An application that i developed with a aim of learning Jetpack compose and many other jetpack libraries, The application make use of jikan Api which displays a list of animations,there more details and even trailers of the animations.

Odhiambo Brandy 10 Nov 23, 2022
A Kotlin library to use Jetpack Compose in Android and iOS. Allow to write UI for both in Kotin. Still experimental as many compose features are not yet available.

Multiplatform Compose A Kotlin library to use Jetpack Compose in Android and iOS. Allow to write UI for both in Kotin. Still experimental as many comp

Clément Beffa 548 Jan 7, 2023
Jetpack Compose based project, used to stress-testing compose features / integrations and explore non-trivial functionality

Project containing Jetpack Compose samples For pagination & network images it uses CATAAS. Known issues Navigation-Compose Issue with fast tapping on

Denis Rudenko 59 Dec 14, 2022
Luis David Orellana 3 Jun 20, 2022
A Simple Blog App using Jetpack Compose, Flow, Navigation Compose, Room and Firebase

BlogCompose A Simple Blog App using Jetpack Compose, Flow, Navigation Compose, Room and Firebase Instructions Download your Firebase configuration fil

null 4 Oct 10, 2022
📱 WhatsApp clone project demonstrates modern Android development built with Jetpack Compose and Stream Chat SDK for Compose.

This is a WhatsApp clone app built with Jetpack Compose and Stream Chat SDK for Compose. The purpose of this repository is to demonstrate below: Imple

Stream 689 Dec 25, 2022
K5-compose is a sketchy port of p5.js for Jetpack Compose

k5-compose k5-compose is a sketchy port of P5.js for Jetpack Compose Desktop. This library provides you a playground to play with your sketches so you

Nikhil Chaudhari 176 Nov 22, 2022