Tag: listview

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 […]

Can't get values from Listview's EditText?

I’m trying to get data from EditText which is in my Listview. I saw a lot of similar questions & got a solution. But it throws an NPE in my Implementation. So please guide me to fix this issue. Adapter public class Coscho_adapter extends BaseAdapter { Context con; ArrayList<HashMap<String, String>> list; LayoutInflater mInflater; EditText marks; […]

Display new items at the top of a ListView

I’m using a list to populate a ListView (). The user is able to add items to the list. However, I need the items to be displayed at the top of the ListView. How do I insert an item at the beginning of my list in order to display it in reverse order?

Android ListView fast scroll with sections: section text too long

I am using ListView to implement a timeline. I enabled FastScroll and used SectionIndexer so that user could drag the scrollbar and see the section text displayed. The problem is all these are built-in UI. The textview that displays the section text is too small for me, I am trying to display 05pm and it’s […]

ListView with Alphabet on Android

I want to do a listview on android and it contains an alphabet near of the list (like iphone application). I couldnt find any way to implement an list and having alphabets, when ı click on c letter list scrolling and start with the c Letter. Thanks

Android – MapView contained within a Listview

Currently I am trying to place a MapView within a ListView. Has anyone had any success with this? Is it even possible? Here is my code: ListView myList = (ListView) findViewById(android.R.id.list); List<Map<String, Object>> groupData = new ArrayList<Map<String, Object>>(); Map<String, Object> curGroupMap = new HashMap<String, Object>(); groupData.add(curGroupMap); curGroupMap.put(“ICON”, R.drawable.back_icon); curGroupMap.put(“NAME”,”Go Back”); curGroupMap.put(“VALUE”,”By clicking here”); Iterator it […]

Android ListView fixed height item

Got a little problem. I’d like to create an android list view activity with all items in the list having a fixed height. So, my item layout (thread_item.xml) looks like this: <?xml version=”1.0″ encoding=”utf-8″?> <RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:layout_width=”fill_parent” android:layout_height=”300dip” > <TextView android:id=”@+id/thread_item_title” android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:text=”[dummy]” android:textSize=”20dip” android:textStyle=”bold” /> <ImageView android:id=”@+id/thread_first_image” android:layout_below=”@id/thread_item_title” android:scaleType=”centerInside” android:maxWidth=”100dip” android:maxHeight=”100dip” android:layout_width=”wrap_content” android:layout_height=”wrap_content” […]

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