Tagged Questions
0
votes
2answers
24 views
ArrayAdapter mapping multiple arrays to Textviews
I am trying to use an ArrayAdapter with multiple arrays. This i a bit hard to explain for me.
What i have are a few Arrays which should be written in one TextView each in my ListView.
like -> Array1 ...
0
votes
2answers
31 views
Can I use this list to feed an Arrayadapter?
Can I use the code below to feed my adapter? If so, any idea how cause I seem kinda stuck. If not, is there another way to setup the arraylist so I do get 3 options per page without having to make a ...
0
votes
1answer
22 views
Error when I click on spinner
I'm trying to fill the spinner using a custom ArrayAdapter. I think the spinner is filled normal, but when the application opens it, it gets an error.
Obs: I don't speak english very well, sorry.
...
0
votes
0answers
27 views
Removing a custom object from an arraylist is returning false
I don't know what I'm doing wrong here, I have an array list made of of a custom object Profile. When a user clicks on an item in an array list the corresponding object is either added or removed to ...
0
votes
1answer
24 views
how to group array lists into one
How do you make these two array lists into one array list so that it still works in my arrayAdapter. I cant remember how to go about doing this.
public class MyArrayAdapter extends ...
0
votes
1answer
64 views
Android: Adding values in to array from button input and checking for correct order once all buttons pressed
So I'm building a sequence simulation test for my first android app. This involves displaying for example a grid of 9 values from 1 to 9 in a random fashion. The idea is to measure how long it takes ...
1
vote
2answers
181 views
Populate Listview from string array source, with a String ArrayAdapter [duplicate]
I need to populate a listview with an array from string resources. How do I pass the array to my adapter? When I try following I get the error below
ArrayAdapter zooAdapter = ...
0
votes
1answer
54 views
Nullpointerexception: display data with a arrayadapter in a listview
Hy guys!
My problem is that i get a NullpointerException while creating the database. I think i am getting in trouble with the constructor or something else because th errer occurs at line 64 at the ...
0
votes
3answers
133 views
how to ensure an arrayadapter does not accept duplicate values
i have a custom arrayadapter with some pre_populated data and more data is to be added to it from the user input.The problem is that duplicate values are still added to the arrayadapter..here is my ...
0
votes
1answer
37 views
ArrayAdapter<String> - string through WiFi socket, adding only one string, in updateUIThread
I am configuring my socket server that receives messages from client app on another phone. Everything works great accept that list view is not adding incoming messages except the first one. I think it ...
0
votes
2answers
37 views
How to retrieve all the values from a custom arraydapter
i have implemented a custom array adapter for my project,so far i am able to add and delete items from it and it displays them in the ListView too
dynamically..however i have a button in the ...
0
votes
1answer
83 views
how to create a list row item with more than one view
I have a list item with more than one view,a textview and an imagebutton,,but the structure of the ArrayAdapter only allows a single TextView therefore i am not able to view and click on the ...
1
vote
3answers
1k views
The constructor ArrayAdapter<String>(int, ArrayList<String>) is undefined
Well the title says it all. I'm not sure why it doesn't want to work.
This is in an AsyncWorker so that might be the issue. Also the variables are outside of a protected method but the same happens ...
0
votes
2answers
248 views
How to set tag the checkbox from a string array android?
I am having a activity and in same activity I have a array adapter class with checkbox.
As you can see I get the data from webservice. So after parsing the json data I get the userIDs in string array ...
0
votes
0answers
91 views
How to set tag for a checkbox in android?
In my activity i have a string array, which consists of some numbers.
and I have a adapter which consists of checkbox as follows.
public class sendivitesadapter extends ArrayAdapter<Item>{
...
0
votes
3answers
105 views
Get the ID of checkbox from custom adapter in android?
I have a Custom ArrayList as follows.
public class sendivitesadapter extends ArrayAdapter<Item>{
private Context context;
private ArrayList<Item> items;
private qrusers ...
0
votes
1answer
92 views
mImages & stringArray cannot be resolved to a variable
I'm getting error stating "mImages & stringArray cannot be resolved to a variable" however I'm unsure why. I have used the following example and I'm pretty sure I've followed it very closely.
...
0
votes
2answers
94 views
Android: How to create Array of ArrayAdapters for Array of Spinners
Android 4.0+
I have 10 spinners, have loaded into an array
I am trying to associate with 10 ArrayAdapters, using an array of ArrayAdapters.
Not working...
ArrayAdapter<CharSequence>[] adpPPI;
...
-1
votes
1answer
247 views
How to set an String Array to an Array Adapter in android List view with check box?
I am getting a string[] Array and storing it in an String array [variable mystrings],Now i want this array to display it in a list view with check box .
ec_checkbox_number.xml
<?xml version="1.0" ...
0
votes
1answer
214 views
Android life cycle of an object in a listview, arraylist and arrayadapter
I'm building a prototype app that helps researchers track a small cohort (8-10) of subject patients. They need to periodically update the patient information. I want to be able to touch a button to ...
0
votes
4answers
197 views
ListView not populating via Array Adapter
public class HotelListAdapter extends BaseAdapter
{
LayoutInflater inflater;
HotelInfo a[] = new HotelInfo[5];
public HotelListAdapter(Activity context, HotelInfo[] b)
{
...
2
votes
1answer
52 views
Struggling with ArrayAdapter
I'm totally new to android programming, I'm trying to create a friendslist class.
First, I make an array that loads objects from a database:
friendArray = new Friend[NumberOfFriendsInDatabase];
...
0
votes
3answers
604 views
Convert Arraylist to Array, data of Arraylist is of custom class type
I have retrieved data from database and added to Arraylist using a class called AddDetails. In AddDetails class I am assigning all values. Then I have sent that ArrayList to activity class where I ...
0
votes
2answers
123 views
Get Text from Json and add it to String[]
I want to fetch a text (some urls) from Json and add them straightly to a String[] in android. The text is like
...
2
votes
1answer
104 views
Sorting two arrays with arrayadapter, files and files description
I have 2 arrays of String[]:
String[] mFileList;
String[] mFileList_description;
This is my function that shows alert dialog with list of files description:
private void Load_file_list(){
Dialog ...
2
votes
1answer
531 views
How to get the text randomly from the string array?
i want to get text value randomly values from the string array on the click event, with the using the Text Feild (AutoCompleteTextView).
java file here:
String[] questionsOpt = { "I just ejaculated ...
0
votes
0answers
560 views
how to disable an item in the spinner Android
I want to disable <item>Repeat 5 times</item> when user selects <item>Repeat 4 time </item> how can i implement this ??
ArrayAdapter<CharSequence> adapter = ...
0
votes
1answer
929 views
how do i keep adding data to an array to be displayed in a listview in xamarin for android
so far i have this:
btnAddContact.Click += delegate {
String[] nameList = new string[]{nameText.Text, ipText.Text};
var myAdapter = new ArrayAdapter(this, ...
0
votes
2answers
1k views
How to populate ListView from ArrayAdapter
I'm reading an HTML page and get values from a table consisting of two colums. These values I need to insert into a ListView.
I'm having a hard time grasping the concepts of Arrays, and ArrayAdapter, ...
0
votes
0answers
241 views
How to show an array in a listview when the array data coming from resultset
I make a connection to a external SQL server and I can display the data in textview but I need to show them in Listview, and the only way I could pass data into Listview is with the following code:
...
0
votes
1answer
41 views
Second ListView showing up with a new array
I have 2 arrays:
Array1: A B C D E F
Array2: A1, A2, A3, A4, B1, B2, B3 ...
ListView1 | ListView2
A | A1 A2 A3 A4
B | B1 B2 B3
C | C1 C2 C3 C4
D | D1 D2
E | ...
0
votes
2answers
187 views
How to add/remove data from a list view (Android)?
I'm using a list view to displace names. The user needs to be able to add a name to the bottom of the list view and to be able to delete names within. The names are saved using SharedPreferences and ...
1
vote
2answers
1k views
How to setup multi-line listview using separate string-arrays (Android)
I am working on an application in Android that works with 2 screens. The firsts creen is simple, it has a TextView initialzed to "Not Set" and a Button. When the user clicks on the button, he/she is ...
0
votes
3answers
3k views
.setAdapter(adapter); Giving an NullPointerException
I am trying to make adapters for spinners, however I get an NullPointerException on answertime.setAdapter(adapter); Why is this? My arrays are in the strings.xml where they should be?
Here is the full ...
6
votes
4answers
9k views
Android: Get the listview item from button clicked in custom listview
I have a custom ListView with two button and I when I click either button on any row I want to get the text label on the Listview and for now just popup a toast with it. So far nothing has worked I ...
1
vote
3answers
6k views
Adding user input from Edit Text into List View
I'm trying to get a user input from Edit Text into List View, I had seen the answer to this similar question but I'm unable to figure it out
I tried this, received no errors from the IDE, but it does ...
-3
votes
2answers
672 views
String[] to ListView in Android
I want to make an list with two TextViews in each line.
I have String[] like this:
public class arrays {
public static String[] PodcastTitle;
public static String[] PodcastURL;
public static ...
0
votes
1answer
1k views
ViewPager + spinners + array cause app to crash
My app has two separate views that were originally separated using TabHost. I decided to switch to ViewPager to make the app more visually appealing.
But now the app crashes as soon as it starts. Now ...
2
votes
3answers
590 views
SimpleAdapter not showing data on GUI
This is the first android app I'm writing for the college I work at. It's basically a thin client that reads data from an xml on the site and prints it out to a List. I've ran into a strange problem ...
0
votes
1answer
2k views
How do i use one string array entry based upon its position within the array (Android)?
I'm trying to produce a simple oracle app where when you ask the app a question it spits out an answer based on a random number.
I've done some research and it seems to me the best practice way of ...