Animation View to Highlight particular Views 🎯 for Android

Overview

TargetView

Animation View to Highlight particular Views 🎯 for Android, it can be Used with Views that you see important (Like CountDownTimer), And also to attract the user's attention to something interesting.

minSdkVersion=11

Size ~ 12 Kb

Android Arsenal

Preview


Usage

add this line to build.gradle

dependencies {
	    compile 'com.github.anastr:targetviewlib:1.0.3'
}

in layout

<com.github.anastr.targetviewlib.TargetView
        android:id="@+id/mTargetView"
        android:layout_width="200dp"
        android:layout_height="200dp"
        app:targetWidth="10"
        app:targetColor="#6b75ff"
        app:rotateDuration="2000"
        app:targetMode="Target1"
        app:withBackgroundEffect="true"
        app:backgroundEffectColor="#aa3fff1e"
        app:backgroundEffectDuration="500"
        app:rotateSide="Left">
           
           <!-- TODO  add your views here -->
           
    </com.github.anastr.targetviewlib.TargetView>

Methods (code)

start and stop Animation

// Animation starting by defoult
TargetView mTargetView = (TargetView) findViewById(R.id.mTargetView);

// to stop Animation
mTargetView.stopAnimation();

// to start Animation agin
mTargetView.startAnimation();

// check Animation
if (mTargetView.isAnimationRunning() ){
  ....
}

Another Methods

// Change target color
mTargetView.setTargetColor(Color.parseColor(#aa009900));

// Change target Width
mTargetView.setTargetWidth(15);

// Change Background Effect Color
mTargetView.setBackgroundEffectColor(Color.RED);

in New Version

  • you can change the point of rotation of the targetView (see last Attribute).
  • more save memory.

Attributes (in xml)

app:targetWidth="10"

in pixel defoult : 10

app:targetColor="#6b75ff"

defoult : BLACK

app:rotateDuration="2000"

defoult : 2000 milliSeconds

app:withBackgroundEffect="true"

defoult : true

app:backgroundEffectColor="#AA3fff1e"

defoult : Color.CYAN

It is advisable to use alpha

app:backgroundEffectDuration="500"

defoult : 500 milliSeconds

app:rotateSide="Left"

defoult : Right.

enum (Left, Right).

app:targetMode="Target1"

defoult : Target1.

enum (Target1, Target2, Target3, Target4, Target5, Target6, Target7, Target8).

targetMode note screenshot
Target1 ---
Target2 ---
Target3 set targetWidth="80" or more
Target4 ---
Target5 ---
Target6 set targetWidth="10" or less
Target7 ---
Target8 set targetWidth="15" or less


Copyright 2016 Anas ALtair

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.

You might also like...
Dead simple Android Tooltip Views
Dead simple Android Tooltip Views

TooltipView A dead simple way to to add tooltips to your Android app. com.venmo.view.TooltipView android:layout_width="wrap_content"

ScratchView 7.0 0.0 L4 Java  repo is UX Design involving scratch cards like views which are scratched to reveal the information they conceal.
ScratchView 7.0 0.0 L4 Java repo is UX Design involving scratch cards like views which are scratched to reveal the information they conceal.

ScratchView Intro ScratchView repo is UX Design involving scratch cards like views which are scratched to reveal the information they conceal. There a

Glass-break effect for views

BrokenView Glass-break effect for views. Demo Download APK Usage Android Studio dependencies { compile 'com.zys:brokenview:1.0.3' } Eclipse Just pu

ScratchView repo is UX Design involving scratch cards like views which are scratched to reveal the information they conceal.
ScratchView repo is UX Design involving scratch cards like views which are scratched to reveal the information they conceal.

ScratchView Intro ScratchView repo is UX Design involving scratch cards like views which are scratched to reveal the information they conceal. There a

Draggable views with rotation and skew/scale effects
Draggable views with rotation and skew/scale effects

DraggableView Draggable views with rotation and skew/scale effects. Usage Implement DragController.IDragViewGroup Create instance of DragController Ov

Android View for displaying and selecting values in a circle-shaped View, with animations and touch gestures.
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

用于做Path动画的自定义View。 I have a path.I have a view. (Oh~),Path(Anim)View.
用于做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

Android library for fluid tablayout animation as seen on Snapchat.
Android library for fluid tablayout animation as seen on Snapchat.

SnapTabLayout Show some ❤️ and star the repo to support the project This library is the implementation of TabLayout as seen on popular messaging app S

Cube grid animation about the android.

CubeGrid Cube grid animation about the android. The android implementation about the 9-cube-grid Demo Usage Add dependency allprojects { repositories

Owner
Anas Altair
Dentist, Android Developer.
Anas Altair
[Archived] Highlight the best bits of your app to users quickly, simply, and cool...ly

ShowcaseView The ShowcaseView (SCV) library is designed to highlight and showcase specific parts of apps to the user with a distinctive and attractive

Alex Curran 5.6k Dec 16, 2022
The ShowcaseView library is designed to highlight and showcase specific parts of apps to the user with an attractive and flat overlay.

The ShowcaseView library is designed to highlight and showcase specific parts of apps to the user with an attractive and flat overlay.

Mohammad Reza Eram 484 Dec 26, 2022
Janishar Ali 2.1k Jan 1, 2023
This is a library to help creating expanding views with animation in Android

About the Library inspiration This library is strongly inspired in this concept from Hila Peleg in dribble. See it below Working example For more deta

Diego Bezerra 944 Dec 27, 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
💳 A quick and easy flip view through which you can create views with two sides like credit cards, poker cards etc.

The article on how this library was created is now published. You can read it on this link here. →. ?? EasyFlipView Built with ❤︎ by Wajahat Karim and

Wajahat Karim 1.3k Dec 14, 2022
Pop animation with circular dust effect for any view updation

Popview-Android Pop animation with circular dust effect for any view updation Getting Started In your build.gradle dependencies { compile 'rb.popv

R B Krishna 489 Dec 28, 2022
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 small, easy to use android library for implementing flipping between views as seen in the popular Flipboard application

FlipView About This library is made to be very easy to use and at the same time be feature complete. With only a few lines of code you can have a flip

Emil Sjölander 924 Nov 10, 2022
An Android library introducing a stack of Views with the first item being flippable.

FlippableStackView An Android library introducing a stack of Views with the first item being flippable. Views inside the stack remain the aspect ratio

Bartek Lipinski 812 Dec 7, 2022