Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8175033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T22:37:15+00:00 2026-06-06T22:37:15+00:00

I am looking for a tutorial to achieve an effect that is very easy

  • 0

I am looking for a tutorial to achieve an effect that is very easy to create with actionscript, but need to do it in JAVA for android.

Basically i want two images on top of each other, one with a draggable mask layer over top of it.. basically something like this even:

http://flashexplained.com/actionscript/how-to-easily-make-a-draggable-mask-with-actionscript/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T22:37:16+00:00Added an answer on June 6, 2026 at 10:37 pm

    you must have a RelativeLayout this way:

      <RelativeLayout 
            android:layout_width="fill_parent"
            android:layout_height="fill_parent">
            <ImageView 
                android:src="@drawable/ic_launcher"
                android:layout_alignTop="true"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:layout_alignBottom="true"/>
            <ImageView 
                android:id="@+id/top_mask"
                android:src="@drawable/ic_launcher"
                android:layout_alignTop="true"
                android:layout_alignBottom="true"/>
        </RelativeLayout>
    

    and code to access above mask and set its drag event this way:

    ImageView img = (ImageView)findViewById(R.id.top_mask);
                    img.setOnDragListener(new View.OnDragListener() {
                        @Override
                        public boolean onDrag(View v, DragEvent event) {
                            RelativeLayout.LayoutParams params = (android.widget.RelativeLayout.LayoutParams) v.getLayoutParams();
                            params.topMargin = (int) event.getX();
                            params.bottomMargin = (int) event.getY();
                            v.setLayoutParams(params);
                            return false;
                        }
                    });
    

    I haven’t tested this code. I just wrote this. I believe this must help you to get started or even a complete solution 🙂

    regards,
    Aqif Hamid

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for a tutorial that explains creating custom usercontrols in WPF. I want
I'm looking for a tutorial/guide/something which explains how create some advanced animation with Android.
I am looking for a tutorial how to create my own user interface(like using
I am looking for a tutorial or example code that will help me understand
I am looking for a tutorial that shows how to populate a UITableView from
I am looking to create a web widget that can be easily integrated into
I'm looking for a tutorial on Nhibernate 3.2 that uses the built-in code configuration
I am looking for a tutorial / book that guides me to understand the
I am looking for documentation/tutorial for Inotifier as I need to implement file notification
I have the need to create a wavey looking text object in my WPF

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.