listactivity

Custom list clicking with checkboxes in Android

I've populated a ListActivity from a cursor using SimpleCursorAdapter that starts another activity when one of the list items have been clicked. I'm also using ViewBinder to do some custom transformation of the data. I want to add a checkbox to each row in the list so I've changed the view and added a CheckBox with gravity right. Addi...

update Android ListActivity when list data changes

i want to know how to refresh the ListActivity when i change/add data to the list wich is dispayed. i first thougt the ListAdapter would know when the list is changed but when i add elements to the list there is no update, only when i close the activity and reopen it i see the changes. so i searched for any update() refesh() or somethin...

ListActivity: alter data from SQLLite before putting it into the row

This is my ListActivity: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.my_list); mDbHelper = new MyDbAdapter(this); mDbHelper.open(); fillData(); registerForContextMenu(getListView()); } private void fillData() { // Get all of the rows ...

ListActivity throws NullPointerException

Hey guys i have a ListActivity... a very simple at that... and it keeps throwing NullPointer Exception though i have done it exactly as the Sample List7 except that i have used the Layout inflater... below is the code... Can u plz comment the error i have done here?? import java.util.Vector; import android.app.Activity; import android....

ListActivity not scrolling

Hi guys... I have a list Activity 4 which i have extended the BaseAdapter and the getview looks like this... public View getView(int position, View convertView, ViewGroup parent) { View row=null; for(int i=0;i<10;) { row = convertView; if(row==null) { ...

android simplecursoradapter not updating with database changes.

I have an android list activity that is backed by a database cursor through a SimpleCursorAdapter. When the items are clicked, a flag field in the coresponding row in the database is toggled and the view in the list needs to be updated. The problem is, when the view that's updated goes off screen and is recycled, the old value is ...

ensure visible on android listview?

Is there a way that I can makle sure a given item in an android listview is entirely visible? I'd like to be able to programmatically scroll to a specific item, like when I press a button for example. ...

Android: How to have a shared menu in each (List) Activity without re-writing the overridden methods?

I know that Android provides some useful methods to be overridden in order to define a menu: @Override public boolean onCreateOptionsMenu(Menu menu) { menu.add(0, AIS, 0, "Activity Inventory Sheet").setIcon(android.R.drawable.ic_menu_upload); // ... return true; } public boolean onOptionsItemSelected(MenuItem...

Android - Activity vs. ListActivity - Which one should my activity class extend?

Hello everyone, I've been learning to develop in Android and had more of a general question: If I have a layout that uses a list and some other views, should I be using Activity or ListActivity for my activity class? I know that ListActivity will probably make things easier to override list-specific events, but is there any other advan...

can any one provide me example of Two_line_list_item in Android?

hi, i am new to adroid development can any one provide me two_line_list_item example...??? any help would be appriciated.. ...

How do you activate checkmarks in list activity?

I have a ListActivity with an array adapter declared like arrayAdapter = new ArrayAdapter<String> (this, android.R.layout.simple_list_item_checked); This shows a bunch of rows with checkmarks on the far right. Can you tell me how to get a reference to those checkmarks or how to check/uncheck them? ...

Making a list view like the favorite tab on native dialer in android

Hello all, I am making an android application that shows a list with users, I would like to add the image,name,status,and a button in every row of the list, just like in the androids 1.6 native caller-> favorites tab.Until know I have managed to add the image and name using an ListActivity but when I try to add the button the list become...

notifyDataSetChanged(); source not found exception?

friends, i have problem in calling notifydatasetchanged(); it is giving me exception source not found can any one guide me what mistake am i doing? if i assign data on create it works fine. but in case of updating list it wont. any help would be appriciated. private static EfficientAdapter adap; //global variable @Override pub...

how to disable Touch Screen in Android Phone?

dear friends, while showing progress bar i want to disable touch screen to restrict other functionalities in android phone. can any one guide me how to achieve this? any help would be appricated. ...

how to change color of Android ListView Seperator line?

friends, i want to change color of android list view seperator line. any help would be appriciated. ...

Android: failed to setContentView when switching to ListActivity

[update] I got the error, which says "Your content must have a ListView whose id attribute is 'android.R.id.list'". Appearently nothing in my xml is ListView. But is that required? This is an follow-up issue on my previous question http://stackoverflow.com/questions/2548304/android-which-view-should-i-use-for-showing-text-and-image I r...

Android: Adding static header to the top of a ListActivity

Currently I have a class that is extending the ListActivity class. I need to be able to add a few static buttons above the list that are always visible. I've attempted to grab the ListView using getListView() from within the class. Then I used addHeaderView(View) to add a small layout to the top of the screen. Header.xml <?xml versi...

ListActivity Item with remote image

Hello, I have a ListActivity that should display quite a lot of items and where each list item should contain a text and and an image. The images are gotten from a remote server. How can I display the remote image on the list item. Thanks in advance ...

Add an Overlay of layout in Listactivity

Hi, I am tryin to make a layout appear when even I clich on a row of listactivity. The Overlay layout contains certain function which have to be performed based on the row selected in the list. Can anyone pls suggest me how to do it. ...

Android ListActivity ArrayAdapter filtering with no physical keyboard?

I have a ListActivity based on an ArrayAdapter with setTextFilterEnabled set to true. This works fine on a device with a physical keyboard. When I start typing something on the keyboard, the items get filtered. My question is how to get the same behavior on a device with no physical keyboard? ...