adapter

notifyDataSetChanged() not updating my array for my spinner

耗尽温柔 提交于 2019-12-12 01:36:31
问题 QUESTION: If I set a variable prior to the onCreate can I use notifyDataSetChanged() to update an adapter that uses that array later? I am instigating my city_values array prior to my onCreate -This is the only way I can get the script not to show any errors. But once the user selects a state from its spinner it should use notifyDataSetChanged() to update the adapter that attaches the city_values array. Below is a small section of my code. I think my issue has to do with the city_value being

Need help installing MySQL for Python

孤者浪人 提交于 2019-12-12 01:17:53
问题 Trying to install MySQL for Python. Two problems: 1) Instructions over the net says installation is python setup.py For me, it results with can't open file 'setup.py': [Errno 2] No such file or directory 2) README.txt says: The Z MySQL database adapter uses the MySQLdb package. This must be installed before you can use the Z MySQL DA. You can find this at: http://sourceforge.net/projects/mysql-python Which simply leads to the package itself, not anything else. Thanks for your help. PS. I'm

ListView data not showing on android sdk

試著忘記壹切 提交于 2019-12-11 23:35:50
问题 I'm making an app and I have an activity called SearchActivity. I have two custom ListViews and one works well. My problem is the list used with AdapterEventos. When I start the app nothing appears in this list. The data from this list is added from a Post (DescarregarEventos method) and I think the problem is because the ArrayAdapter eventos is empty. If you see my code [1], the log that I print before the setAdapter of this list returns empty. Does somebody know how I can fix this? I'm

listview about adapter, for create a hashmap, why bitmap type imported cannot show image in listview?

戏子无情 提交于 2019-12-11 23:15:09
问题 list_data = list_data_add("111","222",icon); adapter = new SimpleAdapter( this, list_data, R.layout.list_item_detail, new String[]{"title","desc","icon"}, new int[]{R.id.title, R.id.desc, R.id.icon} ); listview.setAdapter(adapter); private List<Map<String, Object>> list_data_add(String title, String desc, Bitmap icon) { List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); Map<String, Object> map; map = new HashMap<String, Object>(); map.put("title", title); map.put("desc",

Deleting an Item from Listview by Clicking on ImageView widget

痞子三分冷 提交于 2019-12-11 19:27:17
问题 I'm trying to delete an item from ListView by Clicking on a picture (imageView). I must do it this way, I've managed to do it by click on the item itself but for this project I'm not allowed to do that. My Adapter extends BaseAdapter and my TaskListItem extends Relative Layout I'm using a custom layout xml. protected void onFinishInflate() { super.onFinishInflate(); textV = (TextView)findViewById(R.id.textViewTask); textP = ((TextView)findViewById(R.id.textPriority)); textR = ((TextView

Getting image from an url …the view stays empty

柔情痞子 提交于 2019-12-11 19:10:03
问题 In the way to create a Listview with some images I decided to do an AsyncTask for getting my image. So my code is like this: private class StableArrayAdapter extends ArrayAdapter<Request>{ private Context context; private Bitmap tempobmp; final User myUser = myapp.getUser(); private List<Request> mylist; public StableArrayAdapter(Context context,List<Request> mylist){ super(context, R.layout.request_layout, mylist); this.context = context; this.mylist = mylist; }public class ViewHolder{

How can reference two lists in one viewholder?

試著忘記壹切 提交于 2019-12-11 18:48:08
问题 I need your help.. First, Can I use two lists in one viewholder? ** This is my Recyclerview Viewholder structure. | (User's name) [ PBMS ]| | (User's PBMS) [ Matching rate ]| *PBMS means comparing my prefer to others and return matching-rate. *Also I have two model(User, PBMS). They have getter/setter/empty constructor, full constructor. *If I search users on specific condition, it will show users with matching result in the recyclerview. ** This is my firebase database. tkitaka ㄴUser

ListView not working android - custom view, ArrayAdapter

。_饼干妹妹 提交于 2019-12-11 18:06:51
问题 Does anyone see why my app crashes when I try to load this page with a ListView? Probably an easy fix but I'm new and not sure whats wrong! Trying to repeat scorecard_row in a listview, then using an ArrayAdapter populate each row with text 1-18, should be easy! But when I run the app and click on the page it crashes! If I change this line: ArrayAdapter adapter = new ArrayAdapter<String>(this, R.layout.scorecard_row, R.id.txtHoleNum, values); to ArrayAdapter adapter = new ArrayAdapter<String>

Win32API - Click Button on Winform Application through Adapter

早过忘川 提交于 2019-12-11 17:22:26
问题 I need to click on a windows form application button through my adapter using win32Api. I have found the button on the windows form screen using this code childHwnd = Win32API.FindWindowByPosition(ptr, new Point(intbtnx, intbtny)); Now I need to auto click this button. I am not sure how to do it. Need some help please. I have written this so far but this only fetches the button i need to click it. childHwnd = Win32API.FindWindowByPosition(ptr, new Point(intPwdx, intPwdy)); Need to click the

BaseAdapter in ListActivity isn't displaying the correct items

為{幸葍}努か 提交于 2019-12-11 16:04:14
问题 I have a ListActivity in which I am trying to display an ImageView under the List. I'm attempting to do this by creating my own BaseAdapter and using two different methods inside the getView method, one for the List and one for the ImageView . I managed to get the ImageView displayed under the List how I want it, but the problem I am having is the List isn't displayed correctly. For some reason any item in the list that isn't on the screen until the user scrolls down gets populated with the