Android View Hover - Free

  • Android View Hover, Android View Hover Library
  • Android View Hover, Android View Hover Library
  • Android View Hover, Android View Hover Library
  • Android View Hover, Android View Hover Library
  • Description

  • change log

  • faq

  • Comments

  • AndroidViewHover

    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.




    Set up RenderScript
    • Android Studio, add

    	renderscriptTargetApi 19
    	renderscriptSupportMode true
    

    in build.gradle defaultConfig, here is a
     renderscriptTargetApi 19
    renderscriptSupportMode true
    


    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.3@aar'
    }
    

    Maven

    	 
            com.nineoldandroids
            library
            2.4.0
        
        
            com.daimajia.androidanimation
            library
            1.1.2
            apklib
        
        
            com.daimajia.easing
            library
            1.0.0
            apklib
        
        
            com.daimajia.androidviewhover
            library
            1.0.3
            apklib
        
    

    Create an original view, and make sure it was wrapped by BlurLayout for example:


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


    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.

    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

    package com.daimajia.androidviewhover.demo;
    import android.content.Context;
    import android.content.Intent;
    import android.net.Uri;
    import android.os.Bundle;
    import android.support.v7.app.ActionBarActivity;
    import android.view.LayoutInflater;
    import android.view.Menu;
    import android.view.MenuItem;
    import android.view.View;
    import android.widget.Toast;
    import com.daimajia.androidanimations.library.Techniques;
    import com.daimajia.androidanimations.library.YoYo;
    import com.daimajia.androidviewhover.BlurLayout;
    public class MainActivity extends ActionBarActivity {
    private Context mContext;
    private BlurLayout mSampleLayout, mSampleLayout2, mSampleLayout3, mSampleLayout4;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mContext = this;
    setContentView(R.layout.activity_main);
    BlurLayout.setGlobalDefaultDuration(450);
    mSampleLayout = (BlurLayout)findViewById(R.id.blur_layout);
    View hover = LayoutInflater.from(mContext).inflate(R.layout.hover_sample, null);
    hover.findViewById(R.id.heart).setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
    YoYo.with(Techniques.Tada)
    .duration(550)
    .playOn(v);
    }
    });
    hover.findViewById(R.id.share).setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
    YoYo.with(Techniques.Swing)
    .duration(550)
    .playOn(v);
    }
    });
    mSampleLayout.setHoverView(hover);
    mSampleLayout.setBlurDuration(550);
    mSampleLayout.addChildAppearAnimator(hover, R.id.heart, Techniques.FlipInX, 550, 0);
    mSampleLayout.addChildAppearAnimator(hover, R.id.share, Techniques.FlipInX, 550, 250);
    mSampleLayout.addChildAppearAnimator(hover, R.id.more, Techniques.FlipInX, 550, 500);
    mSampleLayout.addChildDisappearAnimator(hover, R.id.heart, Techniques.FlipOutX, 550, 500);
    mSampleLayout.addChildDisappearAnimator(hover, R.id.share, Techniques.FlipOutX, 550, 250);
    mSampleLayout.addChildDisappearAnimator(hover, R.id.more, Techniques.FlipOutX, 550, 0);
    mSampleLayout.addChildAppearAnimator(hover, R.id.description, Techniques.FadeInUp);
    mSampleLayout.addChildDisappearAnimator(hover, R.id.description, Techniques.FadeOutDown);
    //sample 2
    mSampleLayout2 = (BlurLayout)findViewById(R.id.blur_layout2);
    View hover2 = LayoutInflater.from(mContext).inflate(R.layout.hover_sample2, null);
    hover2.findViewById(R.id.avatar).setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
    Toast.makeText(mContext, "Pretty Cool, Right?", Toast.LENGTH_SHORT).show();
    }
    });
    mSampleLayout2.setHoverView(hover2);
    mSampleLayout2.addChildAppearAnimator(hover2, R.id.description, Techniques.FadeInUp);
    mSampleLayout2.addChildDisappearAnimator(hover2, R.id.description, Techniques.FadeOutDown);
    mSampleLayout2.addChildAppearAnimator(hover2, R.id.avatar, Techniques.DropOut, 1200);
    mSampleLayout2.addChildDisappearAnimator(hover2, R.id.avatar, Techniques.FadeOutUp);
    mSampleLayout2.setBlurDuration(1000);
    //sample3
    mSampleLayout3 = (BlurLayout)findViewById(R.id.blur_layout3);
    View hover3 = LayoutInflater.from(mContext).inflate(R.layout.hover_sample3, null);
    mSampleLayout3.setHoverView(hover3);
    mSampleLayout3.addChildAppearAnimator(hover3, R.id.eye, Techniques.Landing);
    mSampleLayout3.addChildDisappearAnimator(hover3, R.id.eye, Techniques.TakingOff);
    mSampleLayout3.enableZoomBackground(true);
    mSampleLayout3.setBlurDuration(1200);
    //sample 4
    mSampleLayout4 = (BlurLayout)findViewById(R.id.blur_layout4);
    View hover4 = LayoutInflater.from(mContext).inflate(R.layout.hover_sample4,null);
    mSampleLayout4.setHoverView(hover4);
    mSampleLayout4.addChildAppearAnimator(hover4, R.id.cat, Techniques.SlideInLeft);
    mSampleLayout4.addChildAppearAnimator(hover4, R.id.mail, Techniques.SlideInRight);
    mSampleLayout4.addChildDisappearAnimator(hover4, R.id.cat, Techniques.SlideOutLeft);
    mSampleLayout4.addChildDisappearAnimator(hover4, R.id.mail, Techniques.SlideOutRight);
    mSampleLayout4.addChildAppearAnimator(hover4, R.id.content, Techniques.BounceIn);
    mSampleLayout4.addChildDisappearAnimator(hover4, R.id.content, Techniques.FadeOutUp);
    hover4.findViewById(R.id.cat).setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
    Intent getWebPage = new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/daimajia"));
    startActivity(getWebPage);
    }
    });
    hover4.findViewById(R.id.mail).setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
    final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
    emailIntent.setType("plain/text");
    emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{"daimajia@gmail.com"});
    emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "About AndroidViewHover");
    emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "I have a good idea about this project..");
    startActivity(Intent.createChooser(emailIntent, "Send mail..."));
    }
    });
    }
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.main, menu);
    return true;
    }
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
    // Handle action bar item clicks here. The action bar will
    // automatically handle clicks on the Home/Up button, so long
    // as you specify a parent activity in AndroidManifest.xml.
    int id = item.getItemId();
    if (id == R.id.action_settings) {
    return true;
    }
    return super.onOptionsItemSelected(item);
    }
    }
    


    Effects

    • Attension

      • Flash, Pulse, RubberBand, Shake, Swing, Wobble, Bounce, Tada, StandUp, Wave
    • Special

      • Hinge, RollIn, RollOut,Landing,TakingOff,DropOut
    • Bounce

      • BounceIn, BounceInDown, BounceInLeft, BounceInRight, BounceInUp
    • Fade

      • FadeIn, FadeInUp, FadeInDown, FadeInLeft, FadeInRight FadeOut, FadeOutDown, FadeOutLeft, FadeOutRight, FadeOutUp
    • Flip

      • FlipInX, FlipOutX, FlipOutY
    • Rotate

      • RotateIn, RotateInDownLeft, RotateInDownRight, RotateInUpLeft, RotateInUpRight RotateOut, RotateOutDownLeft, RotateOutDownRight, RotateOutUpLeft, RotateOutUpRight
    • Slide

      • SlideInLeft, SlideInRight, SlideInUp, SlideInDown SlideOutLeft, SlideOutRight, SlideOutUp, SlideOutDown
    • Zoom

      • ZoomIn, ZoomInDown, ZoomInLeft, ZoomInRight, ZoomInUp ZoomOut, ZoomOutDown, ZoomOutLeft, ZoomOutRight, ZoomOutUp

    There is no Features content
  • There is no Related Products
  • There is no Change Log content
  • There is no FAQ