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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:15:20+00:00 2026-06-11T16:15:20+00:00

Please let me know if I’m going about this totally the wrong way, but

  • 0

Please let me know if I’m going about this totally the wrong way, but if I explain the problem I hope someone can help me with it, or point me in the right direction.

I need a custom view which can have movement, I wish to put this view on part of my relativeLayout on one of my main activities. I followed a tutorial on movement ( link below ) which created an updateThread, and a class extending SurfaceView.
http://mobile.tutsplus.com/tutorials/android/android-sdk-achieving-movement/

This works, and I can put it in my application.
The problem comes when I want to put that within my layout on a different activity. I managed to put the view in, but it then appears full screen, behind other items. Part of my problem is that the size of this depends on the size of the screen etc. The relativelayout uses a lot of images, where Android will pick the correct sized image needed. For the SurfaceView, how do I set the size to depend on the phone?

Right now, I have the relative layout showing correctly with images where the custom view needs to go. The images show the correct size, and are just a static version of what I need to show. Do you know how I can move my custom view, into this space?

If you need any code, I can post anything up, i’m really struggling with this one.
Even if you can just point me in the correct direction, or let me know if I shouldn’t be using surface view for this? The view just needs to show some images sliding down the screen, that’s all ( within that section of the main layout )

Much much much thanks in advance

  • 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-11T16:15:21+00:00Added an answer on June 11, 2026 at 4:15 pm

    To set the size of the surfaceView use this method:

    surfaceView.getHolder().setFixedSize(width, height)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please let me know if I'm coming at this block on a wrong angle.
Can someone please let me know the correct way to select an element type
Please let me know where I am going wrong to get the error. I
Can Someone please let me know how can I have this done in CSS?
Please let me know what is the best way to determine composition of young
Please let me know if you have any idea about it. Thanks EDIT What
Please let me know if there is a way to run multi-threads in parallel.
Please let me know if this is bad practice or in someway a bad
Please let me know if this has been asked before, I wasn't able to
Please let me know how to achieve this synchronization between the data while updating

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.