android-listview

Strange behaviour in Android listview when loading images with asynctask

泪湿孤枕 提交于 2020-01-02 16:23:51
问题 I hope anyone can help me with the ListView problem I got.I have been slamming my head against a iron wall yesterday because i could not figure out what the problem was. It's not originally my project which makes it even harder. I got a listview where I wanna load rows of contacts in. On the left side of each row I wanna (Down)load an Image async. For this i am using the following ArrayAdapter and ListItem layout, please ignore the deprecated functions. Here is a video http://www.youtube.com

Android more complex ListView tutorial [closed]

喜夏-厌秋 提交于 2020-01-02 15:45:10
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I've just started out coding for Android but am struggling to get my head around listviews. For example I need to understand how I can show another listview when clicking on an item in the first listview. Also how I can display a textview when clicking on an item in a listview. If anyone knows of any good

Listview, custom adapter and checkboxes

岁酱吖の 提交于 2020-01-02 10:27:22
问题 i got an issue with my adapter. Here is the code: @Override public View getView(final int position, final View convertView, final ViewGroup parent) { final ViewHolder viewHolder; View view = convertView; if (view == null) { view = LayoutInflater.from(mContext).inflate(R.layout.row, parent, false); viewHolder = new ViewHolder(); viewHolder.textTitle = (TextView) view.findViewById(R.id.title); viewHolder.checkBox = (CheckBox) view.findViewById(R.id.checkBox); viewHolder.checkBox.setTag(position

TextView with autoLink=“web” inside ListView has animation issue

心已入冬 提交于 2020-01-02 09:54:19
问题 I have a ListView. There is a TextView for each list row. For the TextView, I have set the following properties in the xml file: android:autoLink="web" android:focusable="false" android:focusableInTouchMode="false" Also, for the parent layout of the list row, I have set: android:descendantFocusability="blocksDescendants" The three focus-related properties were set after going through several SO answers for the problem in which the TextView used to become un-clickable if it contained a link (e

ListView Duplicates Android

让人想犯罪 __ 提交于 2020-01-02 09:40:47
问题 When I get a search result from my table, the results show up twice. The results "a / a", "aa / aa", and "ab / a" are all correct and should be there. However, I don't want the duplicate values in the third listview entry. Any ideas why this is happening? Main Screen // Set up search array for(int i = 0; i < isbn.length; i++) { searchArray.add(new InventoryItem(isbn[i], InventoryAdapter.getTitleAndAuthorByISBN(isbn[i]))); } Toast.makeText(getApplicationContext(), "searchArray.size()="

Android change ListView font

。_饼干妹妹 提交于 2020-01-02 07:56:11
问题 Seems to be a simple question, but since I am new to Android development I have very little idea about Android ListViews. Following is the code I have used for a ListView in my project. /*Listview code starts*/ mainListView = (ListView) findViewById( R.id.mainListView ); ArrayList<String> planetList = new ArrayList<String>(); planetList.addAll( Arrays.asList(values) ); listAdapter = new ArrayAdapter<String>(this, R.layout.list1, values); mainListView.setAdapter(listAdapter); mainListView

Android ShareActionProvider with popup menu - undesired duplicate list

匆匆过客 提交于 2020-01-02 07:47:25
问题 Okay this is a pretty specific one: My ShareActionProvider is being used on posts in a forum. It works (apart from pesky facebook but I understand that is a well-known issue). However, when I select the share option from my pop-up menu, two lists are drawn, one on top of the other. How can I fix it so only one list is displayed? Edit: At least two other questions exist on SO referring to this problem: I Use ShareActionProvider in PopupMenu, but show two PopupMenu? Call ShareActionProvider

ListView slowing down ViewPager swipe

陌路散爱 提交于 2020-01-02 07:37:24
问题 I have a ViewPager that contains ImageViews downloaded from the net and it slides just fine when my ListView (in another separate layout) is not initialized. But the problems start when my ListView is created. The ViewPager still "slides" but only slides about 1/4 of the way, lags, then loads the next ImageView correctly. All of the network and bitmap operations are done using AsyncTask. I've also used the RemoteImageCache API from Singly API which works pretty well. Any ideas as to why

Custom onInterceptTouchEvent in ListView

流过昼夜 提交于 2020-01-02 06:45:32
问题 How can I implement a custom onInterceptTouchEvent() in a ListView that give the scrolling priority to the child's of the ListView and as soon as they did their scrolling , give it back to the ListView ? I want to give priority to the inner views. 回答1: Try overriding onInterceptTouchEvent() of your children like this: @Override public boolean onInterceptTouchEvent(MotionEvent ev) { if(!isAtTop && !isAtBottom){ getParent().requestDisallowInterceptTouchEvent(true); } return super

Why setImageResource displays nothing?

余生颓废 提交于 2020-01-02 06:11:11
问题 I would like to display an icon in my ListView depending on the database value. I follow this answer to do so. But in result nothing is displayed. Here is what I have in my row.xml : <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <ImageView android:id="@+id/movie_subscribed_icon" android:padding="3dip" android:layout_width="wrap_content" android:layout_height=