Fix id names

This commit is contained in:
h4h13 2019-11-08 22:37:30 +05:30
parent 486f1aebc6
commit 5c495108c4
25 changed files with 92 additions and 90 deletions

View file

@ -92,10 +92,8 @@ class SearchAdapter(
ALBUM -> setImageTransitionName(activity.getString(R.string.transition_album_art))
ARTIST -> setImageTransitionName(activity.getString(R.string.transition_artist_image))
else -> {
val container = itemView.findViewById<View>(R.id.image_container)
if (container != null) {
container.visibility = View.GONE
}
val container = itemView.findViewById<View>(R.id.imageContainer)
container?.visibility = View.GONE
}
}
}

View file

@ -126,9 +126,7 @@ class ArtistAdapter(val activity: AppCompatActivity,
init {
setImageTransitionName(activity.getString(code.name.monkey.retromusic.R.string.transition_artist_image))
if (menu != null) {
menu!!.visibility = View.GONE
}
menu?.visibility = View.GONE
}
override fun onClick(v: View?) {

View file

@ -14,7 +14,6 @@
package code.name.monkey.retromusic.adapter.base;
import android.os.Build;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageButton;
@ -81,14 +80,14 @@ public class MediaEntryViewHolder extends RecyclerView.ViewHolder implements Vie
image = itemView.findViewById(R.id.image);
time = itemView.findViewById(R.id.time);
imageText = itemView.findViewById(R.id.image_text);
imageContainer = itemView.findViewById(R.id.image_container);
imageTextContainer = itemView.findViewById(R.id.image_text_container);
imageContainerCard = itemView.findViewById(R.id.image_container_card);
imageText = itemView.findViewById(R.id.imageText);
imageContainer = itemView.findViewById(R.id.imageContainer);
imageTextContainer = itemView.findViewById(R.id.imageTextContainer);
imageContainerCard = itemView.findViewById(R.id.imageContainerCard);
menu = itemView.findViewById(R.id.menu);
dragView = itemView.findViewById(R.id.drag_view);
paletteColorContainer = itemView.findViewById(R.id.palette_color_container);
paletteColorContainer = itemView.findViewById(R.id.paletteColorContainer);
recyclerView = itemView.findViewById(R.id.recycler_view);
mask = itemView.findViewById(R.id.mask);
playSongs = itemView.findViewById(R.id.playSongs);
@ -111,7 +110,7 @@ public class MediaEntryViewHolder extends RecyclerView.ViewHolder implements Vie
}
public void setImageTransitionName(@NonNull String transitionName) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && image != null) {
if (image != null) {
image.setTransitionName(transitionName);
}
}