Commit 5fd9eebff94fb3e90e152be293388791ba7b50ef

Authored by JLo'w
1 parent 160420ab

RetourĂ  la ligne qui me faisait chier

PremiereActivite/app/src/main/java/com/example/app_10p5/main_tab_frag.java
@@ -24,8 +24,7 @@ public class main_tab_frag extends Fragment { @@ -24,8 +24,7 @@ public class main_tab_frag extends Fragment {
24 } 24 }
25 25
26 @Override 26 @Override
27 - public View onCreateView(LayoutInflater inflater, ViewGroup container,  
28 - Bundle savedInstanceState) { 27 + public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
29 // Inflate the layout for this fragment 28 // Inflate the layout for this fragment
30 View ret = inflater.inflate(R.layout.fragment_main_tab_frag, container, false); 29 View ret = inflater.inflate(R.layout.fragment_main_tab_frag, container, false);
31 30
@@ -40,6 +39,7 @@ public class main_tab_frag extends Fragment { @@ -40,6 +39,7 @@ public class main_tab_frag extends Fragment {
40 tabLayout.addTab(tabLayout.newTab().setText("Vidange")); 39 tabLayout.addTab(tabLayout.newTab().setText("Vidange"));
41 tabLayout.setTabGravity(TabLayout.GRAVITY_FILL); 40 tabLayout.setTabGravity(TabLayout.GRAVITY_FILL);
42 41
  42 +
43 final ViewPager viewPager = (ViewPager) ret.findViewById(R.id.pager); 43 final ViewPager viewPager = (ViewPager) ret.findViewById(R.id.pager);
44 final PagerAdapter adapter = new PagerAdapter(getChildFragmentManager(), tabLayout.getTabCount()); 44 final PagerAdapter adapter = new PagerAdapter(getChildFragmentManager(), tabLayout.getTabCount());
45 viewPager.setAdapter(adapter); 45 viewPager.setAdapter(adapter);