AutoAdjustmentLayout

Android custom view which allows to set a List of Objects (extends of View) that will be placed one-by-one whith auto transfering function on the next line, according to items and parent layout width.

License

License

Categories

Categories

Auto Application Layer Libs Code Generators
GroupId

GroupId

com.github.zhuchinskyi
ArtifactId

ArtifactId

autoadjustmentlayout
Last Version

Last Version

0.1.1
Release Date

Release Date

Type

Type

aar
Description

Description

AutoAdjustmentLayout
Android custom view which allows to set a List of Objects (extends of View) that will be placed one-by-one whith auto transfering function on the next line, according to items and parent layout width.
Project URL

Project URL

https://github.com/zhuchinskyi/AutoAdjustmentLayout
Source Code Management

Source Code Management

https://github.com/zhuchinskyi/AutoAdjustmentLayout

Download autoadjustmentlayout

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.zhuchinskyi/autoadjustmentlayout/ -->
<dependency>
    <groupId>com.github.zhuchinskyi</groupId>
    <artifactId>autoadjustmentlayout</artifactId>
    <version>0.1.1</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/com.github.zhuchinskyi/autoadjustmentlayout/
implementation 'com.github.zhuchinskyi:autoadjustmentlayout:0.1.1'
// https://jarcasting.com/artifacts/com.github.zhuchinskyi/autoadjustmentlayout/
implementation ("com.github.zhuchinskyi:autoadjustmentlayout:0.1.1")
'com.github.zhuchinskyi:autoadjustmentlayout:aar:0.1.1'
<dependency org="com.github.zhuchinskyi" name="autoadjustmentlayout" rev="0.1.1">
  <artifact name="autoadjustmentlayout" type="aar" />
</dependency>
@Grapes(
@Grab(group='com.github.zhuchinskyi', module='autoadjustmentlayout', version='0.1.1')
)
libraryDependencies += "com.github.zhuchinskyi" % "autoadjustmentlayout" % "0.1.1"
[com.github.zhuchinskyi/autoadjustmentlayout "0.1.1"]

Dependencies

compile (1)

Group / Artifact Type Version
com.android.support » appcompat-v7 jar 23.1.0

Project Modules

There are no modules declared in this project.

AutoAdjustmentLayout

Android custom view which allows to set a List of Objects (extends of View) that will be placed one-by-one whith auto transfering function to the next line, according to items and parent layout width.

alt tag

Features:

  • set/add item(s)
  • remove item dynamically
  • receive callbacks (item has been removed & end achived)

Declare in XML:

  <com.compoundview.autoadjustmentlayout.AutoAdjustmentLayout
            android:id="@+id/autoAdjustmentLayout"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"/>

Code:

AutoAdjustmentLayout autoAdjustmentLayout = (AutoAdjustmentLayout) findViewById(R.id.autoAdjustmentView);
autoAdjustmentLayout.setElementList(ArrayList<Object>);
autoAdjustmentLayout.isRemovable(true);

autoAdjustmentLayout.setAutoAdjustmentLayoutListener(new AutoAdjustmentLayout.IOnAutoAdjustmentLayoutListener() {
          @Override
          public void onItemRemoved(View view) {
          
          }
          @Override
          public void onLastItemRemoved(View view) {
          
          }
        });
  }

To append items dynamically:

autoAdjustmentLayout.addElement(Object);
autoAdjustmentLayout.addElementList(ArrayList<Object>);

To remove item dynamically:

autoAdjustmentLayout.removeElement(Object);

Usage

Maven Central

Add this dependency to your Android project in build.gradle:

dependencies {
  compile 'com.example.autoadjustmentlayout:autoadjustmentlayout:1.3'
}

You may also simply grab a JAR or an AAR from Maven Central. Or use it with Maven:

<dependency>
  <groupId>com.example.autoadjustmentlayout</groupId>
  <artifactId>autoadjustmentlayout</artifactId>
  <version>1.3</version>
  <type>pom</type>
</dependency>

Otherwise, you can download library and append as module to your project.

License

 Copyright 2015 Denys Zhuchinskyi

 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.

Versions

Version
0.1.1
0.0.1