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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:04:22+00:00 2026-05-28T17:04:22+00:00

I am beginner level in android. how to create multidimensional array in android at

  • 0

I am beginner level in android.
how to create multidimensional array in android at runtime.

i want to create multidimensional array of EditText box dynamically (at runtime) and all should be disables except the first one.

if any one knows about this please answer.
examples will be appreciated.

this working ok..

TextView textView[][] = new TextView[2][2];

after this when i tried to assign data it throws nullpointor exception..

        for (int i = 0; i < 2; i++) {
        for (int j = 0; j < 2; j++) {
            editText[i][j].setText("data");
        }
    }
  • 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-28T17:04:23+00:00Added an answer on May 28, 2026 at 5:04 pm

    this is the code for multidimensional array of edittext and to display it as well as to disable it…

    layout = new LinearLayout(this);
        layout.setOrientation(1);
        layout.setLayoutParams(new ViewGroup.LayoutParams(-1, -1));
    
        EditText editText[][] = new EditText[2][2];
    
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < 2; j++) {
                editText[i][j] = new EditText(this);
                editText[i][j].setText("1");
                editText[i][j].setWidth(50);
                layout.addView(editText[i][j]);
            }
        }
        for (int i = 1; i < 2; i++) {
            for (int j = 0; j < 2; j++) {
                // editText[i][j].setEnabled(false);
                editText[i][j].setClickable(false);
                editText[i][j].setEnabled(false);
            }
        }
        setContentView(layout);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am beginner to programming for android. First of all i need that my
I am a beginner on android platform, and I want to build a tracerouting
I create a dropdownlist from Enum. public enum Level { Beginner = 1, Intermediate
I'm developing a sample app for android and my level is beginner. For simplicity
level: beginner Below snippet is part of code that counts letters in an array.
Beginner level question Scenario: Have simple string cocantation tool, that I might expand later
This is a beginner level question for asp.net MVC I have the following code
I'm a beginner level programmer trying to make a game app for the iphone
I'm looking for suggestions for a beginner level ASP/XML test. Essentially I'm trying to
A beginner question, bear with me: I'm just wondering under what circumstances one should

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.