Rename download layouts semantically.

This commit is contained in:
tzugen 2021-04-01 13:21:15 +02:00
parent 0bf0d2db87
commit 6b750dac4d
No known key found for this signature in database
GPG Key ID: 61E9C34BC10EC930
7 changed files with 78 additions and 78 deletions

View File

@ -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);

View File

@ -5,13 +5,13 @@
a:orientation="horizontal">
<org.moire.ultrasonic.util.MyViewFlipper
a:id="@+id/download_playlist_flipper"
a:id="@+id/current_playing_playlist_flipper"
a:layout_width="0dp"
a:layout_height="fill_parent"
a:layout_weight="1">
<FrameLayout
a:id="@+id/download_album_art_layout"
a:id="@+id/current_playing_album_art_layout"
a:layout_width="fill_parent"
a:layout_height="fill_parent"
a:layout_weight="1"
@ -19,7 +19,7 @@
a:orientation="horizontal">
<ImageView
a:id="@+id/download_album_art_image"
a:id="@+id/current_playing_album_art_image"
a:layout_width="wrap_content"
a:layout_height="wrap_content"
a:alpha="0.2"
@ -106,7 +106,7 @@
</LinearLayout>
<LinearLayout
a:id="@+id/download_visualizer_view_layout"
a:id="@+id/current_playing_visualizer_layout"
a:layout_width="fill_parent"
a:layout_height="60dip"
a:layout_gravity="bottom|center_horizontal"
@ -121,7 +121,7 @@
</LinearLayout>
</FrameLayout>
<include layout="@layout/download_playlist"/>
<include layout="@layout/current_playlist"/>
</org.moire.ultrasonic.util.MyViewFlipper>
</LinearLayout>

View File

@ -5,13 +5,13 @@
a:orientation="vertical" >
<org.moire.ultrasonic.util.MyViewFlipper
a:id="@+id/download_playlist_flipper"
a:id="@+id/current_playing_playlist_flipper"
a:layout_width="fill_parent"
a:layout_height="0dip"
a:layout_weight="1" >
<RelativeLayout
a:id="@+id/download_album_art_layout"
a:id="@+id/current_playing_album_art_layout"
a:layout_width="fill_parent"
a:layout_height="fill_parent"
a:layout_weight="1"
@ -19,7 +19,7 @@
a:orientation="vertical" >
<ImageView
a:id="@+id/download_album_art_image"
a:id="@+id/current_playing_album_art_image"
a:layout_width="match_parent"
a:layout_height="match_parent"
a:scaleType="centerCrop"
@ -105,7 +105,7 @@
</LinearLayout>
<LinearLayout
a:id="@+id/download_visualizer_view_layout"
a:id="@+id/current_playing_visualizer_layout"
a:layout_width="fill_parent"
a:layout_height="60dip"
a:layout_gravity="center"
@ -118,7 +118,7 @@
</LinearLayout>
</RelativeLayout>
<include layout="@layout/download_playlist" />
<include layout="@layout/current_playlist" />
</org.moire.ultrasonic.util.MyViewFlipper>
<include layout="@layout/player_media_info" />

View File

@ -1,33 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
a:orientation="vertical"
a:layout_width="fill_parent"
a:layout_height="fill_parent"
a:layout_weight="1">
<TextView
a:id="@+id/download_empty"
a:text="@string/download.empty"
a:layout_width="fill_parent"
a:layout_height="wrap_content"
a:padding="10dip"/>
<com.mobeta.android.dslv.DragSortListView
a:id="@+id/download_list"
a:layout_width="fill_parent"
a:layout_height="0dip"
a:layout_weight="1"
a:fastScrollEnabled="true"
a:textFilterEnabled="true"
app:drag_handle_id="@+id/song_drag"
app:remove_enabled="true"
app:remove_mode="flingRemove"
app:fling_handle_id="@+id/song_drag"
app:drag_start_mode="onMove"
app:float_background_color="?attr/color_background"
app:float_alpha="0.7" />
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
a:orientation="vertical"
a:layout_width="fill_parent"
a:layout_height="fill_parent"
a:layout_weight="1">
<TextView
a:id="@+id/playlist_empty"
a:text="@string/download.empty"
a:layout_width="fill_parent"
a:layout_height="wrap_content"
a:padding="10dip"/>
<com.mobeta.android.dslv.DragSortListView
a:id="@+id/playlist_view"
a:layout_width="fill_parent"
a:layout_height="0dip"
a:layout_weight="1"
a:fastScrollEnabled="true"
a:textFilterEnabled="true"
app:drag_handle_id="@+id/song_drag"
app:remove_enabled="true"
app:remove_mode="flingRemove"
app:fling_handle_id="@+id/song_drag"
app:drag_start_mode="onMove"
app:float_background_color="?attr/color_background"
app:float_alpha="0.7" />
</LinearLayout>

View File

@ -8,7 +8,7 @@
a:layout_marginRight="12dp" >
<ImageView
a:id="@+id/download_shuffle"
a:id="@+id/button_shuffle"
a:layout_width="0dip"
a:layout_height="26dp"
a:layout_alignParentLeft="true"
@ -21,7 +21,7 @@
a:contentDescription="@string/buttons.shuffle" />
<org.moire.ultrasonic.view.AutoRepeatButton
a:id="@+id/download_previous"
a:id="@+id/button_previous"
a:layout_width="0dip"
a:layout_height="42dp"
a:layout_gravity="center"
@ -33,7 +33,7 @@
a:contentDescription="@string/buttons.previous" />
<ImageView
a:id="@+id/download_start"
a:id="@+id/button_start"
a:layout_width="0dip"
a:layout_height="74dp"
a:layout_weight="2"
@ -45,7 +45,7 @@
a:contentDescription="@string/buttons.play" />
<ImageView
a:id="@+id/download_pause"
a:id="@+id/button_pause"
a:layout_width="0dip"
a:layout_height="74dp"
a:layout_weight="2"
@ -56,7 +56,7 @@
a:contentDescription="@string/buttons.pause" />
<ImageView
a:id="@+id/download_stop"
a:id="@+id/button_stop"
a:layout_width="0dip"
a:layout_height="74dp"
a:layout_weight="2"
@ -68,7 +68,7 @@
a:contentDescription="@string/buttons.stop" />
<org.moire.ultrasonic.view.AutoRepeatButton
a:id="@+id/download_next"
a:id="@+id/button_next"
a:layout_width="0dip"
a:layout_height="42dp"
a:layout_gravity="center"
@ -80,7 +80,7 @@
a:contentDescription="@string/buttons.next"/>
<ImageView
a:id="@+id/download_repeat"
a:id="@+id/button_repeat"
a:layout_width="0dip"
a:layout_height="26dp"
a:layout_gravity="center"

View File

@ -15,7 +15,7 @@
a:orientation="vertical">
<TextView
a:id="@+id/download_song_title"
a:id="@+id/current_playing_song"
a:layout_width="wrap_content"
a:layout_height="wrap_content"
a:ellipsize="start"
@ -26,7 +26,7 @@
tools:text="Title" />
<TextView
a:id="@+id/download_artist"
a:id="@+id/current_playing_artist"
a:layout_width="wrap_content"
a:layout_height="wrap_content"
a:ellipsize="start"
@ -36,7 +36,7 @@
tools:text="Artist" />
<TextView
a:id="@+id/download_album"
a:id="@+id/current_playing_album"
a:layout_width="wrap_content"
a:layout_height="wrap_content"
a:ellipsize="start"
@ -56,7 +56,7 @@
a:orientation="vertical">
<TextView
a:id="@+id/download_track"
a:id="@+id/current_playing_track"
a:layout_width="wrap_content"
a:layout_height="wrap_content"
a:ellipsize="start"
@ -65,7 +65,7 @@
a:textAppearance="?android:attr/textAppearanceSmall" />
<TextView
a:id="@+id/download_total_duration"
a:id="@+id/current_total_duration"
a:layout_width="wrap_content"
a:layout_height="wrap_content"
a:ellipsize="start"

View File

@ -8,7 +8,7 @@
a:layout_marginRight="12dp" >
<SeekBar
a:id="@+id/download_progress_bar"
a:id="@+id/current_playing_progress_bar"
a:layout_width="fill_parent"
a:layout_height="32dp"
a:indeterminate="false" />
@ -18,7 +18,7 @@
a:layout_height="match_parent">
<TextView
a:id="@+id/download_position"
a:id="@+id/current_playing_position"
a:layout_width="wrap_content"
a:layout_height="wrap_content"
a:layout_alignParentLeft="true"
@ -27,7 +27,7 @@
a:textAppearance="?android:attr/textAppearanceSmall" />
<TextView
a:id="@+id/download_duration"
a:id="@+id/current_playing_duration"
a:layout_width="wrap_content"
a:layout_height="wrap_content"
a:layout_alignParentRight="true"