An array of strings that can be referenced from the resource class (R) in an Android application.

learn more… | top users | synonyms

0
votes
1answer
20 views

Android shuffle Questions and Answers (string arrays)

I am making an app in which there are list of questions and respective answers. Questions are in one string array, while answers are in another string array. I have implemented the following in a ...
0
votes
0answers
77 views

Reference a String Array with a String

I have created multiple arrays and want to be able to to put them in a list and then have that list, when clicked, display the new list of arrays. Here is what I have come up with so far. I am tring ...
1
vote
3answers
42 views

how to read items from string-array on android

I got a problem with reading items from string-array one by one. For example, i got string-array with 10 items: <string-array name="arr"> <item>First</item> ...
-2
votes
2answers
55 views

How to get string value from string array in Android

I am trying to create an application that reads an NFC tag and checks the tag against strings in a string array and then sets the text on another activity. I have got it working so that it checks if ...
0
votes
3answers
30 views

How to make a String array case insensitive in Android

I am currently creating an application that will read an NFC tag and look up the text of the tag against a string array to see if it is there. It works if the tag is case sensitive correct e.g. ...
0
votes
1answer
93 views

Checking for null in if statement isn't working in java

Here is my if statement: for(int i=0;i<SharedPrefsData.subscribers.length; i++){//loop through subscribers array if(SharedPrefsData.subscribers[i] == null ){//if string at index i is null ...
2
votes
3answers
49 views

Multiply textviews in a listview

There are 2 text views in each row, basically a Title and then a description underneath it. How do I set the text of each view within each row? @Override public View onCreateView(LayoutInflater ...
0
votes
0answers
22 views

Retrieving StringArray resource depending on the clicked button

I want to design a ListView that will be populated from a StringArray resource depending on which button was clicked. The array name will be retrieved and put into the getStringArray method like ...
0
votes
2answers
56 views

Write Parcelable for ArrayList<String []> in android?

I just created model with String array and array list of string array.Like this public class LookUpModel implements Parcelable { private String [] lookup_header; private ArrayList<String ...
0
votes
4answers
41 views

Android: Compare strings in array list and combine them

I'm wanting to compare the strings in an array list taken from my database and join them together.. Here is the code which collects data from my database.. public List<String> getData2List() { ...
0
votes
2answers
39 views

How to search a word in a 2d string array in C programming

How to search for the whole word in an 2d array of strings. This code outputs me only the first letter of the word I enter. can anyone help me with this ? And how is that index passed in a function ...
0
votes
1answer
126 views

using a table adapter to insert data into a SQL Server database from a string array in C#

I have the following method: public void LottoTest(object sender, EventArgs e) { Dictionary<int, int> numbers = new Dictionary<int, int>(); Random ...
0
votes
2answers
36 views

continue searching for random string from array avoiding duplicates and StackOverflowError

I use such a mechanism in my application: get random string from string array and put it in the SQLite database. Then I send this new string to the widget and to ArrayList for ListActivity ...
0
votes
2answers
57 views

How can I replicate select (HTML) in android string.xml file [duplicate]

I have to replicate <select> <option value="36">Volvo</option> <option value="45">Saab</option> <option value="56">Mercedes</option> <option ...
0
votes
2answers
36 views

Get count of correct and incorrect answers in comparison of string arrays is wrong

I am comparing two string arrays that is done i want to get how many are correct and incorrect in my below code. Help is appreciated. boolean foundtext = false; //outer ...
0
votes
1answer
45 views

Populate a Listview from a String-Array

I have a ListView where I'm filling it in through String tutorialTitle1 = getResources().getString(R.string.tutorial1_title);, but for the purpose and functionality of my app I have no choice but to ...
0
votes
2answers
79 views

How to Sort array values based on Edit Text input characters?

I am having an array of String which is being used to show in a spinner. Now my need is When the user giving their input in the edit text have to sort the array based on the edit text values ans ...
0
votes
0answers
42 views

Combine Multiple string-array imported from resource file

I am trying to import multiple string-arrays defined in the resource file and then combine them all to a single string array. But I have no idea how to do it. Please help. I am trying to somethinglike ...
3
votes
5answers
121 views

Can a java string array be used as a HashMap key?

If a HashMap's key is a string array: HashMap<String[], String> pathMap; Can you access the map by using a newly created string array or does it have to be the same String[] object? pathMap ...
0
votes
6answers
186 views

Explode and Implode(just like php) in java

I am new in JAVA although had a good experience in PHP , and looking for perfect replacement for explode and implode(Available in PHP) functions in JAVA . I have Googled for the same but not ...
0
votes
1answer
70 views

Java Displaying String on a JTextField after a JButton in a separate class is pressed

Currently working on a school project in which I am making a wheel of fortune replica in Java. I have a panel of JButtons within a class called buttonPanel, and a separate class, wheelGUI, which acts ...
0
votes
3answers
121 views

Insert Values from string[] arrays to an ArrayList of records

I will add the values in the String[] in to the Arraylist. But, I want to access those string values from the ArrayList. I tried this way. private void Form1_Load() { fr = new string[5] { "1", ...
1
vote
3answers
79 views

java - Convert String ArrayList to String Array with bigger size

I am trying to convert Array list to String array but getting an exception. Can somebody please help me. Size of ArrayList: 1 Size of String Array: 2 I am using the following code: String[] ...
0
votes
3answers
52 views

Moving from buffer to an array for manipulation in Java

I am making a program to take data from a .txt document, I have used the BufferedReader method which goes through the document. It then prints the the documents contents into the console. I cannot ...
1
vote
1answer
172 views

How to pass a String array to a webservice using soap libraries?

I need to pass a a string array to a predefined webserivce designed to accept an array of string values. However when I create a soap envelope and set array.class or string.class properties to the ...
1
vote
2answers
82 views

How to get the 1st match between 2 string arrays

I have 2 string arrays. The one is the base and the other is changing. string[] baseArray = { "Gold", "Silver", "Bronze" }; string[] readArray = { "Bronze", "Silver", "Gold" }; // After comparing ...
0
votes
2answers
148 views

How to store name of dynamic checkbox in an String array

How can store name of dynamically created checkbox in a String array when I don't know how many checkbox will user select at runtime. Say I have 10 dynamic checkboxes and out of 10 user select 6 ...
0
votes
5answers
50 views

String array index error

I use the following method, but every time i use it i got error. I cant figure out why because i perfrom this checking if(unWanted == null || unWanted[0] == null) The error is in this code: ...
0
votes
3answers
76 views

Null pointer exception for string array

I have the following code and i get Null pointer exception at this line: unWanted[g].equals("") I dont know how can it be because i check before that if unWanted isnt null. Thank for helping :) ...
-5
votes
4answers
104 views

Null pointer exception in for loop [closed]

I try to get string that I don't want from string array by getting the array into for loop. I try the following code but I get java.lang.NullPointerException and I don't know why. Thank for helping. ...
0
votes
2answers
109 views

Key string-array expected String[] but value was a java.util.ArrayList

Im new to android. how to get the array values from one class to another class using Intent?? I tried like this... 1st activity... Intent videointent = new ...
0
votes
1answer
124 views

Android Storing Drawable In Array

I'm currently trying to access and use an image in place of text in a Spinner I'm using. The below code works, if I were to use text specifically instead of drawables. I previously referenced this ...
0
votes
1answer
152 views

Add new string to resource string array dynamically

Im making workout log and i want that ther user will be able to add new exercise types. I made string array in the resources and a spinner that will take the strings from the string array in the ...
-2
votes
2answers
55 views

Cell of a String array and String doesn't match

here's my java code: String s="foo"; for(int i=0;i<5;i++) if(myArray[i]==s) return true; By debugging, i'm sure that the first element of myArray is the same as my string s, but they doesn't ...
4
votes
1answer
110 views

PHP string array to javascript string array parsing error

I've tried var name = <?php echo json_encode($eventname); ?>; and var name = new Array("<?php echo implode('","', $eventName);?>"); to parse my name string array from PHP to ...
0
votes
4answers
470 views

Android - String Array to ListView

I am new to Android. Please help me. I have two String Arrays as below: String[] Array1 = {"ele1", "ele2", "ele3", "ele4", "ele5", "ele6"}; String[] Array2 = {"obj1", "obj2", "obj3", "obj4", "obj5", ...
2
votes
1answer
54 views

Array.toString data handling in Java

I'm confused the way data has been manipulated here in this case, thought will seek someones advice. arrayDataOne = [ HEllO, NAME, ADDRESS, ZIPCODE ] i.e [0] = "HELLO" [1] = "NAME" [2] = ...
1
vote
3answers
841 views

Java - Convert String to String Array

I am new to Java. Please help me. Below is the string after implementing HTTP POST method as a response: {"Result":"{ \"Search\": [ { \"Code\": \"200\" }, { \"Message\": ...
0
votes
1answer
43 views

Easiest way to send a String Array from a JSP to a Servlet [closed]

I searched and got many ways to send a String array from a JSP to a Servlet. Can anyone tell me which is the easiest way? It would be helpful if you could give me a link where it is explained in ...
-3
votes
1answer
87 views

Best algorithm to validate that all items of one string array occur in another string array

I have two string arrays, one containing file names like file1.docx, file2.docx, file3.docx and another array comes from UI controls and has to be like first one but having date added. I need to ...
1
vote
5answers
96 views

NullpointerException on string-array

I got a problem with my android application.. Im using string-array to show items from there in TextView, but everytime i get NullpointerException, can you help me and show where im wrong? Here is ...
0
votes
3answers
177 views

Issues Passing String Data Between Two Classes

I need to share certain strings with my service class however when I attempt to do so I'm getting two errors stating "myWifiInfo cannot be resolved" when attempting to implement a string array using ...
1
vote
1answer
53 views

The findResults method in Groovy seems not to work on a String Array

I tried to invoke method "findResults" on a split String, but got a compilation error. Splitting a String returns a String Array, which I thought would be regarded as a Collection in Groovy. Other ...
0
votes
2answers
146 views

c# read/store data in a file?

What I want to do is actually have my program open up and set a string array so that i can use it for if commands (its used to block people) and I want to store another string in there so that it can ...
0
votes
3answers
214 views

Comparing two string arrays with a Nested For loops

Hi I'm trying to find matches between two string array using a nested for loops. However it seem to have looped around more times. for(int i = 0; i < ca; i++) //ca contains 10 { for(int j = 0; ...
0
votes
4answers
540 views

Compare the index of 2 String arrays with different values Java

I have 2 parallel arrays: the first contains State Names, the second Capitals of the states. I'm making a quiz that randomly generates a State then asks the user to enter the Capital of the state. ...
1
vote
1answer
264 views

Node.JS string array sort is not working

Hi I am absolute beginner of node.js Today I tried the following code var fs, arr; var dir, str; var cont, item; fs=require('fs'); cont=fs.readFileSync('unsort.txt').toString(); ...
0
votes
3answers
88 views

String array calculation

i have a string array like String[] resultYears = {"2013/07", "2013/08", "2013/09", "2013/10", "2013/11", "2013/12", "2014/01"}; when i get this through response in my jsp, <% String[] ...
0
votes
2answers
579 views

Return array list from asynctask, android json parser

I have a requirement where i need to parse the content of a URL in JSON format. I am able to do that successfully. But i need to save the contents of the URL in a array list and pass them back to the ...
0
votes
2answers
349 views

How to add a String Array in a JSON object?

I am trying to create this JSON object on android. I am stuck on how to add a string array in the object. A = { "class" : "4" , "name" : ["john", "mat", "jason", "matthew"] } This is ...

1 2 3 4 5 6