An elegant way to show your menu or messages.

Overview

Android View Hover Build Status

In my opinion, jumping to a new activity to show your menu is a kind of wasting time and life.

So,

I think, we need a hover view, to show menu, to show messages.

Demo

Watch HD in YouTube.

Download Apk

Usage

Step0

Set up RenderScript

  • Eclipse, please visit official tutorial.
  • Android Studio, add
             
             renderscriptTargetApi 19
         	renderscriptSupportMode true
    in build.gradle defaultConfig, here is a sample

Step1

Gradle

dependencies {
	compile "com.android.support:support-v4:20.+"
	compile 'com.nineoldandroids:library:2.4.0'
	compile 'com.daimajia.easing:library:1.0.0@aar'
	compile 'com.daimajia.androidanimations:library:1.1.2@aar'
	compile 'com.daimajia.androidviewhover:library:1.0.4@aar'
}

Maven

	<dependency>
	    <groupId>com.nineoldandroids</groupId>
	    <artifactId>library</artifactId>
	    <version>2.4.0</version>
	</dependency>
	<dependency>
	    <groupId>com.daimajia.androidanimation</groupId>
	    <artifactId>library</artifactId>
	    <version>1.1.2</version>
	    <type>apklib</type>
	</dependency>
	<dependency>
	    <groupId>com.daimajia.easing</groupId>
	    <artifactId>library</artifactId>
	    <version>1.0.0</version>
	    <type>apklib</type>
	</dependency>
	<dependency>
	    <groupId>com.daimajia.androidviewhover</groupId>
	    <artifactId>library</artifactId>
	    <version>1.0.4</version>
	    <type>apklib</type>
	</dependency>

Eclipse

Step2

  1. Create an original view, and make sure it was wrapped by BlurLayout

    for example:

    	<com.daimajia.androidviewhover.BlurLayout
    			android:id="@+id/sample"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content">
                <ImageView
                    android:layout_centerInParent="true"
                    android:scaleType="fitXY"
                    android:src="@drawable/kid"
                    android:layout_width="match_parent"/>
    	</com.daimajia.androidviewhover.BlurLayout>

    Note: BlurLayout is entended from RelativeLayout. You can use the RelativeLayout rules to layout your view.

  2. Create a hover view, there is no rules to obey. Just please remember that this view will be stretched as large as the original view you have created.

  3. Bind a hover view to BlurLayout

    	BlurLayout sampleLayout = (BlurLayout)findViewById(R.id.sample);
    	View hover = LayoutInflater.from(mContext).inflate(R.layout.hover, null);
    	sampleLayout.setHoverView(hover);

    and don't forget that you can add various animations just in one line code. For example:

    	//View (R.id.heart) appear animation.
    	sampleLayout.addChildAppearAnimator(hover, R.id.heart, Techniques.FlipInX);
    	//View (R.id.heart) disappear animation.
    	sampleLayout.addChildDisappearAnimator(hover, R.id.heart, Techniques.FlipOutX);

You can view the samples in my preset examples.

Animations

This project provides a lot of animations you can choose. Animations are from my another open-source project AndroidViewAnimations. And you can aslo using easing funcitons to make your animations more real. Please enjoy it.

Thanks

About me

A student in mainland China.

Welcome to offer me an internship. If you have any new idea about this project, feel free to contact me.

Comments
  • Crash when BlurLayout is 0dp height.

    Crash when BlurLayout is 0dp height.

    My xml in this part is roughly like this:

     <com.daimajia.androidviewhover.BlurLayout
            android:id="@+id/blur_layout"
            android:layout_width="wrap_content"
            android:layout_height="0dp"
            android:layout_weight="1">
    
            <FrameLayout
                android:id="@+id/fragment_container"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                />
        </com.daimajia.androidviewhover.BlurLayout>
    

    And I want to through the menu key to showHover (), the results originally expected is this: I press the Menu key, then Hover out, covering my entire FrameLayout. The result is not, and the error (key information) as follows:

    Caused by: java.lang.NullPointerException
                at com.daimajia.androidviewhover.tools.Blur.apply(Blur.java:19)
                at com.daimajia.androidviewhover.tools.Blur.apply(Blur.java:15)
                at com.daimajia.androidviewhover.BlurLayout.addBlurImage(BlurLayout.java:178)
                at com.daimajia.androidviewhover.BlurLayout.hover(BlurLayout.java:119)
                at com.daimajia.androidviewhover.BlurLayout.showHover(BlurLayout.java:105)
                at com.daimajia.androidviewhover.BlurLayout.toggleHover(BlurLayout.java:164)
                at me.drakeet.testhover.ui.MainActivity.onCreate(MainActivity.java:85)
                at android.app.Activity.performCreate(Activity.java:5242)
                at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
                at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2151)
                at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2236)
                at android.app.ActivityThread.access$800(ActivityThread.java:138)
                at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1199)
                at android.os.Handler.dispatchMessage(Handler.java:102)
                at android.os.Looper.loop(Looper.java:136)
                at android.app.ActivityThread.main(ActivityThread.java:5034)
                at java.lang.reflect.Method.invokeNative(Native Method)
                at java.lang.reflect.Method.invoke(Method.java:515)
    

    So ask: under BlurLayout in the layout file has one and only ImageView? I put a FrameLayout, and want the buttons to control Hover‘s toggle, but it seems not, could help? Thank you very much!

    bug 
    opened by drakeet 10
  • Error when import using Eclipse

    Error when import using Eclipse

    mSampleLayout.addChildAppearAnimator(hover, R.id.heart, Techniques.FlipInX);在addChildAppearAnimator方法中都提示:The method addChildAppearAnimator(View, int, Techniques) from the type BlurLayout refers to the missing type Techniques。 好像说缺失Techniques类型,但是确实我什么也没有改呀。

    opened by android12345 8
  • Blur behaves weird

    Blur behaves weird

    I've been trying to add this library to my project but I'm either too dumb to use it or there is a bug that seems to only affect my project...

    This is my Code to show the HoverView:

    View newView = mInflater.inflate(R.layout.card_back, null); BlurLayout oldView = (BlurLayout) mNowLayout.findViewById(id); oldView.setHoverView(newView); oldView.setBlurDuration(500); //Adding Animations oldView.showHover();

    My actual problem is visible in the attached picture. As you can see there is the blurred version of the text & images underneath an unblurred version of the text & images. It might just be me doing something wrong but if that is the case I'm absolutely clueless about what I'm doing wrong.

    screenshot_2014-09-20-15-18-29

    opened by ghost 6
  • Problem on LG G3 with android 5.0

    Problem on LG G3 with android 5.0

    I recently finished my app using AndroidViewHover which shows icons over a CardView. I test it on android 2.3, 4.0 and 4.4 and works fine. But one of my customer complaining that icons dont show up on LG G3 using android 5.0

    Any idea?

    opened by arashmidos 2
  • dismissHover(). when does it finish?

    dismissHover(). when does it finish?

    Is there a way to know when dismissHover Animation Completes? I really need something like onDismissHoverAnimationComplete If there is a way please show it to me. Thanks.

    opened by mr-sarsarabi 1
  • Use the library in a fragment

    Use the library in a fragment

    Hello, I'm beginner in Android Development, I can use perfect your library in a simple activity, but a want to use it in a fragment. I attached the fragment .java file. I get java null pointer exception when start the fragment. I try a lot a thing but I can't do it.

    I attached the hover xml and one another xml what i use in the fragment.

    PicturesFragment.txt hover_sample.txt fragment_pictures.txt

    opened by HerczegDaniel 1
  • Can i exclude nineolddroid in my build??

    Can i exclude nineolddroid in my build??

    @daimajia can i exclude nineolddroid from my build gradle file as i wont require it because my project is API14 and above.If i does not include it,shows a error as class cast exception cannot inflate blur layout.Help!

    opened by goonerDroid 1
  • More accessors and options

    More accessors and options

    Allow for changes to the blur radius. Allow us to disable the touch event so that we can have it trigger via a button or other event. Recycle the bitmap.

    opened by nicorichard 1
  • I want to use LongClick

    I want to use LongClick

    I want to use OnLongClickListener.

    I put an imageview inside the cardview and applied a blurview.

    I applied longclick to Cardview. But when I clicked on the imageview, longclick didn't work.

    I want to make longclick work when I hit the area of ​​Cardview. However, imageview has blurview, so it does not work in imageview area.

    So I tried applying OnLongClickListener to the imageview to solve this.

    But when I use OnLongClickListener for imageview, blurview doesn't work.

    Please tell me the solution.

    opened by ryu884 1
  • FATAL EXCEPTION

    FATAL EXCEPTION

    Hey I used API 24 try using API 23 but got this error when I click

    FATAL EXCEPTION: main Process: com.example.johnj_000.hovericons, PID: 2881 java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v8/renderscript/RenderScript; at com.daimajia.androidviewhover.tools.Blur.apply(Blur.java:20) at com.daimajia.androidviewhover.BlurLayout.addBlurImage(BlurLayout.java:182) at com.daimajia.androidviewhover.BlurLayout.hover(BlurLayout.java:120) at com.daimajia.androidviewhover.BlurLayout.access$000(BlurLayout.java:29) at com.daimajia.androidviewhover.BlurLayout$BlurLayoutDetector.onSingleTapUp(BlurLayout.java:98) at android.view.GestureDetector.onTouchEvent(GestureDetector.java:635) at com.daimajia.androidviewhover.BlurLayout.onTouchEvent(BlurLayout.java:84)

    opened by johnjake 2
  • Shrink bitmap before blur,then zoom bitmap after blured

    Shrink bitmap before blur,then zoom bitmap after blured

    在对图片进行高斯模糊处理的Blur.java文件中,进行模糊之前先将要模糊的图片尺寸缩小,再对缩小的图片进行模糊处理,最后将图片放大,这样相比之前对图片处理的时间会缩小一半,而且模糊效果也会更加明显,理论上说ScriptIntrinsicBlur进行模糊的范围只能从0~25,而使用图片的尺寸缩放后进行模糊处理能突破这个范围的限制。

    opened by RosesJack 0
  • Gradle build problem

    Gradle build problem

    Error:Execution failed for task ':app:processDebugManifest'.

    Manifest merger failed : Attribute application@icon value=(@mipmap/ic_launcher) from AndroidManifest.xml:22:9-43 is also present at [com.daimajia.easing:library:1.0.0] AndroidManifest.xml:13:9-45 value=(@drawable/ic_launcher) Suggestion: add 'tools:replace="android:icon"' to element at AndroidManifest.xml:19:5-72:19 to override

    Please remove all ic_launcher in your com.daimajia.easing:library

    opened by mrThinBone 3
Owner
代码家
Zhenfund Associate, bp [email protected]
代码家
A floating menu library for Android.

Hover Hover is a floating menu implementation for Android. Goals The goals of Hover are to: Provide an easy-to-use, out-of-the-box floating menu imple

Google 2.7k Dec 27, 2022
iOS 7/8 style side menu with parallax effect.

RESideMenu iOS 7/8 style side menu with parallax effect inspired by Dribbble shots (first and second). Since version 4.0 you can add menu view control

Roman Efimov 7.2k Dec 28, 2022
This library provides a simple way to add a draggable sliding up panel (popularized by Google Music and Google Maps) to your Android application. Brought to you by Umano.

Note: we are not actively responding to issues right now. If you find a bug, please submit a PR. Android Sliding Up Panel This library provides a simp

Umano: News Read To You 9.4k Dec 31, 2022
Show triangle view.

TriangleLabelView Show triangle view. How to Use To see how the TriangleLabelView are added to your xml layouts, check the sample project. <jp.shts.an

Shota Saito 877 Dec 6, 2022
ConstraintLayout is an Android layout component which allows you to position and size widgets in a flexible way

ConstraintLayout is a layout manager for Android which allows you to position and size widgets in a flexible way. It's available for both the Android view system and Jetpack Compose.

Android Jetpack 970 Jan 6, 2023
ViewStateLayout - Easy way to manage common state templates like loading, empty, error etc.!

ViewStateLayout Easy way to manage common state templates like loading, empty, error etc.! How to Step 1. Add the JitPack repository to your build fil

Kamrul Hasan 7 Dec 15, 2022
[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
Animate your activity!

Warning This library is not in development anymore, but we are accepting PRs or successors if anyone is interested. If you want to use these transitio

Pedro Paulo Amorim 1.3k Dec 4, 2022
You don’t want your apps look and feel boring, do you? Add some bubbles!

#BubbleAnimationLayout Say hello to Bubble Animation Layout for Android by Cleveroad You don’t want your apps look and feel boring, do you? Add some b

Cleveroad 576 Nov 23, 2022
Draftsman is an on device layout inspector which can be embedded in your android app.

Draftsman Draftsman is an on-device layout inspector for Android apps. It allows you to view various properties of rendered Android Views such as widt

Gojek 243 Dec 22, 2022
An elegant way to show your menu or messages.

Android View Hover In my opinion, jumping to a new activity to show your menu is a kind of wasting time and life. So, I think, we need a hover view, t

代码家 3.2k Jan 2, 2023
Recover deleted messages for whatsapp and Facebook lets you recover messages that sender deleted

Recover deleted messages for whatsapp and Facebook lets you recover messages that sender deleted. It also recover deleted media Images, Audio, Video etc

S M Khurram Khan 6 Jul 17, 2022
Suhuf is an android library that is used to build bottom sheets in an elegant way.

Suhuf is an android library that is used to build bottom sheets in an elegant way.

Rahmat Rasyidi Hakim 10 Nov 15, 2021
Olalekan Fagbemi 0 Nov 7, 2021
Floating Action Menu for Android. Inspired by the Google Plus floating menu

android-floating-action-menu Floating Action Menu for Android. Inspired by the Google Plus floating menu. Demo Setup The simplest way to use this libr

Alessandro Crugnola 242 Nov 10, 2022
🚀 A very customizable library that allows you to present menu items (from menu resource and/or other sources) to users as a bottom sheet.

SlidingUpMenu A library that allows you to present menu items (from menu resource and/or other sources) to users as a bottom sheet. Gradle Dependency

Rasheed Sulayman 26 Jul 17, 2022
Classic Power Menu is a Power Menu Replacement for Android 11+

Classic Power Menu is a Power Menu Replacement for Android 11+, with the main aim being restoring power menu options (Device Controls & Quick Access Wallet) on Android 12.

Kieron Quinn 385 Dec 31, 2022
:fire: The powerful and easiest way to implement modern material popup menu.

PowerMenu ?? The powerful and easiest way to implement modern material popup menu. PowerMenu can be fully customized and used for popup dialogs. Downl

Jaewoong Eum 1k Dec 29, 2022
A simple and Elegant Showcase view for Android

Tuto Showcase A simple and Elegant Showcase view for Android TutoShowcase.from(this) .setContentView(R.layout.tuto_sample) .on(R.id.about) //

Florent CHAMPIGNY 509 Nov 25, 2022