A library that easily allows you to mask layouts/viewgroups

Smooth-E b3a33ac52d Downgrade AndroidX Annotations to version 1.5.0 to prevent duplicated classes conflicts. 1 年間 前
gradle c9dc879b2d Upgrade Gradle to version 8.0 Upgrade AGP to version 7.4.2 1 年間 前
library b3a33ac52d Downgrade AndroidX Annotations to version 1.5.0 to prevent duplicated classes conflicts. 1 年間 前
.gitignore 14609db25e Initial commit 10 年 前
LICENSE 2ebb3b0915 Initial commit 10 年 前
README.md f7876caf1e Update README.md 5 年 前
Screencast.gif 92d12c6b29 Added screencast example gif 10 年 前
build.gradle 31f6eb5ecb Switch to a new Gradle dependency and plugin resolution declaration system via settings.gradle Remove project Sample since it was too outdated. 1 年間 前
gradle.properties 4ae6c648e1 Upgrade AGP to version 8.0 Migrate to the latest AndroidX 1 年間 前
gradlew 4ffef1c2c2 Added artifact from jitpack in sample 7 年 前
gradlew.bat 14609db25e Initial commit 10 年 前
settings.gradle 31f6eb5ecb Switch to a new Gradle dependency and plugin resolution declaration system via settings.gradle Remove project Sample since it was too outdated. 1 年間 前

README.md

Maskable Layout

Overview

=======================

The Maskable Layout is a simple framelayout that allows you to easily mask views and viewgroups. You can also execute other porterduffxfermodes. Simple Drawables are accepted, as well as AnimationDrawables !

Example

=======================

Usage

======================= This example masks his child element (Imageview) with the mask "animation_mask" and sets the porterDuffXferMode to DST_IN

<com.christophesmet.android.views.maskableframelayout.MaskableFrameLayout
    android:id="@+id/frm_mask_animated"
    android:layout_width="100dp"
    app:porterduffxfermode="DST_IN"
    app:mask="@drawable/animation_mask"
    android:layout_height="100dp">

    <ImageView android:layout_width="match_parent"
               android:layout_height="match_parent"
               android:scaleType="centerCrop"
               android:src="@drawable/unicorn"/>

</com.christophesmet.android.views.maskableframelayout.MaskableFrameLayout>

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/#christophesmet/android_maskable_layout

repositories {
    maven { url 'https://jitpack.io' }
}
    implementation 'com.github.christophesmet:android_maskable_layout:v1.3.1'

License

Copyright 2015 Christophe Smet.

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.