19
19
import android .content .Context ;
20
20
import android .graphics .Color ;
21
21
import android .os .Bundle ;
22
+ import android .support .annotation .NonNull ;
22
23
import android .support .v4 .app .Fragment ;
23
24
import android .view .LayoutInflater ;
24
25
import android .view .View ;
@@ -74,13 +75,14 @@ public PicassoAdapter(Context context) {
74
75
mTransformation = new RoundedTransformationBuilder ()
75
76
.borderColor (Color .BLACK )
76
77
.borderWidthDp (3 )
77
- .cornerRadiusBottomLeftDp (30 )
78
- .cornerRadiusTopRightDp (30 )
78
+ //.cornerRadiusBottomLeftDp(30)
79
+ //.cornerRadiusTopRightDp(30)
80
+ .cornerRadiusDp (30 )
79
81
.oval (false )
80
82
.build ();
81
83
}
82
84
83
- @ Override public View getView (int position , View convertView , ViewGroup parent ) {
85
+ @ Override public View getView (int position , View convertView , @ NonNull ViewGroup parent ) {
84
86
ViewGroup view ;
85
87
if (convertView == null ) {
86
88
view = (ViewGroup ) mInflater .inflate (R .layout .picasso_item , parent , false );
@@ -91,15 +93,14 @@ public PicassoAdapter(Context context) {
91
93
PicassoItem item = getItem (position );
92
94
93
95
ImageView imageView = ((ImageView ) view .findViewById (R .id .imageView1 ));
96
+ imageView .setScaleType (item .mScaleType );
94
97
95
98
Picasso .with (getContext ())
96
99
.load (item .mUrl )
97
100
.fit ()
98
101
.transform (mTransformation )
99
102
.into (imageView );
100
103
101
- imageView .setScaleType (item .mScaleType );
102
-
103
104
((TextView ) view .findViewById (R .id .textView3 )).setText (item .mScaleType .toString ());
104
105
return view ;
105
106
}
0 commit comments