a zigzag view for using for ticket or invoice

Overview

ZigzagView

License API Android Arsenal

a zigzag view for using for ticket or invoice

ZigzagView

Setup

Step #1. Add the JitPack repository to root build.gradle file:

allprojects {
    repositories {
	...
	maven { url "https://jitpack.io" }
    }
}

Step #2. Add the dependency

dependencies {
    // old versions
    // implementation 'com.github.beigirad:ZigzagView:VERSION'

    implementation 'ir.beigirad:ZigzagView:VERSION'

}

Implementation

<ir.beigirad.zigzagview.ZigzagView
    android:layout_width="match_parent"
    android:layout_height="240dp"
    app:zigzagBackgroundColor="#8bc34a"
    app:zigzagElevation="8dp"
    app:zigzagHeight="10dp"
    app:zigzagShadowAlpha="0.9"
    app:zigzagSides="top|bottom|right|left"
    app:zigzagPaddingContent="16dp">
    
    // add child view(s)
    
</ir.beigirad.zigzagview.ZigzagView>

Attributes

Attribute Type Default Value Description
zigzagHeight dimension 0dp height of zigzag jags
zigzagElevation dimension 0dp side of shadow
zigzagBackgroundColor color Color.WHITE background color
zigzagPaddingContent dimension 0dp content padding
zigzagPadding dimension 0dp view padding
zigzagPaddingLeft dimension zigzagPadding left side view
zigzagPaddingRight dimension zigzagPadding right side view padding
zigzagPaddingBottom dimension zigzagPadding bottom side view padding
zigzagPaddingTop dimension zigzagPadding top side view padding
zigzagSides enum bottom choosing zigzag sides (top,bottom,right,left)
zigzagShadowAlpha float 0.5 amount of shadow transparency from [0,1.0]

Thanks

Reza Kardoost for helping me out with ZigzagView Shadow/Elevation.

License

Copyright 2018 Farhad Beigirad

Licensed 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.

You might also like...
Implement Text Recognition using MLKit in Jetpack Compose using Kotlin
Implement Text Recognition using MLKit in Jetpack Compose using Kotlin

Implement Text Recognition using MLKit in Jetpack Compose using Kotlin. The application is built using Kotlin Programming Language with Jetpack Compose Navigation.

An E-Commerce android App whose frontend is implemented using Kotlin & XML files and backend/database is implemented using My SQL & PHP files

An E-Commerce android App whose frontend is implemented using Kotlin & XML files and backend/database is implemented using My SQL & PHP files

Tesla App Clone built in Kotlin, using Compose. The project was initially designed by Clinton using Flutter.

Tesla Tesla App Clone built in Kotlin, using Compose. The project was initially designed by Clinton using Flutter. We are keeping this repo as a singl

📱 Android Library to implement Rich, Beautiful, Stylish 😍 Material Navigation View for your project with Material Design Guidelines. Easy to use.
📱 Android Library to implement Rich, Beautiful, Stylish 😍 Material Navigation View for your project with Material Design Guidelines. Easy to use.

Material NavigationView for Android 📱 📱 Android Library to implement Rich, Beautiful Material Navigation View for your project with Material Design

A 2020s compatible React Native keyboard avoiding view for Android and iOS that just works.

react-native-keyboard-shift Example Snack coming soon Until then: Clone this repo: git clone https://github.com/FullStackCraft/react-native-keyboard-s

Simple Android web-view-based application. The primary purpose is to show the website in Kiosk mode.

Kiosk mode app Simple Android web-view-based application. The primary purpose is to show the website in Kiosk mode. By default, the app works in Scree

 ⚡️ A supercharged native Web View for iOS and Android ⚡️
⚡️ A supercharged native Web View for iOS and Android ⚡️

⚡️ A supercharged native Web View for iOS and Android ⚡️ Ionic Portals is a supercharged native Web View component for iOS and Android that lets you a

Scan and view your e-receipts
Scan and view your e-receipts

ReceptsKeeper Scan and view your e-receipts Main features: Display list of receipts sorted by date Adding receipts by scanning Entering a captcha, if

An app to view libraries used in apps in your device.
An app to view libraries used in apps in your device.

An app to view libraries used in apps in your device.

Comments
  • ZigzagView not displayed because it is too large to fit into a software layer

    ZigzagView not displayed because it is too large to fit into a software layer

    Hi @beigirad First things much appreciate your contributors ! When I apply zigzag view with large content, I got the error:

    ZigzagView not displayed because it is too large to fit into a software layer (or drawing cache), needs 9861120 bytes, only 8294400 available

    Thanks your helps !

    opened by HuynhXinh 3
  • No license

    No license

    hi my friend, i notice that you placed Apache 2.0 license tag on this repo, but can't find it in root directory. creating license is so easy, i think you forgot that.

    opened by sinadarvi 1
  • How to make zigzag on left and right?

    How to make zigzag on left and right?

    Hello, mind to ask, how to make the zigzag on left and right side and add a shape circle cut hole on each corner because it only have options at top and bottom side. Thanks

    opened by kampoengboy 0
Releases(1.2.1)
Owner
Farhad BR
A missed identity student
Farhad BR
Patter Lock using Hilt, Coroutines, Flow and Custom View Components based on MVVM architecture.

Pattern Lock App Sample project for created Pattern Lock View using custom view. Preview Usage Step 1 Add the PatterLockView in your XML layout file.

Furkan Özcan 5 Aug 22, 2021
Android App Development using Android Studio Project for The Swastika. It is edit profile view.

Edit_Profile_View Android App Development using Android Studio Project for The Swastika. It is edit profile view. To start with this project first is

Shradha Suryawanshi 1 Jun 12, 2022
TMDbHub - Listing movies using the TMDb API. You can filter results, view details, and save them to a collection

TMDb Hub Listing movies using the TMDb API. You can filter results, view details

David Varga 4 Dec 30, 2021
A blogging mobile application built with Kotlin using MVC design pattern and Take some advantage of Jetpack , View & Data Binding It's a mimic for Tumblr application , But a little prettier than him 😉

A blogging mobile application built with Kotlin using MVC design pattern and Take some advantage of Jetpack , View & Data Binding It's a mimic for Tum

Ahmed Ihab 17 Dec 23, 2022
CMPLR Technologies 8 Apr 5, 2022
A movies application built Using clean architecture and MVVM (Model-view-viewModel).

Movies-App This is a movies application which fecthes upcoming and popular movies from the movie Database(TMBD). It is built Using clean architecture

Felix Kariuki 4 Dec 20, 2022
An App based on MVVM architecture to track & store a user's runs using Google Maps, with options to view & sort the runs as per the user's choice along the with option to run the app in background.

An App based on MVVM architecture to track & store a user's runs using Google Maps, with options to view & sort the runs as per the user's choice along the with option to run the app in background.

Harshit Maheshwari 1 Jun 9, 2022
This Andoird project is about classifying garbage pictures using a CNN-based Tensorflowlite model and fetching location using GPS to mark its area on the map.

Grbage_Detector_And_Locator Description As per some of the recent reports published, in India, the pollution levels are increasing at a colossal pace

Sayantan Banerjee 5 Mar 5, 2022