From 4373d3aa55845160fc81940af10755e7745b11b5 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Thu, 8 Nov 2018 14:13:17 +0800 Subject: Minor layout tweaks. --- .../java/ml/docilealligator/infinityforreddit/ParsePost.java | 4 ++-- .../ml/docilealligator/infinityforreddit/PostFragment.java | 1 - .../infinityforreddit/PostRecyclerViewAdapter.java | 12 ++++++------ .../docilealligator/infinityforreddit/ViewImageActivity.java | 5 ----- 4 files changed, 8 insertions(+), 14 deletions(-) (limited to 'app/src/main/java/ml') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ParsePost.java b/app/src/main/java/ml/docilealligator/infinityforreddit/ParsePost.java index 5dcb673d..a5b9bf30 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/ParsePost.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/ParsePost.java @@ -270,9 +270,9 @@ class ParsePost { url, url, permalink, score, postType, voteType, gilded, nsfw, stickied, isCrosspost)); } else { - //Link post + //CP No Preview Link post Log.i("CP no preview link", Integer.toString(i)); - int postType = PostData.LINK_TYPE; + int postType = PostData.NO_PREVIEW_LINK_TYPE; PostData linkPostData = new PostData(id, fullName, subredditNamePrefixed, formattedPostTime, title, previewUrl, url, permalink, score, postType, voteType, gilded, nsfw, stickied, isCrosspost); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/PostFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/PostFragment.java index d6dc175f..3afd6ece 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/PostFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/PostFragment.java @@ -191,7 +191,6 @@ public class PostFragment extends Fragment implements FragmentCommunicator { public void onResponse(Call call, retrofit2.Response response) { if(getActivity() != null) { if(response.isSuccessful()) { - Log.i("response", "success"); ClipboardManager clipboard = (ClipboardManager) getActivity().getSystemService(Context.CLIPBOARD_SERVICE); ClipData clip = ClipData.newPlainText("response", response.body()); clipboard.setPrimaryClip(clip); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/PostRecyclerViewAdapter.java index b750595d..1bda1e61 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/PostRecyclerViewAdapter.java @@ -482,12 +482,12 @@ class PostRecyclerViewAdapter extends RecyclerView.Adapter target, boolean isFirstResource) { ((DataViewHolder) holder).progressBar.setVisibility(View.GONE); - ((DataViewHolder) holder).errorLinearLayout.setVisibility(View.VISIBLE); - ((DataViewHolder)holder).errorLinearLayout.setOnClickListener(new View.OnClickListener() { + ((DataViewHolder) holder).errorRelativeLayout.setVisibility(View.VISIBLE); + ((DataViewHolder)holder).errorRelativeLayout.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { ((DataViewHolder) holder).progressBar.setVisibility(View.VISIBLE); - ((DataViewHolder) holder).errorLinearLayout.setVisibility(View.GONE); + ((DataViewHolder) holder).errorRelativeLayout.setVisibility(View.GONE); loadImage(holder, postData); } }); @@ -496,7 +496,7 @@ class PostRecyclerViewAdapter extends RecyclerView.Adapter target, DataSource dataSource, boolean isFirstResource) { - ((DataViewHolder) holder).errorLinearLayout.setVisibility(View.GONE); + ((DataViewHolder) holder).errorRelativeLayout.setVisibility(View.GONE); ((DataViewHolder) holder).progressBar.setVisibility(View.GONE); return false; } @@ -537,7 +537,7 @@ class PostRecyclerViewAdapter extends RecyclerView.Adapter