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 6729671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:19:06+00:00 2026-05-26T10:19:06+00:00

Hello guys I want to use a ImageView as a slideshow, that touch you

  • 0

Hello guys I want to use a ImageView as a slideshow, that touch you on the right of the screen display the next image and if the touch is on the left show the previous image,
I already tried to implement this function but I get no response from the ImageView, looking logcat I realized that it doesn’t dispatch of TouchEvent.

public class Prova4Activity extends Activity implements OnTouchListener {
/** Called when the activity is first created. */
ImageView image;
Bitmap trash = loadImageFromUrl("http://www.televideo.rai.it/televideo/pub/tt4web/   Nazionale/16_9_page-100.6.png");
ImageView imgpag;
@Override
public boolean onTouch(View v, MotionEvent event) {
if(event.getAction() == MotionEvent.EDGE_RIGHT){
    trash.recycle();
     trash = null;
     trash = loadImageFromUrl("http://www.televideo.rai.it/televideo/pub/tt4web/Nazionale/16_9_page-100.6.png");
     image.setImageBitmap(trash);

     }else if(event.getAction() == MotionEvent.EDGE_LEFT){
         trash.recycle();
         trash = null;
         trash = loadImageFromUrl("http://www.televideo.rai.it/televideo/pub/tt4web/  Nazionale/16_9_page-100.5.png");
         imgpag.setImageBitmap(trash);

     }
imgpag.setScaleType(ScaleType.FIT_XY);

return true;
}
@Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    imgpag = (ImageView)findViewById (R.id.imgpag); 
    imgpag.setImageBitmap(trash);
    imgpag.setOnTouchListener(this);

    }
}

I would not use a gallery because the images are small and do not know in advance the number of images because i load them directly from Inernet based on the actions of the user

  • 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-05-26T10:19:06+00:00Added an answer on May 26, 2026 at 10:19 am

    This might be not the best way to achieve this but you can try following:

    Set two buttons on Screen – One on Right corner and One on the left corner.
    (If you are showing ImageView full screen then better to use FrameLayout –
    bt make sure that Buttons are on the front)
    Set Button properties like

    <Button
    android:id="@+id/button1"
    android:layout_width="70dp"
    android:layout_height="40dp" android:background="@null"/>

    This will make sure that buttons are invisible

    Then just add your logic of prev and next on OnClickListeners of these buttons

    Hope this will help you

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

Sidebar

Related Questions

Hello guys I have a List that I want to show for all users
Hello Guys I simply want to ask that is it possible to deploy Silverlight
Hello guys I'm stucked in a point and I need your help. I want
Hello guys, I have a general design problem with iPhone application. I want to
Hello Guys I am working WPF app and I want to retrive all the
Hello Guys I am working on WPF app and I want to Unlike the
Hello guys I've 2 models: User(aka parent) and Profil(aka child).And I want to limit
hello guys i need to use pure SQL queries for my database project at
. Hello guys, Can we write our custom controls in such a way that
Hello guys I have 1675 line Code. Want to when user click button textbox.text

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.