mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 17:43:32 +00:00
Redesign of the album page
This commit is contained in:
parent
ca37adc33a
commit
8810184e6e
4 changed files with 56 additions and 16 deletions
3
.idea/misc.xml
generated
3
.idea/misc.xml
generated
|
|
@ -4,7 +4,8 @@
|
|||
<option name="filePathToZoomLevelMap">
|
||||
<map>
|
||||
<entry key="app/src/main/res/drawable/ic_refresh.xml" value="0.18958333333333333" />
|
||||
<entry key="app/src/main/res/layout/fragment_artist_page.xml" value="0.3229166666666667" />
|
||||
<entry key="app/src/main/res/layout/fragment_album_page.xml" value="0.1" />
|
||||
<entry key="app/src/main/res/layout/fragment_artist_page.xml" value="0.1" />
|
||||
<entry key="app/src/main/res/layout/item_horizontal_album.xml" value="0.3166496424923391" />
|
||||
<entry key="app/src/main/res/layout/item_horizontal_track.xml" value="0.1" />
|
||||
<entry key="app/src/main/res/layout/item_player_queue_song.xml" value="0.3229166666666667" />
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
package com.cappielloantonio.play.ui.fragment;
|
||||
|
||||
import android.graphics.BlendMode;
|
||||
import android.graphics.BlendModeColorFilter;
|
||||
import android.os.Bundle;
|
||||
import android.text.Html;
|
||||
import android.view.LayoutInflater;
|
||||
|
|
@ -12,6 +14,7 @@ import android.widget.Toast;
|
|||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
|
@ -142,6 +145,11 @@ public class AlbumPageFragment extends Fragment {
|
|||
bundle.putInt("year_object", albumPageViewModel.getAlbum().getYear());
|
||||
activity.navController.navigate(R.id.action_albumPageFragment_to_songListPageFragment, bundle);*/
|
||||
});
|
||||
|
||||
/*albumPageViewModel.getAlbumInfo().observe(requireActivity(), album -> {
|
||||
if (bind != null) bind.albumBioLabel.setVisibility(album.getNotes() != null ? View.VISIBLE : View.GONE);
|
||||
bind.albumBioLabel.setText(album.getNotes());
|
||||
});*/
|
||||
}
|
||||
|
||||
private void initMusicButton() {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ public class AlbumPageViewModel extends AndroidViewModel {
|
|||
private ArtistRepository artistRepository;
|
||||
|
||||
private LiveData<List<Song>> songLiveList = new MutableLiveData<>();
|
||||
private LiveData<Album> albumInfo = new MutableLiveData<>();
|
||||
|
||||
private Album album;
|
||||
|
||||
|
|
@ -49,4 +50,8 @@ public class AlbumPageViewModel extends AndroidViewModel {
|
|||
public LiveData<Artist> getArtist() {
|
||||
return artistRepository.getArtistInfo(album.getArtistId());
|
||||
}
|
||||
|
||||
public LiveData<Album> getAlbumInfo() {
|
||||
return albumRepository.getAlbumInfo(album.getId());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,10 +32,15 @@
|
|||
|
||||
<ImageView
|
||||
android:id="@+id/album_cover_image_view"
|
||||
android:layout_width="164dp"
|
||||
android:layout_height="164dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintDimensionRatio="H,1:1"
|
||||
android:layout_marginLeft="64dp"
|
||||
android:layout_marginRight="64dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
|
|
@ -43,26 +48,31 @@
|
|||
style="@style/ShowcaseTitleTextView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginEnd="18dp"
|
||||
android:paddingTop="8dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:singleLine="false"
|
||||
android:textAlignment="center"
|
||||
android:text="@string/label_placeholder"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/album_cover_image_view"
|
||||
app:layout_constraintTop_toTopOf="@+id/album_cover_image_view" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/album_cover_image_view" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/album_artist_label"
|
||||
style="@style/ShowcaseSubtitleTextView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginEnd="18dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textAlignment="center"
|
||||
android:text="@string/label_placeholder"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/album_cover_image_view"
|
||||
app:layout_constraintTop_toBottomOf="@+id/album_name_label" />
|
||||
|
||||
<TextView
|
||||
|
|
@ -70,21 +80,23 @@
|
|||
style="@style/ShowcaseExtraTextView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginEnd="18dp"
|
||||
android:textAlignment="center"
|
||||
android:text="@string/label_placeholder"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/album_cover_image_view"
|
||||
app:layout_constraintTop_toBottomOf="@+id/album_artist_label" />
|
||||
|
||||
<View
|
||||
android:id="@+id/upper_button_divider"
|
||||
style="@style/Divider"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="18dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/album_cover_image_view" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/album_release_year_label" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/album_page_button_layout"
|
||||
|
|
@ -132,6 +144,20 @@
|
|||
app:iconTint="@color/darkIconColor" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/album_bio_label"
|
||||
style="@style/ShowcaseExtraTextView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginEnd="18dp"
|
||||
android:textAlignment="center"
|
||||
android:text="@string/label_placeholder"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/album_page_button_layout" />
|
||||
|
||||
<View
|
||||
android:id="@+id/bottom_button_divider"
|
||||
style="@style/Divider"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue