Browse Source
edit post caption (just basic design, still WIP)
renovate/org.robolectric-robolectric-4.x
edit post caption (just basic design, still WIP)
renovate/org.robolectric-robolectric-4.x
Austin Huang
4 years ago
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F
7 changed files with 115 additions and 80 deletions
-
75app/src/main/java/awais/instagrabber/adapters/PostViewAdapter.java
-
47app/src/main/java/awais/instagrabber/fragments/PostViewV2Fragment.java
-
5app/src/main/java/awais/instagrabber/repositories/MediaRepository.java
-
8app/src/main/java/awais/instagrabber/viewmodels/BasePostViewModel.java
-
41app/src/main/java/awais/instagrabber/webservices/MediaService.java
-
18app/src/main/res/layout/dialog_post_view.xml
-
1app/src/main/res/values/strings.xml
@ -1,75 +0,0 @@ |
|||||
// package awais.instagrabber.adapters; |
|
||||
// |
|
||||
// import android.view.LayoutInflater; |
|
||||
// import android.view.View; |
|
||||
// import android.view.ViewGroup; |
|
||||
// |
|
||||
// import androidx.annotation.NonNull; |
|
||||
// import androidx.recyclerview.widget.DiffUtil; |
|
||||
// import androidx.recyclerview.widget.ListAdapter; |
|
||||
// |
|
||||
// import awais.instagrabber.adapters.viewholder.PostViewerViewHolder; |
|
||||
// import awais.instagrabber.databinding.ItemFullPostViewBinding; |
|
||||
// import awais.instagrabber.interfaces.MentionClickListener; |
|
||||
// import awais.instagrabber.models.ViewerPostModelWrapper; |
|
||||
// |
|
||||
// public class PostViewAdapter extends ListAdapter<ViewerPostModelWrapper, PostViewerViewHolder> { |
|
||||
// private final OnPostViewChildViewClickListener clickListener; |
|
||||
// private final OnPostCaptionLongClickListener longClickListener; |
|
||||
// private final MentionClickListener mentionClickListener; |
|
||||
// |
|
||||
// private static final DiffUtil.ItemCallback<ViewerPostModelWrapper> diffCallback = new DiffUtil.ItemCallback<ViewerPostModelWrapper>() { |
|
||||
// @Override |
|
||||
// public boolean areItemsTheSame(@NonNull final ViewerPostModelWrapper oldItem, |
|
||||
// @NonNull final ViewerPostModelWrapper newItem) { |
|
||||
// return oldItem.getPosition() == newItem.getPosition(); |
|
||||
// } |
|
||||
// |
|
||||
// @Override |
|
||||
// public boolean areContentsTheSame(@NonNull final ViewerPostModelWrapper oldItem, |
|
||||
// @NonNull final ViewerPostModelWrapper newItem) { |
|
||||
// return oldItem.getViewerPostModels().equals(newItem.getViewerPostModels()); |
|
||||
// } |
|
||||
// }; |
|
||||
// |
|
||||
// public PostViewAdapter(final OnPostViewChildViewClickListener clickListener, |
|
||||
// final OnPostCaptionLongClickListener longClickListener, |
|
||||
// final MentionClickListener mentionClickListener) { |
|
||||
// super(diffCallback); |
|
||||
// this.clickListener = clickListener; |
|
||||
// this.longClickListener = longClickListener; |
|
||||
// this.mentionClickListener = mentionClickListener; |
|
||||
// } |
|
||||
// |
|
||||
// @Override |
|
||||
// public void onViewDetachedFromWindow(@NonNull final PostViewerViewHolder holder) { |
|
||||
// holder.stopPlayingVideo(); |
|
||||
// } |
|
||||
// |
|
||||
// @NonNull |
|
||||
// @Override |
|
||||
// public PostViewerViewHolder onCreateViewHolder(@NonNull final ViewGroup parent, |
|
||||
// final int viewType) { |
|
||||
// final LayoutInflater layoutInflater = LayoutInflater.from(parent.getContext()); |
|
||||
// final ItemFullPostViewBinding binding = ItemFullPostViewBinding |
|
||||
// .inflate(layoutInflater, parent, false); |
|
||||
// return new PostViewerViewHolder(binding); |
|
||||
// } |
|
||||
// |
|
||||
// @Override |
|
||||
// public void onBindViewHolder(@NonNull final PostViewerViewHolder holder, final int position) { |
|
||||
// final ViewerPostModelWrapper item = getItem(position); |
|
||||
// holder.bind(item, position, clickListener, longClickListener, mentionClickListener); |
|
||||
// } |
|
||||
// |
|
||||
// public interface OnPostViewChildViewClickListener { |
|
||||
// void onClick(View v, |
|
||||
// ViewerPostModelWrapper viewerPostModelWrapper, |
|
||||
// int postPosition, |
|
||||
// int childPosition); |
|
||||
// } |
|
||||
// |
|
||||
// public interface OnPostCaptionLongClickListener { |
|
||||
// void onLongClick(String text); |
|
||||
// } |
|
||||
// } |
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue