mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 18:03:33 +00:00
Renaming and refactor
This commit is contained in:
parent
32ac75f4ee
commit
2e2fe8fa0e
5 changed files with 13 additions and 32 deletions
|
|
@ -1,34 +0,0 @@
|
|||
package com.cappielloantonio.play.adapter;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter;
|
||||
|
||||
import com.cappielloantonio.play.ui.fragment.PlayerControllerFragment;
|
||||
import com.cappielloantonio.play.ui.fragment.PlayerQueueFragment;
|
||||
|
||||
public class PlayerBodyAdapter extends FragmentStateAdapter {
|
||||
private static final String TAG = "PlayerNowPlayingSongInfoAdapter";
|
||||
|
||||
public PlayerBodyAdapter(@NonNull Fragment fragment) {
|
||||
super(fragment);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Fragment createFragment(int position) {
|
||||
switch (position) {
|
||||
case 0:
|
||||
return new PlayerControllerFragment();
|
||||
case 1:
|
||||
return new PlayerQueueFragment();
|
||||
}
|
||||
|
||||
return new PlayerControllerFragment();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
package com.cappielloantonio.play.adapter;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter;
|
||||
|
||||
import com.cappielloantonio.play.ui.fragment.PlayerCoverFragment;
|
||||
import com.cappielloantonio.play.ui.fragment.PlayerLyricsFragment;
|
||||
|
||||
public class PlayerNowPlayingSongAdapter extends FragmentStateAdapter {
|
||||
private static final String TAG = "PlayerNowPlayingSongInfoAdapter";
|
||||
|
||||
public PlayerNowPlayingSongAdapter(@NonNull Fragment fragment) {
|
||||
super(fragment);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Fragment createFragment(int position) {
|
||||
switch (position) {
|
||||
case 0:
|
||||
return new PlayerCoverFragment();
|
||||
case 1:
|
||||
return new PlayerLyricsFragment();
|
||||
}
|
||||
|
||||
return new PlayerCoverFragment();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue