mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 09:53:33 +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">
|
<option name="filePathToZoomLevelMap">
|
||||||
<map>
|
<map>
|
||||||
<entry key="app/src/main/res/drawable/ic_refresh.xml" value="0.18958333333333333" />
|
<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_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_horizontal_track.xml" value="0.1" />
|
||||||
<entry key="app/src/main/res/layout/item_player_queue_song.xml" value="0.3229166666666667" />
|
<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;
|
package com.cappielloantonio.play.ui.fragment;
|
||||||
|
|
||||||
|
import android.graphics.BlendMode;
|
||||||
|
import android.graphics.BlendModeColorFilter;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.Html;
|
import android.text.Html;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
|
|
@ -12,6 +14,7 @@ import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.core.view.ViewCompat;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.lifecycle.ViewModelProvider;
|
import androidx.lifecycle.ViewModelProvider;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
@ -142,6 +145,11 @@ public class AlbumPageFragment extends Fragment {
|
||||||
bundle.putInt("year_object", albumPageViewModel.getAlbum().getYear());
|
bundle.putInt("year_object", albumPageViewModel.getAlbum().getYear());
|
||||||
activity.navController.navigate(R.id.action_albumPageFragment_to_songListPageFragment, bundle);*/
|
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() {
|
private void initMusicButton() {
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ public class AlbumPageViewModel extends AndroidViewModel {
|
||||||
private ArtistRepository artistRepository;
|
private ArtistRepository artistRepository;
|
||||||
|
|
||||||
private LiveData<List<Song>> songLiveList = new MutableLiveData<>();
|
private LiveData<List<Song>> songLiveList = new MutableLiveData<>();
|
||||||
|
private LiveData<Album> albumInfo = new MutableLiveData<>();
|
||||||
|
|
||||||
private Album album;
|
private Album album;
|
||||||
|
|
||||||
|
|
@ -49,4 +50,8 @@ public class AlbumPageViewModel extends AndroidViewModel {
|
||||||
public LiveData<Artist> getArtist() {
|
public LiveData<Artist> getArtist() {
|
||||||
return artistRepository.getArtistInfo(album.getArtistId());
|
return artistRepository.getArtistInfo(album.getArtistId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LiveData<Album> getAlbumInfo() {
|
||||||
|
return albumRepository.getAlbumInfo(album.getId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,10 +32,15 @@
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/album_cover_image_view"
|
android:id="@+id/album_cover_image_view"
|
||||||
android:layout_width="164dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="164dp"
|
android:layout_height="0dp"
|
||||||
android:layout_marginStart="16dp"
|
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_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|
@ -43,26 +48,31 @@
|
||||||
style="@style/ShowcaseTitleTextView"
|
style="@style/ShowcaseTitleTextView"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="12dp"
|
android:layout_marginStart="18dp"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="18dp"
|
||||||
|
android:paddingTop="8dp"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="2"
|
android:maxLines="2"
|
||||||
android:singleLine="false"
|
android:singleLine="false"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:text="@string/label_placeholder"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/album_cover_image_view"
|
app:layout_constraintTop_toBottomOf="@+id/album_cover_image_view" />
|
||||||
app:layout_constraintTop_toTopOf="@+id/album_cover_image_view" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/album_artist_label"
|
android:id="@+id/album_artist_label"
|
||||||
style="@style/ShowcaseSubtitleTextView"
|
style="@style/ShowcaseSubtitleTextView"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="12dp"
|
android:layout_marginStart="18dp"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="18dp"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:text="@string/label_placeholder"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/album_cover_image_view"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/album_name_label" />
|
app:layout_constraintTop_toBottomOf="@+id/album_name_label" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|
@ -70,21 +80,23 @@
|
||||||
style="@style/ShowcaseExtraTextView"
|
style="@style/ShowcaseExtraTextView"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="12dp"
|
android:layout_marginStart="18dp"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="18dp"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:text="@string/label_placeholder"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/album_cover_image_view"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/album_artist_label" />
|
app:layout_constraintTop_toBottomOf="@+id/album_artist_label" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/upper_button_divider"
|
android:id="@+id/upper_button_divider"
|
||||||
style="@style/Divider"
|
style="@style/Divider"
|
||||||
android:layout_marginStart="18dp"
|
android:layout_marginStart="18dp"
|
||||||
android:layout_marginTop="18dp"
|
android:layout_marginTop="4dp"
|
||||||
android:layout_marginEnd="18dp"
|
android:layout_marginEnd="18dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="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
|
<LinearLayout
|
||||||
android:id="@+id/album_page_button_layout"
|
android:id="@+id/album_page_button_layout"
|
||||||
|
|
@ -132,6 +144,20 @@
|
||||||
app:iconTint="@color/darkIconColor" />
|
app:iconTint="@color/darkIconColor" />
|
||||||
</LinearLayout>
|
</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
|
<View
|
||||||
android:id="@+id/bottom_button_divider"
|
android:id="@+id/bottom_button_divider"
|
||||||
style="@style/Divider"
|
style="@style/Divider"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue