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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:40:46+00:00 2026-06-04T22:40:46+00:00

In my Android app I have multiple activities using different array resources and I

  • 0

In my Android app I have multiple activities using different array resources and I want to create one that has all of them. Is there an easy way to do this so that when I add an item to the string array it is automatically added to the “All” activity?

  • 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-04T22:40:48+00:00Added an answer on June 4, 2026 at 10:40 pm

    You need to create a generalized array in a class called ConstantCodes.java and declare your all arrays in it as follows,

    public class ConstantCodes
    {
           public static String[][] arrayCollection = { { "A11","A22","A33" }, 
                                        { "B11","B22","B33" },
                                        { "C11","C22","C33" } 
                                      };
    }
    

    Calling FirstActivity.java

    private String[] firstActivityArray = ConstantCodes.arrayCollection[0]; // this will return first stored array on 0th position.
    

    Calling SecondActivity.java

    private String[] secondActivityArray = ConstantCodes.arrayCollection[1]; // this will return first stored array on 1st position.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm starting an Android app which will have multiple Activities. It will be using
I have an android app that has mutliple activities The first main activity starts
I have an a Java Android app that calls different activities. I thought this
I have an Android app that has separate things going on but are all
I'm writing an app and I want one of my activities to have a
I have two different Search activities implemented with SearchManager in my app. One is
I'm creating an android app that will have multiple pages with the same layout,
I have an Android app that fetches data from the web service using ksoap2,
I have an app that's built for Android 2.2, so I'm not using the
I am using ANT to compile an Android app that I have built. It

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.