Comments (4)
No it's not a known issue. I can't answer out of the blue. You should just
debug and figure out what's going on there. If you start my sample
application does it work for you? If it does what's the difference between
sample application and your application?
2012/10/24 Rheza Pahlevi [email protected]
Hi,
i just implement lazylist to my application,but it doesn't work well, some
of the image not loaded to the image view, it will load if i scroll the
listview to the bottom. is there any fix for this ?, or is this known issue
?thanks
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/24.
from lazylist.
hmm, the example works great. is it possible if it's because the fragment activity ?, other than my adopter, all codes all exactly same with your example.
here is my adapter code,
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import com.fedorvlasov.lazylist.*;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PorterDuffXfermode;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.Bitmap.Config;
import android.graphics.PorterDuff.Mode;
import android.os.AsyncTask;
import android.text.format.DateUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.app.Activity;
public class SocialAdaptor extends ArrayAdapter<Social> {
private ArrayList<Social> social;
public ImageLoader imageLoader;
public SocialAdaptor(Context context,
int textViewResourceId,
ArrayList<Social> items) {
super(context, textViewResourceId, items);
this.social = items;
imageLoader=new ImageLoader(context);
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View V = convertView;
if(V == null) {
LayoutInflater vi = (LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
V = vi.inflate(R.layout.list_item, null);
}
Social o = social.get(position);
TextView posterName = (TextView) V.findViewById(R.id.poster);
TextView checkinStatusNew = (TextView) V.findViewById(R.id.statustext);
TextView checkinView = (TextView) V.findViewById(R.id.checkinTime);
ImageView profilePicView = (ImageView) V.findViewById(R.id.profilePicture);
TextView commentCountText = (TextView) V.findViewById(R.id.commentCountText);
commentCountText.setText(o.commentCount);
posterName.setText(o.employeeName);
checkinStatusNew.setText(o.activityText);
imageLoader.DisplayImage(o.employeePicUrl, profilePicView);
return V;
}
}
Thanks
from lazylist.
What context do you pass to your Adapter constructor? It should be activity
context not application context.
2012/10/24 Rheza Pahlevi [email protected]
hmm, the example works great. is it possible if it's because the fragment
activity ?, other than my adopter, all codes all exactly same with your
example.here is my adapter code,
import java.io.InputStream;import java.net.MalformedURLException;import java.net.URL;import java.text.ParseException;import java.text.SimpleDateFormat;import java.util.ArrayList;import java.util.Date;
import com.fedorvlasov.lazylist.*;
import android.content.Context;import android.graphics.Bitmap;import android.graphics.BitmapFactory;import android.graphics.Canvas;import android.graphics.Color;import android.graphics.Paint;import android.graphics.PorterDuffXfermode;import android.graphics.Rect;import android.graphics.RectF;import android.graphics.Bitmap.Config;import android.graphics.PorterDuff.Mode;import android.os.AsyncTask;import android.text.format.DateUtils;import android.util.Log;import android.view.LayoutInflater;import android.view.View;import android.view.ViewGroup;import android.widget.ArrayAdapter;import android.widget.ImageView;import android.widget.RelativeLayout;import android.widget.TextView;import android.app.Activity;public class SocialAdaptor extends ArrayAdapter {
private ArrayList<Social> social; public ImageLoader imageLoader; public SocialAdaptor(Context context, int textViewResourceId, ArrayList<Social> items) { super(context, textViewResourceId, items); this.social = items; imageLoader=new ImageLoader(context); } @Override public View getView(int position, View convertView, ViewGroup parent) { View V = convertView; if(V == null) { LayoutInflater vi = (LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); V = vi.inflate(R.layout.list_item, null); } Social o = social.get(position); TextView posterName = (TextView) V.findViewById(R.id.poster); TextView checkinStatusNew = (TextView) V.findViewById(R.id.statustext); TextView checkinView = (TextView) V.findViewById(R.id.checkinTime); ImageView profilePicView = (ImageView) V.findViewById(R.id.profilePicture); TextView commentCountText = (TextView) V.findViewById(R.id.commentCountText); commentCountText.setText(o.commentCount); posterName.setText(o.employeeName); checkinStatusNew.setText(o.activityText); imageLoader.DisplayImage(o.employeePicUrl, profilePicView); return V; }
}
Thanks
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/24#issuecomment-9730016.
from lazylist.
woa, that fixed the problem. Thank you so much!
from lazylist.
Related Issues (20)
- Not call to Bitmap.recycle(); HOT 1
- Please change decodeFile HOT 4
- The images aren't cache cross all activities HOT 1
- Race condition in MemoryCache
- Images only loads when i scroll in ListView HOT 1
- imageloader mixes up when using viewholder pattern HOT 6
- LazyAdapter getView function - findviewbyid returns null HOT 2
- how to return bitmap HOT 1
- MainActivity.mStrings out of date
- Query HOT 2
- Application get slow/hang when change your code HOT 5
- LazyList update(refresh) Listview
- Refresh Image
- Issue with android M HOT 3
- Not working in Marshmellow HOT 1
- Problem when retrieving images from sdcard
- Suddenly stop working HOT 8
- path instead url
- open
- open HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lazylist.