From 6b750dac4d13cf59500d8596029b28460317b689 Mon Sep 17 00:00:00 2001 From: tzugen Date: Thu, 1 Apr 2021 13:21:15 +0200 Subject: [PATCH] Rename download layouts semantically. --- .../ultrasonic/fragment/PlayerFragment.java | 42 ++++++------ .../{download.xml => current_playing.xml} | 10 +-- .../{download.xml => current_playing.xml} | 10 +-- ...load_playlist.xml => current_playlist.xml} | 64 +++++++++---------- .../src/main/res/layout/media_buttons.xml | 14 ++-- .../src/main/res/layout/player_media_info.xml | 10 +-- .../src/main/res/layout/player_slider.xml | 6 +- 7 files changed, 78 insertions(+), 78 deletions(-) rename ultrasonic/src/main/res/layout-land/{download.xml => current_playing.xml} (93%) rename ultrasonic/src/main/res/layout/{download.xml => current_playing.xml} (93%) rename ultrasonic/src/main/res/layout/{download_playlist.xml => current_playlist.xml} (89%) diff --git a/ultrasonic/src/main/java/org/moire/ultrasonic/fragment/PlayerFragment.java b/ultrasonic/src/main/java/org/moire/ultrasonic/fragment/PlayerFragment.java index 4f009edc..f058a3f4 100644 --- a/ultrasonic/src/main/java/org/moire/ultrasonic/fragment/PlayerFragment.java +++ b/ultrasonic/src/main/java/org/moire/ultrasonic/fragment/PlayerFragment.java @@ -145,7 +145,7 @@ public class PlayerFragment extends Fragment implements GestureDetector.OnGestur @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - return inflater.inflate(R.layout.download, container, false); + return inflater.inflate(R.layout.current_playing, container, false); } @Override @@ -168,27 +168,27 @@ public class PlayerFragment extends Fragment implements GestureDetector.OnGestur swipeVelocity = swipeDistance; gestureScanner = new GestureDetector(getContext(), this); - playlistFlipper = view.findViewById(R.id.download_playlist_flipper); - emptyTextView = view.findViewById(R.id.download_empty); - songTitleTextView = view.findViewById(R.id.download_song_title); - albumTextView = view.findViewById(R.id.download_album); - artistTextView = view.findViewById(R.id.download_artist); - albumArtImageView = view.findViewById(R.id.download_album_art_image); - positionTextView = view.findViewById(R.id.download_position); - downloadTrackTextView = view.findViewById(R.id.download_track); - downloadTotalDurationTextView = view.findViewById(R.id.download_total_duration); - durationTextView = view.findViewById(R.id.download_duration); - progressBar = view.findViewById(R.id.download_progress_bar); - playlistView = view.findViewById(R.id.download_list); - final AutoRepeatButton previousButton = view.findViewById(R.id.download_previous); - final AutoRepeatButton nextButton = view.findViewById(R.id.download_next); - pauseButton = view.findViewById(R.id.download_pause); - stopButton = view.findViewById(R.id.download_stop); - startButton = view.findViewById(R.id.download_start); - final View shuffleButton = view.findViewById(R.id.download_shuffle); - repeatButton = view.findViewById(R.id.download_repeat); + playlistFlipper = view.findViewById(R.id.current_playing_playlist_flipper); + emptyTextView = view.findViewById(R.id.playlist_empty); + songTitleTextView = view.findViewById(R.id.current_playing_song); + albumTextView = view.findViewById(R.id.current_playing_album); + artistTextView = view.findViewById(R.id.current_playing_artist); + albumArtImageView = view.findViewById(R.id.current_playing_album_art_image); + positionTextView = view.findViewById(R.id.current_playing_position); + downloadTrackTextView = view.findViewById(R.id.current_playing_track); + downloadTotalDurationTextView = view.findViewById(R.id.current_total_duration); + durationTextView = view.findViewById(R.id.current_playing_duration); + progressBar = view.findViewById(R.id.current_playing_progress_bar); + playlistView = view.findViewById(R.id.playlist_view); + final AutoRepeatButton previousButton = view.findViewById(R.id.button_previous); + final AutoRepeatButton nextButton = view.findViewById(R.id.button_next); + pauseButton = view.findViewById(R.id.button_pause); + stopButton = view.findViewById(R.id.button_stop); + startButton = view.findViewById(R.id.button_start); + final View shuffleButton = view.findViewById(R.id.button_shuffle); + repeatButton = view.findViewById(R.id.button_repeat); - visualizerViewLayout = view.findViewById(R.id.download_visualizer_view_layout); + visualizerViewLayout = view.findViewById(R.id.current_playing_visualizer_layout); LinearLayout ratingLinearLayout = view.findViewById(R.id.song_rating); fiveStar1ImageView = view.findViewById(R.id.song_five_star_1); diff --git a/ultrasonic/src/main/res/layout-land/download.xml b/ultrasonic/src/main/res/layout-land/current_playing.xml similarity index 93% rename from ultrasonic/src/main/res/layout-land/download.xml rename to ultrasonic/src/main/res/layout-land/current_playing.xml index e1219d57..2235bb65 100644 --- a/ultrasonic/src/main/res/layout-land/download.xml +++ b/ultrasonic/src/main/res/layout-land/current_playing.xml @@ -5,13 +5,13 @@ a:orientation="horizontal"> - + \ No newline at end of file diff --git a/ultrasonic/src/main/res/layout/download.xml b/ultrasonic/src/main/res/layout/current_playing.xml similarity index 93% rename from ultrasonic/src/main/res/layout/download.xml rename to ultrasonic/src/main/res/layout/current_playing.xml index 807b4ebb..43c5d843 100644 --- a/ultrasonic/src/main/res/layout/download.xml +++ b/ultrasonic/src/main/res/layout/current_playing.xml @@ -5,13 +5,13 @@ a:orientation="vertical" > - + diff --git a/ultrasonic/src/main/res/layout/download_playlist.xml b/ultrasonic/src/main/res/layout/current_playlist.xml similarity index 89% rename from ultrasonic/src/main/res/layout/download_playlist.xml rename to ultrasonic/src/main/res/layout/current_playlist.xml index 39e709b5..1b933376 100644 --- a/ultrasonic/src/main/res/layout/download_playlist.xml +++ b/ultrasonic/src/main/res/layout/current_playlist.xml @@ -1,33 +1,33 @@ - - - - - - - - + + + + + + + + \ No newline at end of file diff --git a/ultrasonic/src/main/res/layout/media_buttons.xml b/ultrasonic/src/main/res/layout/media_buttons.xml index 20c5b020..92f02e91 100644 --- a/ultrasonic/src/main/res/layout/media_buttons.xml +++ b/ultrasonic/src/main/res/layout/media_buttons.xml @@ -8,7 +8,7 @@ a:layout_marginRight="12dp" > @@ -18,7 +18,7 @@ a:layout_height="match_parent">