AndroidViewHover


Source link: https://github.com/daimajia/AndroidViewHover

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

Resources

This is a simple library to quickly create Onboarding inside your app.

Swipe detects swipe events on Android with listener and RxJava Observable.

An easy to use android color picker library.

A library which can get phone number geo location and other information from local or network (baidu, juhe or custom api).

Detects gestures on Android with listener and RxJava Observable.

AndRouter is a android framework used to map url to activities or actions.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes