Add menu for songs when grid size is more than 2 #940
This commit is contained in:
parent
349d4ad534
commit
3fc86582f3
7 changed files with 46 additions and 10 deletions
|
@ -21,6 +21,7 @@ import android.widget.ImageView;
|
|||
import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.AppCompatImageView;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import code.name.monkey.retromusic.R;
|
||||
import com.google.android.material.card.MaterialCardView;
|
||||
|
@ -47,7 +48,7 @@ public class MediaEntryViewHolder extends AbstractDraggableSwipeableItemViewHold
|
|||
|
||||
@Nullable public View mask;
|
||||
|
||||
@Nullable public View menu;
|
||||
@Nullable public AppCompatImageView menu;
|
||||
|
||||
@Nullable public View paletteColorContainer;
|
||||
|
||||
|
|
|
@ -111,6 +111,7 @@ open class SongAdapter(
|
|||
holder.title?.setTextColor(color.primaryTextColor)
|
||||
holder.text?.setTextColor(color.secondaryTextColor)
|
||||
holder.paletteColorContainer?.setBackgroundColor(color.backgroundColor)
|
||||
holder.menu?.imageTintList= ColorStateList.valueOf(color.primaryTextColor)
|
||||
}
|
||||
holder.mask?.backgroundTintList = ColorStateList.valueOf(color.primaryTextColor)
|
||||
}
|
||||
|
|
|
@ -32,6 +32,5 @@
|
|||
android:padding="12dp"
|
||||
android:textAppearance="@style/TextViewSubtitle1"
|
||||
android:textColor="@color/md_white_1000"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
||||
tools:text="@tools:sample/full_names" />
|
||||
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
|
@ -36,12 +36,13 @@
|
|||
tools:src="@tools:sample/avatars" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/titleContainer"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:padding="12dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/menu"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/image">
|
||||
|
||||
|
@ -62,6 +63,17 @@
|
|||
android:singleLine="true"
|
||||
tools:text="@tools:sample/full_names" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/menu"
|
||||
style="@style/OverFlowButton"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="0"
|
||||
app:layout_constraintBottom_toBottomOf="@id/titleContainer"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/titleContainer"
|
||||
app:layout_constraintTop_toTopOf="@id/titleContainer"
|
||||
app:tint="?attr/colorControlNormal" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</FrameLayout>
|
|
@ -34,12 +34,13 @@
|
|||
tools:src="@tools:sample/avatars" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/titleContainer"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:padding="12dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/menu"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/image">
|
||||
|
||||
|
@ -60,6 +61,17 @@
|
|||
android:singleLine="true"
|
||||
tools:text="@tools:sample/full_names" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/menu"
|
||||
style="@style/OverFlowButton"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="0"
|
||||
app:layout_constraintBottom_toBottomOf="@id/titleContainer"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/titleContainer"
|
||||
app:layout_constraintTop_toTopOf="@id/titleContainer"
|
||||
app:tint="?attr/colorControlNormal" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</FrameLayout>
|
|
@ -33,12 +33,13 @@
|
|||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/titleContainer"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:padding="12dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/menu"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/imageContainer">
|
||||
|
||||
|
@ -60,5 +61,16 @@
|
|||
tools:text="@tools:sample/full_names" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/menu"
|
||||
style="@style/OverFlowButton"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="0"
|
||||
app:layout_constraintBottom_toBottomOf="@id/titleContainer"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/titleContainer"
|
||||
app:layout_constraintTop_toTopOf="@id/titleContainer"
|
||||
app:tint="?attr/colorControlNormal" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
@ -48,7 +48,6 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingTop="4dp"
|
||||
android:singleLine="true"
|
||||
tools:text="@tools:sample/full_names" />
|
||||
</LinearLayout>
|
||||
|
|
Loading…
Reference in a new issue