Tagged Questions
0
votes
2answers
30 views
Use Bundle to send a 2D string Array
I want to send a 2D array using bundle I used:
//TO SEND
Bundle b = new Bundle();
b.putSerializable("value",string_array);
//TO GET
String[][] array_string = (String[][]) b.getSerializable("value");
...
0
votes
1answer
25 views
Array for 2 listviews in 1 Android Activity
I’m new to android development… I want to pass data to 2 ListViews through an ARRAY . Should I use a 2D array.? Then how?
What I want to do is;
Eg:In ListView1 there are
Fruits
Vegetables
Meat
...
0
votes
1answer
26 views
Error in using multi-dimensional array with spinner in android
I am getting error for the following code which implements Spinner with multi-dimensional array.
Spinner sp1 = (Spinner) findViewById(R.id.spinner1);
String dept[][] ...
0
votes
1answer
113 views
Read 2d array values from file android
Hi I want my D2 int array to get its values from a file. if the file not exist i want to create it and set all the values of the aray to 0. then when the values changes in the array i want to click ...
3
votes
4answers
190 views
Sort 2d array by 2nd dimension
I need to sort my items depending on their price.
The price of each item is stored in a JSON array
I have created a 2d array to store the name and price
Something like this...
String [][] ...
0
votes
1answer
139 views
2d array copy column and row and proof if the contains is equal to or not
I would like to proof whether there is a Float.POSITIVE_INFINITY in my j-th column and row. But I do not know how I can do this, by not having an exploding time complexity. This means I do not want to ...
1
vote
4answers
223 views
2D Array Index Out of Bounds Exception
I am new to 2D Arrays, and while I think I understand it, I am unsure why I am getting this Index Out of Bounds Exception. I tried making the map size 70x100, and I still received the same error. It ...
3
votes
2answers
298 views
How to pass a two diamentional array from one activity to another activity?
I have a problem with passing my 2D string array from one activity to another activity
I tried some codes...but they show some errors
My string array is:
String[][] commuterDetails=new ...
1
vote
1answer
403 views
How to display 2D array in GridView
I have 2D array:
static final String[][] numbers = new String[][] {};
numbers[0][0] = "A";
numbers[0][1] = "b";
numbers[0][2] = "c";
numbers[1][0] = "d";
numbers[1][1] = "e";
...
0
votes
1answer
414 views
Choose random String from two dimensional array?
So what I have is a 2d array with the name of the drink, and the price Test[Name][Price]:
public static final String[][] Test = ...
3
votes
5answers
1k views
Pass 2D array to another Activity
how do i pass 2 denominational array object as a parameter to another activity
how to get two dimensional array string value in another activity
String [][]str;
Intent l = new ...
0
votes
2answers
230 views
I have a 2D array of custom objects. Must I instantiate each in Java?
dmap = new Tile[maxW][maxH];
for (int y = 0; y < maxH; ++y)
for (int x = 0; x < maxW; ++x)
dmap[x][y] = new Tile();
This is slow despite each Tile only having an ...
0
votes
1answer
73 views
Figuring out location of ImageView in a 2D array
Is there a way to find the location of a specific imageView given an ID in a 2D array? For example if I have ImageView [x][y] and each of the ImageViews has an ID, is it possible to find the specific ...