lucasr / twoway-view

[DEPRECATED] RecyclerView made simple
5.23k stars 1.02k forks source link

TwoWay ListView is not showing up on Motorola G 4.4.3 #232

Open androidman15 opened 9 years ago

androidman15 commented 9 years ago

No clue what's going on, but it works fine for GS3 4.3 and GN2 4.1.1 & 4.1.2.

I installed my app on my coworker's Motorola G 4.4.3 and the ListView only shows 1 corrupted picture with all red color.

Can you please helpme on this?

Thanks

androidman15 commented 9 years ago

Hello?

KoMinkyu commented 9 years ago

Can you attach some screenshots?

androidman15 commented 9 years ago

Public class ListViewAdapter extends BaseAdapter { private List ObjectList; private Context mContext;

public ListViewAdapter(Context context, List<ListViewObject> newList){
this.mContext = context;
this.ObjectList = newList;

}

@Override public int getCount() { return ObjectList.size(); }

@Override public ListViewObject getItem(int position) { return ObjectList.get(position); }

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

@Override public View getView(final int position, View convertView, ViewGroup parent) {
ViewHolder viewHolder = new ViewHolder();

LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); if (convertView == null) { convertView = inflater.inflate(R.layout.listview_layout, parent, false); viewHolder.imageView = (ImageView)convertView.findViewById(R.id.ListViewImage); viewHolder.layout = (RelativeLayout)convertView.findViewById(R.id.ListViewLayout); convertView.setTag(viewHolder);
} else { viewHolder = (ViewHolder)convertView.getTag(); }

Picasso.with(mContext) .load(getItem(position).getImageUrl()) .resize(100, 100)
.centerCrop() .into(viewHolder.imageView);

return convertView; }

class ViewHolder { RelativeLayout layout; ImageView imageView; } }

ListView Layout:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/ListViewLayout"
android:layout_width="52dp" android:layout_height="43dp" >

<ImageView android:id="@+id/ListViewImage" android:layout_width="50dp" android:layout_height="40dp" android:scaleType="fitXY" android:layout_marginLeft="2px" android:layout_marginTop="2px" />

Main Layout:

<org.lucasr.twowayview.TwoWayView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/TwoWayView" style="@style/TwoWayView" android:layout_width="match_parent" android:layout_height="43dp" android:layout_marginTop="595dp" android:background="@color/transparent" android:drawSelectorOnTop="true" />

MainActivity:

public void ListView_Load() { for (File file : listFile){ mListViewObject = new ListViewObject(); mListViewObject.setImageUrl("file:///" + file.getAbsolutePath()); ListViewObject_List.add(mListViewObject); }
listViewAdapter = new ListViewAdapter(this, ListViewObject_List); TwoWayListView.setAdapter(listViewAdapter); }

Thanks

androidman15 commented 9 years ago

Mr. Lucas, do you ever answer questions regarding to your libraries at all? I appreciate for all nice works, but I absolutely get no support or what so ever. I have emailed you, but nothing happened. I posted here, nothing happened so far. It's so lack of support!

KoMinkyu commented 9 years ago

First of all, what version of TwoWayView are you using?

I think TwoWayView doesn't support ListView concept anymore. You'd be better to use latest version of TwoWayView.

And with image problem, you should suspect your 'Image Loader' library.