Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

An elegant way to show your menu or messages.

NotificationsYou must be signed in to change notification settings

daimajia/AndroidViewHover

Repository files navigation

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 inYouTube.

DownloadApk

Usage

Step0

Set up RenderScript

  • Eclipse, please visitofficial tutorial.
  • Android Studio, add
                      renderscriptTargetApi 19     renderscriptSupportMode true
    inbuild.gradledefaultConfig, here is asample

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 byBlurLayout

    for example:

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

    Note:BlurLayout is entended fromRelativeLayout. You can use theRelativeLayout 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 toBlurLayout

    BlurLayoutsampleLayout = (BlurLayout)findViewById(R.id.sample);Viewhover =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 mypreset examples.

Animations

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

Thanks

About me

A student in mainland China.

Welcome tooffer me an internship.If you have any new idea about this project, feel free tocontact me.

About

An elegant way to show your menu or messages.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors3

  •  
  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp