Tag: listview

How to prevent OnItemClickListener work when long click performed?

I have a gridview and i want its items to act different if user performs click or long click that is why i am using OnItemClickListener and OnItemLongClickListener but when long click happens both listeners react.I want to perform only OnItemLongClickListener.

Android ListView background colors always showing grey

I have a ListView that I’m populating from a custom ListAdapter. Inside the Adapter (in the getView(int, View, ViewGroup) method) I’m setting the background color of the View using setBackgroundColor(int). The problem is that no matter what color I set the background to it always comes out a dark grey. It might also be worth […]

Android – Reverse listview as message display

I’ve got a little question for my Android App. I searched for a long time but found nothing about my problem. Scenario : I’ve to display a revert listview (as Facebook Messenger). And when the user scrolls to the top, load more messages. Problem : After notifiyDataAsChanged() call, the scroll is not the same! I […]

Android Handler Message and ListView

I apologise now for the LONG post but this is the only way I could explain, and google gives 3 pages of results that aren’t conclusive Here’s my error guys: *** Uncaught remote exception! (Exceptions are not yet supported across processes.) android.util.AndroidRuntimeException: { what=1008 when=368280372 } This message is already in use. at android.os.MessageQueue.enqueueMessage(MessageQueue.java:171) at […]

what is android.R.layout.simple_list_item_1?

In all the examples I’ve seen they just use “android.R.layout.simple_list_item_1″ when creating an ArrayAdapter. What is android.R.layout.simple_list_item_1,Is it just the name of a layout file called simple_list_item_1.xml or is it the id of the TextView required for the array adapter? How do I see the content of the file or use my own file from […]

how to refresh custom listview using baseadapter in android

sir, how can i refresh my custom listview using baseadapter. i don’t know what to place, or where to place it in my code. please help me. thanks in advance public class EditDetails extends Activity{ public String nameChanged; public String numChanged; public String name; public String num; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.editdetails); final […]

How to update ViewPager content?

This question already has an answer here: ViewPager PagerAdapter not updating the View 34 answers

How update ListView in ListFragment from FragmentActivity?

I’m using a ListFragment within an FragmentActivity together with a SimpleCursorAdapter and a modified CursorLoader. The modified CursorLoader simply issues rawQueries – no other changes. At some point in the FragmentActivity I need to refetch the data/cursor that feeds the ListView in the ListFragment. How can I do that? Many thanks in advance. Here’s the […]

EditText in ListView hidden by keyboard when focused

I have a ListView containing rows with EditText’s. When I click on an EditText and it’s not already focused it receives focus, the keyboard appears and the EditText is moved above the CandidateView (desired behaviour). However when I make a key press, the EditText maintains focus and receives the input but moves down and is […]

unable to select row in listview in a popup in 4.1 but working in android 5.0

I have a popup in my page which has a listview. I have created design of popup in a seperate xml and loading it on some button click in my main page. The popup has a listview with each row having a image and a textview. I am not able to get row selection in […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.