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

A custom Circular ProgressBar and Line ProgressBar for Android.

An extension to the Snackbar view available at the Android Design Support Library.

Restaurant wraps the Snackbar implementation to easily allow more customization. With Restaurant you can change the text and background color of the Snackbar just calling a method. Restaurant can also detect the correct view to attach the Snackbar just receiving the activity.

This project aims to provide an ultimate and flexible image cropping experience.

Be sure that your user is awake before disturbing it with soundy and vibrant notifications!

Before this library, QuitNow! and lots of apps were sending notifications when the user was sleeping... and HEY! That makes people angry.

Tiny and nice injections syntax sugar for Android. If you're using heavy injection frameworks just to inject views and resources try this.

A simple library for locking and unlocking Activities (e.g. child lock) with a PIN code.

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