use of james.alarmio.fragments.RadioSoundChooserFragment in project Alarmio by TheAndroidMaster.
the class SoundChooserDialog method onCreateView.
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
view = inflater.inflate(R.layout.dialog_sound_chooser, container, false);
view.setBackgroundColor(colorWindowBackground);
TabLayout tabLayout = view.findViewById(R.id.tabLayout);
ViewPager viewPager = view.findViewById(R.id.viewPager);
AlarmSoundChooserFragment alarmFragment = new AlarmSoundChooserFragment();
RingtoneSoundChooserFragment ringtoneFragment = new RingtoneSoundChooserFragment();
RadioSoundChooserFragment radioFragment = new RadioSoundChooserFragment();
alarmFragment.setListener(this);
ringtoneFragment.setListener(this);
radioFragment.setListener(this);
viewPager.setAdapter(new SimplePagerAdapter(getChildFragmentManager(), alarmFragment, ringtoneFragment, radioFragment));
tabLayout.setupWithViewPager(viewPager);
return view;
}
Aggregations