Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue on RemoteImageView used together with HorizontalListView (http://www.dev-smart.com/archives/34) #8

Closed
ghost opened this issue Feb 14, 2012 · 3 comments

Comments

@ghost
Copy link

ghost commented Feb 14, 2012

I can't get any web image to load, not even progress spinner showed up (i only see the spinner for brief moment when doing quick scroll), no errordrawable showed up either. I think there is internal issues here. Can you enlighten me on how to fix this.

gallery_layout:

<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    android:paddingBottom="4dp"
    android:paddingLeft="8dp"
    android:paddingRight="8dp"
    android:paddingTop="4dp" >

    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:paddingBottom="5dp"
        android:paddingLeft="8dp"
        android:paddingTop="5dp"
        android:text="Foods around here:"
        android:textSize="16dp" />

    <com.devsmart.android.ui.HorizontalListView 
        android:id="@+id/gallery_list"
        android:layout_width="fill_parent"
        android:layout_height="400dp" />

 </LinearLayout>

gallery_listentry:

    <com.github.ignition.core.widgets.RemoteImageView
        android:id="@+id/img"
        android:layout_width="400dp"
        android:layout_height="280dp"
        android:background="@color/dark_brown"
        android:padding="2dp"
        ignition:progressDrawable="@drawable/ic_launcher"
        ignition:autoLoad="false"
        ignition:errorDrawable="@drawable/icon"
        ignition:defaultDrawable="@drawable/place_snacks"
        android:scaleType="fitXY"/>

package com.test;

import android.app.Activity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.devsmart.android.ui.HorizontialListView;
import com.github.ignition.core;

public class HorizontalListViewDemo extends Activity {

@Override  
protected void onCreate(Bundle savedInstanceState) {  
    super.onCreate(savedInstanceState);  

    setContentView(R.layout.gallery_layout);  

    HorizontialListView listview = (HorizontialListView) findViewById(R.id.gallery_list);  
    listview.setAdapter(mAdapter);  

}  

private static String[] url = new String[]{ "http://www.google.com.sg/logos/2012/vday12-res.png",  
    "http://www.google.com.sg/logos/2012/vday12-res.png",  
    "http://www.google.com.sg/logos/2012/vday12-res.png" };   

private BaseAdapter mAdapter = new BaseAdapter() {  

    @Override  
    public int getCount() {  
        return url.length;  
    }  

    @Override  
    public Object getItem(int position) {  
        return null;  
    }  

    @Override  
    public long getItemId(int position) {  
        return 0;  
    }  

    @Override  
    public View getView(int position, View convertView, ViewGroup parent) {  
        View retval = LayoutInflater.from(parent.getContext()).inflate(R.layout.gallery_listentry, null);  
        RemoteImageView img = (RemoteImageView) retval.findViewById(R.id.img);  
        img.setImageUrl(url[position]);
        img.loadImage();

        return retval;  
    }  

};  

}

@mttkay
Copy link
Owner

mttkay commented Feb 14, 2012

What is the error you're seeing (no stack trace)? Have you looked at the sample app? Generally, please post questions to the mailing list first, not the bug tracker.

One thing you may be missing is the INTERNET permission in your Manifest, without which you cannot access online resources.

@ghost
Copy link
Author

ghost commented Feb 16, 2012

Hi, the problem is there is no error/warning/exception message at all. The messages in logcat just shows normal operation that expected (sanitize disk, disk cache hit, etc). all the permissions needed are there.

when i clear cache and reload the app, i can see the progress spinner and then gone, no image anymore, not even the errordrawable/defaultdrawable. and i believe it has finished downloading the image as the img file are there in disk cache.

when i use default imageview and just show local images, there is no problem at all. i can see the image shown in horizontallist properly.

i've also sent the issue to horizontallistview guys. It even harder to debug from their side since there's no documentation in their code.

once again, sorry for the trouble

@mttkay
Copy link
Owner

mttkay commented Mar 10, 2012

If you still have this issue, please post this as a question on the mailing list. RemoteImageView works in all scenarios I have tested it in. If you find an actual bug, feel free to file a new issue with exact description and steps to reproduce.

@mttkay mttkay closed this as completed Mar 10, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant