android-listview

Drag Drop and Reorder elements in ListView

痴心易碎 提交于 2020-01-06 16:48:23
问题 I'm following this library to add drag - drop functionality my listview. Everything is fine when moving first item to second place. But when I move the listview first element to third place app crashes. In order to explain my situation I've added image. All I think it is caused at Swap items line but i think my code right. When I try to replace first item to third item, app is crashing. Any help will be valuable for me. Thanks for helpings. Here is my adapter code. public class

how to setImageResource in listview?

和自甴很熟 提交于 2020-01-06 16:18:20
问题 i store image name in sqlite, i get names with a query and i need to set image resource. i try this : ImageView img_categlist = (ImageView) findViewById(R.id.img_categlist); int imageid = getResources().getIdentifier(Image[position], "drawable", getApplicationContext().getPackageName()); img_categlist.setImageResource(imageid); int save = db.sh_categtest("charterdb", "test"); Image = new String [save]; for (int i = 0; i <save; i++) { Image[i]= db.nam_nametest("charterdb", "test", i, 15); }

setOnItemClickListener is not working in list-view android

为君一笑 提交于 2020-01-06 15:15:53
问题 I am trying to move to other activity by clicking on list item which is loaded in list-view, but i don't why it is not moving to any other activity when i click on any list item nothing happens no crash, not moving to other activity nothing. Can any-one help me please. I searched lot and got so many solution but any of the solution is not working in my case. Please help below is my activity code. public class Classes_Ext_DB extends Activity implements OnClickListener { ImageView

Implement ListView and YouTubeFailureRecoveryActivity together in android app

巧了我就是萌 提交于 2020-01-06 14:06:34
问题 I am trying to implement something like which would be ideally like this but since multiple inheritance is not supported, MyClass ABC extends ListActivity,YouTubeFailureRecoveryActivity{ } I am using now MyClass ABC extends YouTubeFailureRecoveryActivity{ } and implementing listView using something like this but it is not working,the app works well on 2.3 but crashes sometimes in 4.1 The app crashes in 4.1 at convertView = layoutInflator.inflate(R.layout.episode_list, null); Is interface the

Implement ListView and YouTubeFailureRecoveryActivity together in android app

*爱你&永不变心* 提交于 2020-01-06 14:05:13
问题 I am trying to implement something like which would be ideally like this but since multiple inheritance is not supported, MyClass ABC extends ListActivity,YouTubeFailureRecoveryActivity{ } I am using now MyClass ABC extends YouTubeFailureRecoveryActivity{ } and implementing listView using something like this but it is not working,the app works well on 2.3 but crashes sometimes in 4.1 The app crashes in 4.1 at convertView = layoutInflator.inflate(R.layout.episode_list, null); Is interface the

GetChildView gets not called

六眼飞鱼酱① 提交于 2020-01-06 12:39:48
问题 I have searched similar threads but they didn't help me and they were light different or they still are unanswered, so I'll describe my trouble. I have an ExpandableListView with a custom ExpandableListAdapter and I can show my Groups but not my Children . GetChildView don't get called anyway. I would thank you for your Help. EDIT: If I log this section ... client = (ExpandableListView)row.findViewById(R.id.field_expandable_list); client.setFocusable(false); client_adapter = new ClientAdapter

GetChildView gets not called

…衆ロ難τιáo~ 提交于 2020-01-06 12:39:30
问题 I have searched similar threads but they didn't help me and they were light different or they still are unanswered, so I'll describe my trouble. I have an ExpandableListView with a custom ExpandableListAdapter and I can show my Groups but not my Children . GetChildView don't get called anyway. I would thank you for your Help. EDIT: If I log this section ... client = (ExpandableListView)row.findViewById(R.id.field_expandable_list); client.setFocusable(false); client_adapter = new ClientAdapter

listview not display after changing orientation

帅比萌擦擦* 提交于 2020-01-06 12:36:50
问题 I Have listview in my xml file. Below listview I have other layouts. If I set android:layout_weight="1" in listview then after changing orientation it does not scroll and only layout below listview is visible . If I remove layout_weight="1" from listview then without changing orientation also listview is not visible. Here is my xml: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout

change listview row background based on a choice from other activity:

╄→尐↘猪︶ㄣ 提交于 2020-01-06 12:29:30
问题 Following my privious qustion that you can see here: How to create custom listview for android with margins between 2 elements? I have made some progress due to the help I recived here. So my state right now is: http://i.stack.imgur.com/yK5to.jpg pressing on the blue part of one of the tasks pops the following color plate activity: http://i.stack.imgur.com/UWmIg.jpg all the 5 colors here are buttons, what i need to do is to check what color was pressed and then change the background drawing

change listview row background based on a choice from other activity:

谁说胖子不能爱 提交于 2020-01-06 12:27:06
问题 Following my privious qustion that you can see here: How to create custom listview for android with margins between 2 elements? I have made some progress due to the help I recived here. So my state right now is: http://i.stack.imgur.com/yK5to.jpg pressing on the blue part of one of the tasks pops the following color plate activity: http://i.stack.imgur.com/UWmIg.jpg all the 5 colors here are buttons, what i need to do is to check what color was pressed and then change the background drawing