Kevin-Kip / SquareLayout

Square Layout library for android.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Download

SquareLayout

Square layout for android. It only inherits from ConstraintLayout. I did not see the need to create many for each ViewGroup since it would make the library big and providing many classes you wouldn't use 😃

Table of Contents

  1. Dependencies
  2. Usage
  3. Methods
  4. Contribution
  5. Author
  6. Support
  7. License

Dependencies

Gradle

dependencies {
  implementation 'com.revosleap.squarelayout:squarelayout:1.0.0'
}

Maven

<dependency>
  <groupId>com.revosleap.squarelayout</groupId>
  <artifactId>squarelayout</artifactId>
  <version>1.0.0</version>
  <type>pom</type>
</dependency>

Usage

XML

<com.revosleap.SquareLayout 
    xmlns:android="http://schemas.android.com/apk/res/android"  
    android:layout_width="match_parent"  
    android:layout_height="wrap_content"   
    android:id="@+id/square"
    xmlns:app="http://schemas.android.com/apk/res-auto">  
  
    <ImageView .../>
    <TextView .../>  
  
</com.revosleap.SquareLayout>

Kotlin

val squareLayout = findViewById(R.id.square)
// you can then do anything you'd do with a constraintLayout
SquareLayout squareLayout = (SquareLayout) findViewById(R.id.square)
// you can then do anything you'd do with a constraintLayout

Methods

All the methods provided by the library are:

All the methods provided by ConstraintLayout. 😉

Contribution

  1. Fork
  2. Create feature branch: git checkout -b my-feature-branch
  3. Commit changes: git commit -am 'new awesome feature'
  4. Push to the branch: git push origin my-feature-branch
  5. Submit a pull request

Author

Made with ❤️ by Kevin Kiprotich

Support

Buy Me A Coffee

License

MIT License

Copyright (c) 2018 Kevin Kiprotich

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

About

Square Layout library for android.

License:MIT License


Languages

Language:Kotlin 100.0%