From e78135f85a59394c425b006cbf9ea85e96aed334 Mon Sep 17 00:00:00 2001 From: Austin Huang Date: Sat, 10 Jul 2021 17:15:25 -0400 Subject: [PATCH] change waterfall layout location is bugged, does affect visually but should not affect use --- .../viewholder/feed/FeedItemViewHolder.java | 133 +++++++++++------- .../viewholder/feed/FeedPhotoViewHolder.java | 6 +- .../viewholder/feed/FeedSliderViewHolder.java | 17 ++- .../viewholder/feed/FeedVideoViewHolder.java | 44 ++++-- app/src/main/res/layout/item_feed_bottom.xml | 113 --------------- app/src/main/res/layout/item_feed_photo.xml | 20 ++- app/src/main/res/layout/item_feed_slider.xml | 20 ++- app/src/main/res/layout/item_feed_top.xml | 133 ++++++++++-------- app/src/main/res/layout/item_feed_video.xml | 27 ++-- .../main/res/layout/item_full_post_view.xml | 105 -------------- 10 files changed, 241 insertions(+), 377 deletions(-) delete mode 100755 app/src/main/res/layout/item_feed_bottom.xml delete mode 100644 app/src/main/res/layout/item_full_post_view.xml diff --git a/app/src/main/java/awais/instagrabber/adapters/viewholder/feed/FeedItemViewHolder.java b/app/src/main/java/awais/instagrabber/adapters/viewholder/feed/FeedItemViewHolder.java index 806faab5..46320eb4 100644 --- a/app/src/main/java/awais/instagrabber/adapters/viewholder/feed/FeedItemViewHolder.java +++ b/app/src/main/java/awais/instagrabber/adapters/viewholder/feed/FeedItemViewHolder.java @@ -1,39 +1,45 @@ package awais.instagrabber.adapters.viewholder.feed; -import android.text.method.LinkMovementMethod; +import android.graphics.drawable.Drawable; +import android.text.SpannableStringBuilder; +import android.text.Spanned; import android.transition.TransitionManager; +import android.util.Log; import android.view.View; +import android.view.ViewGroup; import android.widget.RelativeLayout; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; +import awais.instagrabber.R; import awais.instagrabber.adapters.FeedAdapterV2; -import awais.instagrabber.databinding.ItemFeedBottomBinding; +import awais.instagrabber.customviews.VerticalImageSpan; import awais.instagrabber.databinding.ItemFeedTopBinding; +import awais.instagrabber.databinding.LayoutPostViewBottomBinding; import awais.instagrabber.models.enums.MediaItemType; import awais.instagrabber.repositories.responses.Caption; import awais.instagrabber.repositories.responses.Location; import awais.instagrabber.repositories.responses.Media; import awais.instagrabber.repositories.responses.User; import awais.instagrabber.utils.TextUtils; +import awais.instagrabber.utils.Utils; import static android.text.TextUtils.TruncateAt.END; public abstract class FeedItemViewHolder extends RecyclerView.ViewHolder { public static final int MAX_LINES_COLLAPSED = 5; private final ItemFeedTopBinding topBinding; - private final ItemFeedBottomBinding bottomBinding; + private final LayoutPostViewBottomBinding bottomBinding; + private final ViewGroup bottomFrame; private final FeedAdapterV2.FeedItemCallback feedItemCallback; - public FeedItemViewHolder(@NonNull final View root, - final ItemFeedTopBinding topBinding, - final ItemFeedBottomBinding bottomBinding, + public FeedItemViewHolder(@NonNull final ViewGroup root, final FeedAdapterV2.FeedItemCallback feedItemCallback) { super(root); - this.topBinding = topBinding; - this.bottomBinding = bottomBinding; - topBinding.title.setMovementMethod(new LinkMovementMethod()); + this.bottomFrame = root; + this.topBinding = ItemFeedTopBinding.bind(root); + this.bottomBinding = LayoutPostViewBottomBinding.bind(root); this.feedItemCallback = feedItemCallback; } @@ -42,33 +48,35 @@ public abstract class FeedItemViewHolder extends RecyclerView.ViewHolder { return; } setupProfilePic(media); - setupLocation(media); - bottomBinding.tvPostDate.setText(media.getDate()); + bottomBinding.date.setText(media.getDate()); setupComments(media); setupCaption(media); + setupActions(media); if (media.getType() != MediaItemType.MEDIA_TYPE_SLIDER) { - bottomBinding.btnDownload.setOnClickListener(v -> + bottomBinding.download.setOnClickListener(v -> feedItemCallback.onDownloadClick(media, -1, null) ); } bindItem(media); + bottomFrame.post(() -> setupLocation(media)); } private void setupComments(@NonNull final Media feedModel) { final long commentsCount = feedModel.getCommentCount(); bottomBinding.commentsCount.setText(String.valueOf(commentsCount)); - bottomBinding.btnComments.setOnClickListener(v -> feedItemCallback.onCommentsClick(feedModel)); + bottomBinding.comment.setOnClickListener(v -> feedItemCallback.onCommentsClick(feedModel)); } private void setupProfilePic(@NonNull final Media media) { final User user = media.getUser(); if (user == null) { - topBinding.ivProfilePic.setVisibility(View.GONE); + topBinding.profilePic.setVisibility(View.GONE); topBinding.title.setVisibility(View.GONE); + topBinding.subtitle.setVisibility(View.GONE); return; } - topBinding.ivProfilePic.setOnClickListener(v -> feedItemCallback.onProfilePicClick(media, topBinding.ivProfilePic)); - topBinding.ivProfilePic.setImageURI(user.getProfilePicUrl()); + topBinding.profilePic.setOnClickListener(v -> feedItemCallback.onProfilePicClick(media)); + topBinding.profilePic.setImageURI(user.getProfilePicUrl()); setupTitle(media); } @@ -78,68 +86,97 @@ public abstract class FeedItemViewHolder extends RecyclerView.ViewHolder { // spannableString.setSpan(new CommentMentionClickSpan(), 0, titleLen, 0); final User user = media.getUser(); if (user == null) return; - final String title = "@" + user.getUsername(); - topBinding.title.setText(title); - topBinding.title.setOnClickListener(v -> feedItemCallback.onNameClick(media, topBinding.ivProfilePic)); + setUsername(user); + topBinding.title.setOnClickListener(v -> feedItemCallback.onNameClick(media)); + final String fullName = user.getFullName(); + if (TextUtils.isEmpty(fullName)) { + topBinding.subtitle.setVisibility(View.GONE); + } else { + topBinding.subtitle.setVisibility(View.VISIBLE); + topBinding.subtitle.setText(fullName); + } + topBinding.subtitle.setOnClickListener(v -> feedItemCallback.onNameClick(media)); } private void setupCaption(final Media media) { - bottomBinding.viewerCaption.clearOnMentionClickListeners(); - bottomBinding.viewerCaption.clearOnHashtagClickListeners(); - bottomBinding.viewerCaption.clearOnURLClickListeners(); - bottomBinding.viewerCaption.clearOnEmailClickListeners(); + bottomBinding.caption.clearOnMentionClickListeners(); + bottomBinding.caption.clearOnHashtagClickListeners(); + bottomBinding.caption.clearOnURLClickListeners(); + bottomBinding.caption.clearOnEmailClickListeners(); final Caption caption = media.getCaption(); if (caption == null) { - bottomBinding.viewerCaption.setVisibility(View.GONE); + bottomBinding.caption.setVisibility(View.GONE); return; } final CharSequence postCaption = caption.getText(); final boolean captionEmpty = TextUtils.isEmpty(postCaption); - bottomBinding.viewerCaption.setVisibility(captionEmpty ? View.GONE : View.VISIBLE); + bottomBinding.caption.setVisibility(captionEmpty ? View.GONE : View.VISIBLE); if (captionEmpty) return; - bottomBinding.viewerCaption.setText(postCaption); - bottomBinding.viewerCaption.setMaxLines(MAX_LINES_COLLAPSED); - bottomBinding.viewerCaption.setEllipsize(END); - bottomBinding.viewerCaption.setOnClickListener(v -> bottomBinding.getRoot().post(() -> { - TransitionManager.beginDelayedTransition(bottomBinding.getRoot()); - if (bottomBinding.viewerCaption.getMaxLines() == MAX_LINES_COLLAPSED) { - bottomBinding.viewerCaption.setMaxLines(Integer.MAX_VALUE); - bottomBinding.viewerCaption.setEllipsize(null); + bottomBinding.caption.setText(postCaption); + bottomBinding.caption.setMaxLines(MAX_LINES_COLLAPSED); + bottomBinding.caption.setEllipsize(END); + bottomBinding.caption.setOnClickListener(v -> bottomFrame.post(() -> { + TransitionManager.beginDelayedTransition(bottomFrame); + if (bottomBinding.caption.getMaxLines() == MAX_LINES_COLLAPSED) { + bottomBinding.caption.setMaxLines(Integer.MAX_VALUE); + bottomBinding.caption.setEllipsize(null); return; } - bottomBinding.viewerCaption.setMaxLines(MAX_LINES_COLLAPSED); - bottomBinding.viewerCaption.setEllipsize(END); + bottomBinding.caption.setMaxLines(MAX_LINES_COLLAPSED); + bottomBinding.caption.setEllipsize(END); })); - bottomBinding.viewerCaption.addOnMentionClickListener(autoLinkItem -> feedItemCallback.onMentionClick(autoLinkItem.getOriginalText())); - bottomBinding.viewerCaption.addOnHashtagListener(autoLinkItem -> feedItemCallback.onHashtagClick(autoLinkItem.getOriginalText())); - bottomBinding.viewerCaption.addOnEmailClickListener(autoLinkItem -> feedItemCallback.onEmailClick(autoLinkItem.getOriginalText())); - bottomBinding.viewerCaption.addOnURLClickListener(autoLinkItem -> feedItemCallback.onURLClick(autoLinkItem.getOriginalText())); + bottomBinding.caption.addOnMentionClickListener(autoLinkItem -> feedItemCallback.onMentionClick(autoLinkItem.getOriginalText())); + bottomBinding.caption.addOnHashtagListener(autoLinkItem -> feedItemCallback.onHashtagClick(autoLinkItem.getOriginalText())); + bottomBinding.caption.addOnEmailClickListener(autoLinkItem -> feedItemCallback.onEmailClick(autoLinkItem.getOriginalText())); + bottomBinding.caption.addOnURLClickListener(autoLinkItem -> feedItemCallback.onURLClick(autoLinkItem.getOriginalText())); } private void setupLocation(@NonNull final Media media) { final Location location = media.getLocation(); if (location == null) { topBinding.location.setVisibility(View.GONE); - topBinding.title.setLayoutParams(new RelativeLayout.LayoutParams( - RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT - )); } else { final String locationName = location.getName(); if (TextUtils.isEmpty(locationName)) { topBinding.location.setVisibility(View.GONE); - topBinding.title.setLayoutParams(new RelativeLayout.LayoutParams( - RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT - )); } else { topBinding.location.setVisibility(View.VISIBLE); topBinding.location.setText(locationName); - topBinding.title.setLayoutParams(new RelativeLayout.LayoutParams( - RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT - )); topBinding.location.setOnClickListener(v -> feedItemCallback.onLocationClick(media)); } } } + private void setupActions(@NonNull final Media media) { + // temporary - to be set up later + bottomBinding.like.setVisibility(View.GONE); + bottomBinding.save.setVisibility(View.GONE); + bottomBinding.translate.setVisibility(View.GONE); + bottomBinding.share.setVisibility(View.GONE); + } + + private void setUsername(final User user) { + final SpannableStringBuilder sb = new SpannableStringBuilder(user.getUsername()); + final int drawableSize = Utils.convertDpToPx(24); + if (user.isVerified()) { + final Drawable verifiedDrawable = itemView.getResources().getDrawable(R.drawable.verified); + VerticalImageSpan verifiedSpan = null; + if (verifiedDrawable != null) { + final Drawable drawable = verifiedDrawable.mutate(); + drawable.setBounds(0, 0, drawableSize, drawableSize); + verifiedSpan = new VerticalImageSpan(drawable); + } + try { + if (verifiedSpan != null) { + sb.append(" "); + sb.setSpan(verifiedSpan, sb.length() - 1, sb.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); + } + } catch (Exception e) { + Log.e("FeedItemViewHolder", "setUsername: ", e); + } + } + topBinding.title.setText(sb); + } + public abstract void bindItem(final Media media); } \ No newline at end of file diff --git a/app/src/main/java/awais/instagrabber/adapters/viewholder/feed/FeedPhotoViewHolder.java b/app/src/main/java/awais/instagrabber/adapters/viewholder/feed/FeedPhotoViewHolder.java index f96d9fb9..7c007a49 100644 --- a/app/src/main/java/awais/instagrabber/adapters/viewholder/feed/FeedPhotoViewHolder.java +++ b/app/src/main/java/awais/instagrabber/adapters/viewholder/feed/FeedPhotoViewHolder.java @@ -16,6 +16,7 @@ import com.facebook.imagepipeline.request.ImageRequestBuilder; import awais.instagrabber.adapters.FeedAdapterV2; import awais.instagrabber.databinding.ItemFeedPhotoBinding; +import awais.instagrabber.databinding.LayoutPostViewBottomBinding; import awais.instagrabber.repositories.responses.Media; import awais.instagrabber.utils.ResponseBodyUtils; import awais.instagrabber.utils.TextUtils; @@ -28,10 +29,11 @@ public class FeedPhotoViewHolder extends FeedItemViewHolder { public FeedPhotoViewHolder(@NonNull final ItemFeedPhotoBinding binding, final FeedAdapterV2.FeedItemCallback feedItemCallback) { - super(binding.getRoot(), binding.itemFeedTop, binding.itemFeedBottom, feedItemCallback); + super(binding.getRoot(), feedItemCallback); this.binding = binding; this.feedItemCallback = feedItemCallback; - binding.itemFeedBottom.btnViews.setVisibility(View.GONE); + final LayoutPostViewBottomBinding bottom = LayoutPostViewBottomBinding.bind(binding.getRoot()); + bottom.viewsCount.setVisibility(View.GONE); // binding.itemFeedBottom.btnMute.setVisibility(View.GONE); binding.imageViewer.setAllowTouchInterceptionWhileZoomed(false); final GenericDraweeHierarchy hierarchy = new GenericDraweeHierarchyBuilder(itemView.getContext().getResources()) diff --git a/app/src/main/java/awais/instagrabber/adapters/viewholder/feed/FeedSliderViewHolder.java b/app/src/main/java/awais/instagrabber/adapters/viewholder/feed/FeedSliderViewHolder.java index 66902340..3c52bc49 100644 --- a/app/src/main/java/awais/instagrabber/adapters/viewholder/feed/FeedSliderViewHolder.java +++ b/app/src/main/java/awais/instagrabber/adapters/viewholder/feed/FeedSliderViewHolder.java @@ -13,6 +13,7 @@ import awais.instagrabber.adapters.FeedAdapterV2; import awais.instagrabber.adapters.SliderCallbackAdapter; import awais.instagrabber.adapters.SliderItemsAdapter; import awais.instagrabber.databinding.ItemFeedSliderBinding; +import awais.instagrabber.databinding.LayoutPostViewBottomBinding; import awais.instagrabber.repositories.responses.Media; import awais.instagrabber.utils.NumberUtils; import awais.instagrabber.utils.Utils; @@ -23,14 +24,16 @@ public class FeedSliderViewHolder extends FeedItemViewHolder { private final ItemFeedSliderBinding binding; private final FeedAdapterV2.FeedItemCallback feedItemCallback; + private final LayoutPostViewBottomBinding bottom; public FeedSliderViewHolder(@NonNull final ItemFeedSliderBinding binding, final FeedAdapterV2.FeedItemCallback feedItemCallback) { - super(binding.getRoot(), binding.itemFeedTop, binding.itemFeedBottom, feedItemCallback); + super(binding.getRoot(), feedItemCallback); this.binding = binding; this.feedItemCallback = feedItemCallback; - binding.itemFeedBottom.btnViews.setVisibility(View.GONE); - // binding.itemFeedBottom.btnMute.setVisibility(View.GONE); + bottom = LayoutPostViewBottomBinding.bind(binding.getRoot()); + bottom.viewsCount.setVisibility(View.GONE); + // bottom.btnMute.setVisibility(View.GONE); final ViewGroup.LayoutParams layoutParams = binding.mediaList.getLayoutParams(); layoutParams.height = Utils.displayMetrics.widthPixels + 1; binding.mediaList.setLayoutParams(layoutParams); @@ -59,14 +62,14 @@ public class FeedSliderViewHolder extends FeedItemViewHolder { final String text = (position + 1) + "/" + sliderItemLen; binding.mediaCounter.setText(text); setDimensions(binding.mediaList, sliderItems.get(position)); - binding.itemFeedBottom.btnDownload.setOnClickListener(v -> - feedItemCallback.onDownloadClick(feedModel, position, binding.itemFeedBottom.btnDownload) + bottom.download.setOnClickListener(v -> + feedItemCallback.onDownloadClick(feedModel, position, bottom.download) ); } }); setDimensions(binding.mediaList, sliderItems.get(0)); - binding.itemFeedBottom.btnDownload.setOnClickListener(v -> - feedItemCallback.onDownloadClick(feedModel, 0, binding.itemFeedBottom.btnDownload) + bottom.download.setOnClickListener(v -> + feedItemCallback.onDownloadClick(feedModel, 0, bottom.download) ); adapter.submitList(sliderItems); } diff --git a/app/src/main/java/awais/instagrabber/adapters/viewholder/feed/FeedVideoViewHolder.java b/app/src/main/java/awais/instagrabber/adapters/viewholder/feed/FeedVideoViewHolder.java index b2eaaef4..61f79111 100644 --- a/app/src/main/java/awais/instagrabber/adapters/viewholder/feed/FeedVideoViewHolder.java +++ b/app/src/main/java/awais/instagrabber/adapters/viewholder/feed/FeedVideoViewHolder.java @@ -3,10 +3,12 @@ package awais.instagrabber.adapters.viewholder.feed; import android.content.Context; import android.os.Handler; import android.os.Looper; +import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.annotation.NonNull; +import androidx.constraintlayout.widget.ConstraintLayout; import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory; import com.google.android.exoplayer2.upstream.cache.CacheDataSourceFactory; @@ -14,13 +16,17 @@ import com.google.android.exoplayer2.upstream.cache.SimpleCache; import java.util.List; +import awais.instagrabber.R; import awais.instagrabber.adapters.FeedAdapterV2; import awais.instagrabber.customviews.VideoPlayerCallbackAdapter; import awais.instagrabber.customviews.VideoPlayerViewHelper; import awais.instagrabber.databinding.ItemFeedVideoBinding; +import awais.instagrabber.databinding.LayoutPostViewBottomBinding; +import awais.instagrabber.databinding.LayoutVideoPlayerWithThumbnailBinding; import awais.instagrabber.fragments.settings.PreferenceKeys; import awais.instagrabber.repositories.responses.Media; import awais.instagrabber.repositories.responses.MediaCandidate; +import awais.instagrabber.utils.NullSafePair; import awais.instagrabber.utils.NumberUtils; import awais.instagrabber.utils.ResponseBodyUtils; import awais.instagrabber.utils.Utils; @@ -35,6 +41,7 @@ public class FeedVideoViewHolder extends FeedItemViewHolder { private final Handler handler; private final DefaultDataSourceFactory dataSourceFactory; + private final LayoutPostViewBottomBinding bottom; private CacheDataSourceFactory cacheDataSourceFactory; private Media media; @@ -47,10 +54,11 @@ public class FeedVideoViewHolder extends FeedItemViewHolder { public FeedVideoViewHolder(@NonNull final ItemFeedVideoBinding binding, final FeedAdapterV2.FeedItemCallback feedItemCallback) { - super(binding.getRoot(), binding.itemFeedTop, binding.itemFeedBottom, feedItemCallback); + super(binding.getRoot(), feedItemCallback); + bottom = LayoutPostViewBottomBinding.bind(binding.getRoot()); this.binding = binding; this.feedItemCallback = feedItemCallback; - binding.itemFeedBottom.btnViews.setVisibility(View.VISIBLE); + bottom.viewsCount.setVisibility(View.VISIBLE); handler = new Handler(Looper.getMainLooper()); final Context context = binding.getRoot().getContext(); dataSourceFactory = new DefaultDataSourceFactory(context, "instagram"); @@ -64,7 +72,19 @@ public class FeedVideoViewHolder extends FeedItemViewHolder { public void bindItem(final Media media) { // Log.d(TAG, "Binding post: " + feedModel.getPostId()); this.media = media; - binding.itemFeedBottom.tvVideoViews.setText(String.valueOf(media.getViewCount())); + final String viewCount = itemView.getResources().getQuantityString(R.plurals.views_count, (int) media.getViewCount(), media.getViewCount()); + bottom.viewsCount.setText(viewCount); + final LayoutVideoPlayerWithThumbnailBinding videoPost = + LayoutVideoPlayerWithThumbnailBinding.inflate(LayoutInflater.from(itemView.getContext()), binding.getRoot(), false); + final ConstraintLayout.LayoutParams layoutParams = (ConstraintLayout.LayoutParams) videoPost.getRoot().getLayoutParams(); + final NullSafePair widthHeight = NumberUtils.calculateWidthHeight(media.getOriginalHeight(), + media.getOriginalWidth(), + (int) (Utils.displayMetrics.heightPixels * 0.8), + Utils.displayMetrics.widthPixels); + layoutParams.width = ConstraintLayout.LayoutParams.MATCH_PARENT; + layoutParams.height = widthHeight.second; + final View postView = videoPost.getRoot(); + binding.postContainer.addView(postView); final float vol = settingsHelper.getBoolean(PreferenceKeys.MUTED_VIDEOS) ? 0f : 1f; final VideoPlayerViewHelper.VideoPlayerCallback videoPlayerCallback = new VideoPlayerCallbackAdapter() { @@ -75,12 +95,12 @@ public class FeedVideoViewHolder extends FeedItemViewHolder { @Override public void onPlayerViewLoaded() { - final ViewGroup.LayoutParams layoutParams = binding.videoPost.playerView.getLayoutParams(); + final ViewGroup.LayoutParams layoutParams = videoPost.playerView.getLayoutParams(); final int requiredWidth = Utils.displayMetrics.widthPixels; final int resultingHeight = NumberUtils.getResultingHeight(requiredWidth, media.getOriginalHeight(), media.getOriginalWidth()); layoutParams.width = requiredWidth; layoutParams.height = resultingHeight; - binding.videoPost.playerView.requestLayout(); + videoPost.playerView.requestLayout(); } }; final float aspectRatio = (float) media.getOriginalWidth() / media.getOriginalHeight(); @@ -91,7 +111,7 @@ public class FeedVideoViewHolder extends FeedItemViewHolder { videoUrl = videoVersion.getUrl(); } final VideoPlayerViewHelper videoPlayerViewHelper = new VideoPlayerViewHelper(binding.getRoot().getContext(), - binding.videoPost, + videoPost, videoUrl, vol, aspectRatio, @@ -99,11 +119,11 @@ public class FeedVideoViewHolder extends FeedItemViewHolder { false, // null, videoPlayerCallback); - binding.videoPost.thumbnail.post(() -> { + videoPost.thumbnail.post(() -> { if (media.getOriginalHeight() > 0.8 * Utils.displayMetrics.heightPixels) { - final ViewGroup.LayoutParams layoutParams = binding.videoPost.thumbnail.getLayoutParams(); - layoutParams.height = (int) (0.8 * Utils.displayMetrics.heightPixels); - binding.videoPost.thumbnail.requestLayout(); + final ViewGroup.LayoutParams tLayoutParams = videoPost.thumbnail.getLayoutParams(); + tLayoutParams.height = (int) (0.8 * Utils.displayMetrics.heightPixels); + videoPost.thumbnail.requestLayout(); } }); } @@ -118,8 +138,8 @@ public class FeedVideoViewHolder extends FeedItemViewHolder { // if (player != null) { // player.release(); // } - // if (binding.videoPost.root.getDisplayedChild() == 1) { - // binding.videoPost.root.showPrevious(); + // if (videoPost.root.getDisplayedChild() == 1) { + // videoPost.root.showPrevious(); // } // } // diff --git a/app/src/main/res/layout/item_feed_bottom.xml b/app/src/main/res/layout/item_feed_bottom.xml deleted file mode 100755 index 9ffc0599..00000000 --- a/app/src/main/res/layout/item_feed_bottom.xml +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/item_feed_photo.xml b/app/src/main/res/layout/item_feed_photo.xml index 4a4180f8..1619acb8 100644 --- a/app/src/main/res/layout/item_feed_photo.xml +++ b/app/src/main/res/layout/item_feed_photo.xml @@ -1,13 +1,11 @@ - + android:layout_height="wrap_content"> - + + app:viewAspectRatio="1" + app:layout_constraintTop_toBottomOf="@id/top_barrier" + app:layout_constraintBottom_toTopOf="@id/buttons_top_barrier"/> - - \ No newline at end of file + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_feed_slider.xml b/app/src/main/res/layout/item_feed_slider.xml index af6cc778..650637c3 100755 --- a/app/src/main/res/layout/item_feed_slider.xml +++ b/app/src/main/res/layout/item_feed_slider.xml @@ -1,18 +1,18 @@ - + android:layout_height="wrap_content"> - + + android:layout_height="wrap_content" + app:layout_constraintTop_toBottomOf="@id/top_barrier" + app:layout_constraintBottom_toTopOf="@id/buttons_top_barrier"> - - \ No newline at end of file + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_feed_top.xml b/app/src/main/res/layout/item_feed_top.xml index 61b49c31..9cde23cd 100755 --- a/app/src/main/res/layout/item_feed_top.xml +++ b/app/src/main/res/layout/item_feed_top.xml @@ -1,63 +1,86 @@ - + tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"> - + - + + + + + + - - - - - - - - - - - - - - - \ No newline at end of file + android:textAlignment="viewStart" + android:textAllCaps="false" + android:textColor="@android:color/white" + android:visibility="gone" + app:backgroundTint="@color/black_a50" + app:elevation="0dp" + app:icon="@drawable/ic_round_location_on_24" + app:iconSize="16dp" + app:iconTint="@color/white" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toBottomOf="@id/top_barrier" + app:rippleColor="@color/grey_600" + tools:text="Location, Location, Location, Location, " + tools:visibility="visible" /> + \ No newline at end of file diff --git a/app/src/main/res/layout/item_feed_video.xml b/app/src/main/res/layout/item_feed_video.xml index 4a806a4b..c5ea68be 100755 --- a/app/src/main/res/layout/item_feed_video.xml +++ b/app/src/main/res/layout/item_feed_video.xml @@ -1,19 +1,20 @@ - + android:layout_height="wrap_content"> - + - + - - \ No newline at end of file + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_full_post_view.xml b/app/src/main/res/layout/item_full_post_view.xml deleted file mode 100644 index f529b6a3..00000000 --- a/app/src/main/res/layout/item_full_post_view.xml +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file