|
6 | 6 | import android.view.LayoutInflater; |
7 | 7 | import android.view.View; |
8 | 8 | import android.view.ViewGroup; |
9 | | -import android.widget.ListView; |
10 | 9 |
|
11 | 10 | import com.blogspot.e_kanivets.moneytracker.R; |
12 | 11 | import com.blogspot.e_kanivets.moneytracker.adapter.MonthSummaryAdapter; |
| 12 | +import com.blogspot.e_kanivets.moneytracker.databinding.FragmentSummaryBinding; |
13 | 13 | import com.blogspot.e_kanivets.moneytracker.report.chart.IMonthReport; |
14 | 14 |
|
15 | | -import butterknife.BindView; |
16 | | -import butterknife.ButterKnife; |
17 | | - |
18 | | -/** |
19 | | - * A simple {@link Fragment} subclass. |
20 | | - * Use the {@link SummaryFragment#newInstance} factory method to |
21 | | - * create an instance of this fragment. |
22 | | - */ |
23 | 15 | public class SummaryFragment extends Fragment { |
24 | 16 | private static final String ARG_MONTH_REPORT = "arg_month_report"; |
25 | 17 |
|
26 | 18 | @Nullable |
27 | 19 | private IMonthReport monthReport; |
28 | 20 |
|
29 | | - @BindView(R.id.listView) |
30 | | - ListView listView; |
| 21 | + private FragmentSummaryBinding binding; |
31 | 22 |
|
32 | 23 | public SummaryFragment() { |
33 | 24 | // Required empty public constructor |
@@ -66,10 +57,11 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, |
66 | 57 |
|
67 | 58 | private void initViews(@Nullable View rootView) { |
68 | 59 | if (rootView == null) return; |
69 | | - ButterKnife.bind(this, rootView); |
| 60 | + |
| 61 | + binding = FragmentSummaryBinding.inflate(getLayoutInflater()); |
70 | 62 |
|
71 | 63 | if (monthReport != null) { |
72 | | - listView.setAdapter(new MonthSummaryAdapter(getActivity(), monthReport)); |
| 64 | + binding.listView.setAdapter(new MonthSummaryAdapter(getActivity(), monthReport)); |
73 | 65 | } |
74 | 66 | } |
75 | 67 | } |
0 commit comments