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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T22:29:33+00:00 2026-05-19T22:29:33+00:00

I’m a flash developer with no previous Java experience, just starting to learn android

  • 0

I’m a flash developer with no previous Java experience, just starting to learn android development. I’m trying to make a simple kid’s flash cards app, consisting of a load of images of animals, and a load of sounds that they make.

Currently I have the images in a gallery view, storing them in an array. I also have an array of the sounds. So each image and the corresponding sound are in the same position in the array, so it’s easy to play the right sound for the right image.

Now I want to shuffle the cards so that they appear in a different order each time the app is started up. I managed to shuffle the arrays into a random order, but kept the images and sounds in the same positions in each array but I can feel this getting messy and I’m sure this isn’t the best way to go about this problem.

If this were a flash movie, I’d use objects to link the images and sounds and stick the objects in an array. Can anyone help me with some code which would achieve the same thing for android? Bear in mind I’m a complete beginner with Java and have gotten this far with tutorials and basic concepts being the same as AS3.

  • 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-19T22:29:34+00:00Added an answer on May 19, 2026 at 10:29 pm

    I’d use objects to link the images and sounds and stick the objects in an array.

    Me too. Just create a class to wrap animals and sounds:

    class SomeNiceName{
        private final Bitmap animal;
        // I'm guessing the sound is in the resources
        // folder, thus you only need an integer to reference it
        private final int sound;
    
        public Animal(Bitmap animal, int sound){
            this.animal = animal;
            this.sound = sound;
        }
    
        public Bitmap getAnimal(){
            return animal;
        }// missing getter for sound
    }
    

    In this case I’m using an immutable object which is convenient in this case. Then you can create an array of those animals, o better yet a list:

    // array
    SomeNiceName[] array = new SomeNiceName[blah];
    array[0] = new SomeNiceName(someBitmap, theSound);
    // or with lists:
    List<SomeNiceName> list = new ArrayList<SomeNiceName>();
    list.add(new SomeNiceName(someBitmap, theSound));
    

    The only thing you would have to “disorder” in this case is one array.

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

Sidebar

Related Questions

No related questions found

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.