Shadow layout, shadow view for android.

Overview

ShadowViewHelper

Shadow layout, shadow view for android.

How to use:

It's very simple to use.

Gradle(Check newest version):

compile 'com.github.wangjiegulu:ShadowViewHelper:x.x.x'

Maven(Check newest version):

<dependency>
    <groupId>com.github.wangjiegulu</groupId>
    <artifactId>ShadowViewHelper</artifactId>
    <version>x.x.x</version>
</dependency>

xml:

<LinearLayout
      android:id="@+id/activity_main_shadow_view"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      >
</LinearLayout>

Activity:

// all side shadow
ShadowProperty sp = new ShadowProperty()
        .setShadowColor(0x77000000)
        .setShadowDy(dip2px(this, 0.5f))
        .setShadowRadius(dip2px(this, 3))
        .setShadowSide(ShadowProperty.ALL);
ShadowViewDrawable sd = new ShadowViewDrawable(sp, Color.WHITE, 0, 0);
ViewCompat.setBackground(shadowViewA, sd);
ViewCompat.setLayerType(shadowViewA, ViewCompat.LAYER_TYPE_SOFTWARE, null);

// only all sides except top shadow
ShadowProperty sp = new ShadowProperty()
        .setShadowColor(0x770000FF)
        .setShadowDy(dip2px(this, 0.5f))
        .setShadowRadius(dip2px(this, 3))
        .setShadowSide(ShadowProperty.LEFT | ShadowProperty.RIGHT | ShadowProperty.BOTTOM);
ShadowViewDrawable sd = new ShadowViewDrawable(sp, Color.TRANSPARENT, 0, 0);
ViewCompat.setBackground(shadowViewD, sd);
ViewCompat.setLayerType(shadowViewD, ViewCompat.LAYER_TYPE_SOFTWARE, null);

License

Copyright 2015 Wang Jie

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.

Android Arsenal

You might also like...
View that imitates Ripple Effect on click which was introduced in Android L  (for Android 2.3+)
View that imitates Ripple Effect on click which was introduced in Android L (for Android 2.3+)

RippleView View that imitates Ripple Effect on click which was introduced in Android L. Usage For a working implementation, Have a look at the Sample

Snake View is a simple and animated linear chart for Android.
Snake View is a simple and animated linear chart for Android.

Snake View Snake library is a simple and animation line chart for Android. Latest Version How to use Configuring your project dependencies Add the lib

Android view with both path from constructed path or from svg.
Android view with both path from constructed path or from svg.

android-pathview You want to animate svg or normal Paths?br Change the color, pathWidth or add svg.br Animate the "procentage" property to make th

A horizontal view scroller library for Android
A horizontal view scroller library for Android

View Flow for Android ViewFlow is an Android UI widget providing a horizontally scrollable ViewGroup with items populated from an Adapter. Scroll down

TileView is a subclass of android.view.ViewGroup that asynchronously displays, pans and zooms tile-based images.  Plugins are available for features like markers, hotspots, and path drawing.
TileView is a subclass of android.view.ViewGroup that asynchronously displays, pans and zooms tile-based images. Plugins are available for features like markers, hotspots, and path drawing.

This project isn't maintained anymore. It is now recommended to use https://github.com/peterLaurence/MapView. MapView is maintained by Peter, one of o

A cool Open Source CoverFlow view for Android with several fancy effects.
A cool Open Source CoverFlow view for Android with several fancy effects.

FancyCoverFlow THIS PROJECT IS NO LONGER MAINTAINED! What is FancyCoverFlow? FancyCoverFlow is a flexible Android widget providing out of the box view

A simple, customizable and easy to use swipeable view stack for Android.
A simple, customizable and easy to use swipeable view stack for Android.

SwipeStack A simple, customizable and easy to use swipeable view stack for Android. QuickStart Include the Gradle dependency dependencies { compil

Custom android music player view.
Custom android music player view.

InteractivePlayerView Custom android music player view. Screen Check it on youtube Usage(XML) Define it in your xml file. co.mobiwise.library.Intera

Android Quilt View Library
Android Quilt View Library

QuiltViewLibrary QuiltView displays views of different sizes in a scrollable grid. Dependencies This library depends on gridlayout_v7 ([email protected]:

Comments
  • tools:replace=

    tools:replace="android:allowBackup

    Manifest merger failed : Attribute application@allowBackup value=(false) from AndroidManifest.xml:23:9-36 is also present at [com.github.wangjiegulu:ShadowViewHelper:1.0.2] AndroidManifest.xml:11:18-44 value=(true). Suggestion: add 'tools:replace="android:allowBackup"' to element at AndroidManifest.xml:21:5-121:19 to override.

    opened by troZee 0
Owner
WangJie
To be an artist-engineer
WangJie
Android layout decorators : Injecting custom attributes in layout files, Using decorators to get rid of unnecessary class explosion with custom views

Decor Decor is a library that applies decorators to Android layout with additional attributes without the need to extend and create a custom View for

Mouna Cheikhna 304 Nov 25, 2022
[] A simple way to "badge" any given Android view at runtime without having to cater for it in layout

Android ViewBadger A simple way to "badge" any given Android view at runtime without having to cater for it in layout. Note: If your aim is to replica

Jeff Gilfelt 3k Nov 28, 2022
FogView is a android library that can show fog on any layout and the fog removes when user rubs it.

Fog View Android Library Min SDK 8 (Android 2.2–2.2.3 Froyo) Screnshots How to use If you want use this library, you can download project and import i

Chetan Kaushik 631 Dec 31, 2022
JetCompose - Blur Effect in Android 12 with motion layout carousel

JetCompose Blur Effect in Android 12 with motion layout carousel

Vikas Singh 4 Jul 27, 2022
This project has been superseded by SuperSLiM, a layout manager for RecyclerView. I strongly recommend using SuperSLiM and not StickyGridHeaders.

StickyGridHeaders Replacement project at SuperSLiM This repository is abandoned and will no longer see any development or support. The replacement Sup

Tonic Artos 1.5k Nov 15, 2022
The CustomCalendarView provides an easy and customizable calendar to create a Calendar. It dispaly the days of a month in a grid layout and allows to navigate between months

Custom-Calendar-View To use the CustomCalendarView in your application, you first need to add the library to your application. You can do this by eith

Nilanchala Panigrahy 113 Nov 29, 2022
Android View for displaying and selecting values in a circle-shaped View, with animations and touch gestures.

CircleDisplay Android View for displaying and selecting (by touch) values / percentages in a circle-shaped View, with animations. Features Core featur

Philipp Jahoda 287 Nov 18, 2022
FloatingView can make the target view floating above the anchor view with cool animation

FloatingView FloatingView can make the target view floating above the anchor view with cool animation Links 中文版 README Blog about FloatingView demo.ap

UFreedom 1.8k Dec 27, 2022
用于做Path动画的自定义View。 I have a path.I have a view. (Oh~),Path(Anim)View.

PathAnimView 用于做Path动画的自定义View。 I have a path.I have a view. (Oh~),Path(Anim)View. 现已经找到图片->SVG->PATH的正确姿势, Now i have a pic.I have a view. Oh~,Path(A

张旭童 1.1k Oct 28, 2022
TourGuide is an Android library that aims to provide an easy way to add pointers with animations over a desired Android View

TourGuide TourGuide is an Android library. It lets you add pointer, overlay and tooltip easily, guiding users on how to use your app. Refer to the exa

Tan Jun Rong 2.6k Jan 5, 2023