mirror of
https://github.com/CappielloAntonio/tempo.git
synced 2026-01-30 06:12:07 +00:00
Realigned layout spaces in case of missing information
This commit is contained in:
1
.idea/misc.xml
generated
1
.idea/misc.xml
generated
@@ -49,6 +49,7 @@
|
||||
<entry key="app/src/main/res/layout/fragment_artist_page.xml" value="0.1" />
|
||||
<entry key="app/src/main/res/layout/fragment_download.xml" value="0.283363802559415" />
|
||||
<entry key="app/src/main/res/layout/fragment_home.xml" value="0.283363802559415" />
|
||||
<entry key="app/src/main/res/layout/fragment_library.xml" value="0.3229166666666667" />
|
||||
<entry key="app/src/main/res/layout/fragment_login.xml" value="0.3166496424923391" />
|
||||
<entry key="app/src/main/res/layout/fragment_player_bottom_sheet.xml" value="0.3166496424923391" />
|
||||
<entry key="app/src/main/res/layout/fragment_playlist_catalogue.xml" value="0.3229166666666667" />
|
||||
|
||||
@@ -10,6 +10,8 @@ import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.constraintlayout.widget.ConstraintSet;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.navigation.Navigation;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
@@ -50,7 +52,13 @@ public class ArtistHorizontalAdapter extends RecyclerView.Adapter<ArtistHorizont
|
||||
Artist artist = artists.get(position);
|
||||
|
||||
holder.artistName.setText(MusicUtil.getReadableString(artist.getName()));
|
||||
holder.artistInfo.setText("Album count: " + String.valueOf(artist.getAlbumCount()));
|
||||
|
||||
if(artist.getAlbumCount() > 0) {
|
||||
holder.artistInfo.setText("Album count: " + String.valueOf(artist.getAlbumCount()));
|
||||
}
|
||||
else {
|
||||
holder.artistInfo.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
CustomGlideRequest.Builder
|
||||
.from(context, artist.getId(), CustomGlideRequest.ARTIST_PIC, null)
|
||||
|
||||
@@ -36,10 +36,14 @@
|
||||
android:text="@string/label_placeholder"
|
||||
app:layout_constraintEnd_toStartOf="@+id/artist_more_button"
|
||||
app:layout_constraintStart_toEndOf="@+id/artist_cover_image_view"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/artist_info_text_view"
|
||||
app:layout_constraintVertical_chainStyle="spread"
|
||||
app:layout_constraintVertical_weight="1"/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:visibility="gone"
|
||||
android:id="@+id/artist_info_text_view"
|
||||
style="@style/ItemSubtitleTextView"
|
||||
android:layout_width="0dp"
|
||||
@@ -54,7 +58,8 @@
|
||||
android:text="@string/label_placeholder"
|
||||
app:layout_constraintEnd_toStartOf="@+id/artist_more_button"
|
||||
app:layout_constraintStart_toEndOf="@+id/artist_cover_image_view"
|
||||
app:layout_constraintTop_toBottomOf="@+id/artist_name_text_view" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/artist_name_text_view"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/artist_more_button"
|
||||
|
||||
Reference in New Issue
Block a user