25
25
import android .view .LayoutInflater ;
26
26
import android .view .View ;
27
27
import android .view .ViewGroup ;
28
+ import android .widget .FrameLayout ;
29
+ import android .widget .ImageView ;
30
+ import android .widget .TextView ;
28
31
29
32
import com .kesteli .filip .ubuntus2 .R ;
30
33
import com .kesteli .filip .ubuntus2 .ugovor .helper .OnStartDragListener ;
35
38
*/
36
39
public class UgovorRecyclerGridFragment extends Fragment implements OnStartDragListener {
37
40
41
+ private ImageView ivDetaljiPosla ;
42
+ private FrameLayout flItem ;
43
+ private TextView tvNazivPosla ;
38
44
private ItemTouchHelper mItemTouchHelper ;
39
45
40
46
public UgovorRecyclerGridFragment () {
@@ -50,6 +56,12 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
50
56
public void onViewCreated (View view , @ Nullable Bundle savedInstanceState ) {
51
57
super .onViewCreated (view , savedInstanceState );
52
58
59
+ setupRecyclerView (view );
60
+ initViews (view );
61
+ setupListeners ();
62
+ }
63
+
64
+ private void setupRecyclerView (View view ) {
53
65
final UgovorRecyclerListAdapter adapter = new UgovorRecyclerListAdapter (getActivity (), this );
54
66
55
67
RecyclerView recyclerView = (RecyclerView ) view ;
@@ -65,8 +77,23 @@ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
65
77
mItemTouchHelper .attachToRecyclerView (recyclerView );
66
78
}
67
79
80
+ private void initViews (View view ) {
81
+ ivDetaljiPosla = (ImageView ) view .findViewById (R .id .ivDetaljiPosla );
82
+ tvNazivPosla = (TextView ) view .findViewById (R .id .title );
83
+ flItem = (FrameLayout ) view .findViewById (R .id .flItem );
84
+ }
85
+
86
+ private void setupListeners () {
87
+
88
+ }
89
+
68
90
@ Override
69
91
public void onStartDrag (RecyclerView .ViewHolder viewHolder ) {
70
92
mItemTouchHelper .startDrag (viewHolder );
71
93
}
72
94
}
95
+
96
+
97
+
98
+
99
+
0 commit comments