A concrete BaseAdapter that is backed by an array of arbitrary objects.
5
votes
0answers
511 views
Why doing listview.setAdapter(_adapter) twice crashes app?
The key issue I have is doing lv_apps.setAdapter(_adapter) TWICE is what crashes my app.
(Basically, when i call populateListView_trial() the 2nd time, app crashes -- and the offending line is ...
4
votes
0answers
100 views
Android sort ArrayAdapter with exceptions for two rows
I have an ArrayAdapter with Objects. Currently I sorted it with a compare-method. It works fine, but I have to switch to elements of the entries to the first and second row.
Can you help me by ...
4
votes
0answers
461 views
Updating first gridview element after getView inflates it twice
I'm creating a grid view of "documents" following the view holder/adapter pattern. In the activity I get callbacks from network classes so I need to be able to update each of the grid cells at ...
3
votes
0answers
559 views
Preload more Views using a ListView-Adapter
If I understand correctly the ListView-Adapter loads 1 more view then currently visible on the screen. Lets say view 1 to 5, plus not visible but preloaded view 6. If the user scrolls down, view 1 is ...
3
votes
0answers
148 views
MultiAutoCompleteTextView adapter notifyDataSetChanged
Is there a way to update a MultiAutoCompleteTextView's array adapter? I'm using the bellow code and it doesn't work. Please notice also that "emailList" is a String ArrayList. Thanks in advance
...
2
votes
0answers
49 views
Android list view of two TextViews can't implement TextChangedListener for each Row
I've got a ListView containing my own CookPoint objects. A CookPoint has a time and a temp, both of which can be edited. No mater how I try editing a Temp value in the first row changes ALL temps for ...
2
votes
0answers
176 views
How to know GridView numColumns before setting up adapter in case of auto_fit?
I am using GridView in my Android project, which is having auto_fit properties set for numColumns (with columnWidth set to 48dp).
I wanted to know numColumns value before setting up adapter, so I can ...
2
votes
0answers
188 views
Android - gridview showing duplicate value(twice)
I have 1 app in that i want to display gridview with textview and imageview....
This gridview must change it's value depending upon the button clicked i.e abc button clicked then gridview should ...
2
votes
0answers
246 views
How to keep focus TextView after notifyDatasetChanged() custom listview?
I have a listview adapter that when I modify my TextView , i call notifyDataSetChanged() on addTextChangeListener() method. But my TextView lose the focus.
How i can keep the focus, overriding the ...
2
votes
0answers
669 views
android - ViewPager (with TabHost) Fragment GetItem being called multiple time
I spent hours in searching some usefull post about my specific issue without success.
All the posts talks about setting list view layout to "fill_parent". But I don't have an explicit List View in my ...
2
votes
0answers
212 views
Android,Using ConvertView in Heterogeneous List Adapters?
Docs say:
... Heterogeneous lists can specify their number of view types, so
that this View is always of the right type (see getViewTypeCount() and
getItemViewType(int)).
I tried this way to ...
2
votes
0answers
471 views
Populating the row of an ArrayAdapter with a fragment
I have a fragment ArticleFragment which is passed an Article object.
The ArticleFragment is usually displayed in an Activity but I would like to reuse the fragment inside a ListView. Each row of the ...
2
votes
0answers
519 views
Jeff Sharkey Listview
I'm relatively new to Android and Java so forgive me if this is a stupid question. I'm using Jeff Sharkeys SeperatedListAdapter and I'd like to create a list like below, where it goes HEAD ...
2
votes
0answers
324 views
Android - custom adapter - getView method not called
I have classic ListFragment with ListView in it (no layout inflated). I am downloading "user's data" from server via JSON to simple List in Users.class. I want populate custom adapter with downloaded ...
2
votes
0answers
210 views
Android custom Listadapter
I want to let the adapter check if the submitted value is a file
but when I check
it only checks the first value so
for eg.
I submit
app (directory)
meta (directory)
this shoul look like this :
...
2
votes
0answers
3k views
How do you clean up an ArrayAdapter?
I am getting an out-of-memory condition when I use an array adapter and change screen orientation. I have made the smallest fully working code that exhibits this problem.
package com.foobar.test;
...
2
votes
0answers
2k views
Item and SubItem in ListView
I want to show Item and corresponding subitem in list view using Arrayadapter and android.R.layout.simple_list_item_2. I am able to list items with following code
XML file:
<?xml version="1.0" ...
1
vote
0answers
18 views
Adding more than 4 list items overwrites older list items
I'm creating an app where you can create multiple kitchen timers. I can add an new timer and it will appear in a ListView. When I create 4 timers there is no problem, they all appear and work. When I ...
1
vote
0answers
98 views
Change ArrayAdapter while filling up AutoCompleteTextView onTextChanged
I found many questions like this, but no answer. Is it possible to change the ArrayList of the adapter while AutoCompleteTextView is being typed?
private void setUpAutocomplete() {
final ...
1
vote
0answers
29 views
ParseRelation won't be created in ArrayAdapter
I'm trying to create a parse relation between Card object and user Object. When user clicks on like button in a row in custom arrayadapter i see "saved" message but relation won't be added on Parse ...
1
vote
0answers
49 views
Android Custom Arrayadapter showing dynamically created layouts [Solved]
I've created a custom Arrayadapter wich works fine with a simple Layout which includes a TextView. But I need to have two types of Items listed (First the simple Text Item which already works and on ...
1
vote
0answers
136 views
getView() method of ArrayAdapter repeats last item and copy to the first item
I have a listview of EditText , they visualize three at a time and then scroll . the problem is that when I scroll down my first EditText fills the last , I can not understand what has gone wrong , ...
1
vote
0answers
48 views
App works fine in Debug mode but crashes when running directly
I'm working on an Android app developing project, and I'm stuck with a strange situation which is seems to be caused by the constructor of CursorLoader.
My app works fine in debug mode, but crashes ...
1
vote
0answers
121 views
AutoCompleteTextView suggestion list is always delayed by ONE character, why?
I am having a really hard time figuring out the following problem or bug or whatever it is. I have an AutoCompleteTextView and every single time the user enters a character, a http request is called ...
1
vote
0answers
61 views
Adapter NullPointerException
I have my Adapter and I read the values in a document XML. The ArrayList.size() is = 3. When a run the App, the error is java.lang.NullPointerException.
The class object I think than is all ok.
...
1
vote
0answers
63 views
Android two Adapters ListView & AutoCompleteTextView
For some reason my Adapters get mixxed up,
if i comment allItems.add(item.getString()); within my addItemToList(View view) method, then i can add items to my listview but they dont get added to the ...
1
vote
0answers
36 views
Android Listview row is affecting other rows
I am running with an odd issue for few days. Googled about it and also searched in stack overflow. But still I am not figure out where its going wrong.
Kindly help me to fix this.
Context Android ...
1
vote
0answers
52 views
Temporarily holding items in a ListView
I am looking for a solution to temporarily house data in a ListView without saving to SQL until a parent table has been saved. The reason being, this data is dependent on a parent SQL Table via ...
1
vote
0answers
333 views
Android ArrayAdapter, BaseAdapter not calling getView()
I am extending ListFragment to display data retrieved from a web server in an AsyncTask in another class. If I set a custom height (i.e. 400dp) on the @android:id/list widget in my xml, getView() does ...
1
vote
0answers
167 views
Custom array adapter doesn't work in DialogFragment
I want to populate a list view with custom array adapter, however it looks like getView() is never called. Below is my code, this part creates the dialog:
@Override
public Dialog ...
1
vote
0answers
40 views
Simple table to display with links to other views in android
I need to display a table with an undefined number of rows, and those rows contain links that could scroll the page to other views or start a new activity.
Those rows are a bit complex: I need 1 ...
1
vote
0answers
28 views
Android ArrayAdapter Error
Here is my code.
I am getting error while I am trying to reach my query results.
(07-04 08:31:01.811: E/CursorWindow(5090): Failed to read row 0, column -1 from a CursorWindow which has 1 rows, 3 ...
1
vote
0answers
196 views
java.lang.IndexOutOfBoundsException during adapter filtering
This part of the code is supposed to filter through the objects in the adapter and remove or add objects in the listview depending on the user input. However when I try to put in any letter I get an ...
1
vote
0answers
45 views
creating customize listview through arrayAdapter
Whats wrong in this code..
public class MoviesListActivity extends ListActivity {
private ArrayList<Movie> moviesList;
private ArrayAdapter<Movie> moviesAdapter;
...
1
vote
0answers
44 views
Item disappear in an endless ListView
I'm using an AsyncTaskLoader to load paginated data into an ArrayAdapter, but when I rotate the device, all of the previously fetched data will be cleared and the top of the list will now start at the ...
1
vote
0answers
152 views
CheckedTextView not changing drawable
I want the user to be able to select multiple apps from a list. I'm using a custom layout for a list of installed apps with their icons using Drawables and CheckedTextViews. I created a class extended ...
1
vote
0answers
67 views
Using a certain drawable under certain conditions in an Adapter
I have a custom calendar view which I want to display certain drawables depending on if the day is selected or if the that specific day is the current date
current date image
and this would be the ...
1
vote
0answers
166 views
Using SimpleCursorAdapter and ArrayAdapter in a CustomAdapter
I have a ListView, the first 5 elements of which is to be populated by elements retrieved from an array defined in the strings.xml. These are static and will never change. The rest of the elements ...
1
vote
0answers
124 views
Android : Spinner throws IndexOutOfBoundsException after adapter setting
Seems very primitive problem, but..
I have method, where I create and set an custom adapter :
public void fillCountryAdapter()
{
Log.i(TAG + "fillCountryAdapter","");
...
1
vote
0answers
628 views
Android ViewPager as an item of a GridView
I've seen a few questions on making a GridView span over multiple "pages" using ViewPager, but what I am trying to do is to have a ViewPager as an item within a GridView.
Here is a simple image ...
1
vote
0answers
73 views
AutoCompleteTextView on Filtering one to one not working
Hi I am using two autoCompleteTextView STATE and CITY. Here CITY filtered and shows according to the state selected. But when I save the text and come from onResume.
Here I face a problem like if the ...
1
vote
0answers
468 views
Android Choreographer callbacks and next nullpointer
I'm designing an app in which I used a custom ArrayAdapter and overrided the getView() method in order to fill a subclass of GridView. When I run it I get a NullPointer that I'm fairly certain is ...
1
vote
0answers
71 views
ArrayAdapter retains views on Android 4.3
This only happens on Android 4.3, physical device and virtual emulator.
I have a list view that I fill with a custom adapter
...
1
vote
0answers
264 views
remove checkbox item in ArrayAdapter and listview
I make an application to show the name of a country in two languages, and a check box to use for contextual action mode.
After remove the selected item the checkbox auto checked next item.
I try to ...
1
vote
0answers
627 views
Iterate loop inside getView() method of ArrayAdapter<CustomWrapperClassObject>
I have a data wrapper class where i set & get some values, adding to this i have some dynamic values coming from server and i have added a SortedMap in this wrapper class to set when i receive it ...
1
vote
0answers
192 views
I cant seem to get my listView for android working
I am working along with a book (The big nerd ranch guide, Android) and i am trying to get a listView working. It has worked in the past and i dont believe i have changed any code, but when i run my ...
1
vote
0answers
184 views
ArrayAdapter text filtering breaks in DrawerLayout
I have the unfortunate feeling that this is simply a bug with Android, being that DrawerLayout is still relatively new.
Basically what I have is a ListView, with an ArrayAdapter set on it. I was ...
1
vote
0answers
146 views
Inflating a layout in getView with inflator vs super.getView()
It seems that I have two ways to inflate a row layout in getView:
1)
convertView = super.getView(position, convertView, parent);
2)
convertView = mInflater.inflate(R.layout.row, parent, false);
...
1
vote
0answers
265 views
ListFragment to display multiple pieces of data for each list item?
I am using a ListFragment to display search results that are returned from a REST call. The ListFragment only displays a single piece of data (a name), but I want it to display multiple pieces for ...
1
vote
0answers
108 views
updating listviews android
I am very new to android! I've created a vertical linearlayout with two listviews inside my listfragment and I just want every of this listviews show simple array of strings which I can update during ...