mirror of
https://codeberg.org/monocles/monocles_chat.git
synced 2025-01-30 00:39:59 +01:00
parent
e901c8e831
commit
6657f0d217
1 changed files with 11 additions and 11 deletions
|
@ -37,18 +37,18 @@ public class GifsAdapter extends BaseAdapter {
|
|||
return pos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int p, View convertView, ViewGroup parent) {
|
||||
View grid;
|
||||
LayoutInflater inflater = (LayoutInflater) ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
|
||||
if (convertView == null) {
|
||||
grid = inflater.inflate(R.layout.activity_gridview, null);
|
||||
ImageView imageView = (ImageView)grid.findViewById(R.id.grid_item);
|
||||
Glide.with(ctx).load(filesPaths[p]).into(imageView);
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
View v;
|
||||
if (convertView == null) { // if it's not recycled, initialize some attributes
|
||||
LayoutInflater inflater = (LayoutInflater) ctx.getSystemService( Context.LAYOUT_INFLATER_SERVICE );
|
||||
v = inflater.inflate(R.layout.activity_gridview, parent, false);
|
||||
} else {
|
||||
grid = (View) convertView;
|
||||
v = (View) convertView;
|
||||
}
|
||||
return grid;
|
||||
ImageView image = (ImageView)v.findViewById(R.id.grid_item);
|
||||
Glide.with(ctx).load(filesPaths[position]).into(image);
|
||||
return v;
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Add table
Reference in a new issue