Skip to content

This is a simple library that helps you use all of your classic android widget.Views with an extra attribute, the aspectRatio. You can use aspectRatio byWidth or byHeight.

License

Notifications You must be signed in to change notification settings

ptsiogas4/AspectRatioLayout

Repository files navigation

AspectRatioLayout

This is a simple library that helps you use all of your classic android widget.Views with an extra attribute, the aspectRatio. You can use aspectRatio byWidth or byHeight. If you have any questions or suggestions, please don't hesitate to send me an e-mail, enjoy!

Screenshots

Sample Sample

Building

======================= Fork the repository and include the 'library' module and you are done :) AAR File coming to soon to maven central near you ;)

Or use JitPack: https://jitpack.io/#ptsiogas4/AspectRatioLayout

repositories {
    maven { url 'https://jitpack.io' }
}
    compile 'com.github.ptsiogas4:AspectRatioLayout:1.0.0'

AspectRatioLayout java sample code

RatioLinearLayout ratioLinearLayout = ...
ratioLinearLayout.setAspectRatio(2);

Attributes

Attribute Description
aspectRatio This parameter indicates the proportion of the size Height or Width. Default is Width
ratioType This parameter indicates that the ratio is calculated byWidth Or byHeight. Default is byWidth

Supporting Views

  • RatioLinearLayout
  • RatioFrameLayout
  • RatioRelativeLayout
  • RatioGridLayout
  • RatioImageButton
  • RatioImageView
  • RatioTextView
  • RatioGridView
  • RatioListView
  • RatioButton
  • RatioCheckBox
  • RatioCheckedTextView
  • RatioEditText
  • RatioProgressBar
  • RatioRadioButton
  • RatioRadioGroup

Developed by

ptsiogas - [email protected]

License

Copyright [2017] ptsiogas

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.

About

This is a simple library that helps you use all of your classic android widget.Views with an extra attribute, the aspectRatio. You can use aspectRatio byWidth or byHeight.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages