Works Widget
This project contains basic widget for helping you tackle design problem such as layout with constrained ratio.
ConstrainedFrameLayout
A FrameLayout subclass which allows you to create a width height ratio constrained layout
Figure. 1 - Constrained FrameLayout
Layout examples:
<view
class="works.ConstrainedFrameLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
works:worksRatioHorizontal="integer"
works:worksRatioVertical="integer"
works:worksKeep="width|height"/>
This widget is especially useful for handling ImageView dimension.
Usage
Adding as dependency
Manual
- Download AAR
- Put the AAR in the libs subfolder of your Android project
- If you are using gradle you can use this dependency setting below
compile(name:'works-widget-1.0.4', ext:'aar')
or
Gradle dependency
compile 'com.mobilesolutionworks:works-widget:1.0.4@aar'
Maven dependency
<dependency>
<groupId>com.mobilesolutionworks</groupId>
<artifactId>works-widget</artifactId>
<version>1.0.4</version>
<type>pom</type>
</dependency>