Merge pull request #1063 from clay53/1042

Removed comment tips
This commit is contained in:
Akinwale Ariwodola 2020-12-18 13:01:49 +01:00 committed by GitHub
commit e6b83877f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 272 additions and 256 deletions

View file

@ -12,7 +12,6 @@ import lombok.Data;
@Data @Data
public class Comment implements Comparable<Comment> { public class Comment implements Comparable<Comment> {
public static final double LBC_COST = 1;
public static final int MAX_LENGTH = 2000; public static final int MAX_LENGTH = 2000;
private Claim poster; private Claim poster;

View file

@ -24,18 +24,16 @@ import okhttp3.OkHttpClient;
import okhttp3.Request; import okhttp3.Request;
import okhttp3.Response; import okhttp3.Response;
public class CommentCreateWithTipTask extends AsyncTask<Void, Void, Comment> { public class CommentCreateTask extends AsyncTask<Void, Void, Comment> {
private static final String STATUS_ENDPOINT = "https://comments.lbry.com"; private static final String STATUS_ENDPOINT = "https://comments.lbry.com";
private Comment comment; private Comment comment;
private BigDecimal amount;
private View progressView; private View progressView;
private CommentCreateWithTipHandler handler; private CommentCreateWithTipHandler handler;
private Exception error; private Exception error;
public CommentCreateWithTipTask(Comment comment, BigDecimal amount, View progressView, CommentCreateWithTipHandler handler) { public CommentCreateTask(Comment comment, View progressView, CommentCreateWithTipHandler handler) {
this.comment = comment; this.comment = comment;
this.amount = amount;
this.progressView = progressView; this.progressView = progressView;
this.handler = handler; this.handler = handler;
} }
@ -62,13 +60,6 @@ public class CommentCreateWithTipTask extends AsyncTask<Void, Void, Comment> {
} }
Map<String, Object> options = new HashMap<>(); Map<String, Object> options = new HashMap<>();
options.put("blocking", true);
options.put("claim_id", comment.getClaimId());
options.put("amount", new DecimalFormat(Helper.SDK_AMOUNT_FORMAT, new DecimalFormatSymbols(Locale.US)).format(amount.doubleValue()));
options.put("tip", true);
Lbry.genericApiCall(Lbry.METHOD_SUPPORT_CREATE, options);
options = new HashMap<>();
options.put("comment", comment.getText()); options.put("comment", comment.getText());
options.put("claim_id", comment.getClaimId()); options.put("claim_id", comment.getClaimId());
options.put("channel_id", comment.getChannelId()); options.put("channel_id", comment.getChannelId());

View file

@ -30,7 +30,6 @@ import com.google.android.material.snackbar.Snackbar;
import com.google.android.material.textfield.TextInputEditText; import com.google.android.material.textfield.TextInputEditText;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -45,7 +44,7 @@ import io.lbry.browser.listener.WalletBalanceListener;
import io.lbry.browser.model.Claim; import io.lbry.browser.model.Claim;
import io.lbry.browser.model.Comment; import io.lbry.browser.model.Comment;
import io.lbry.browser.model.WalletBalance; import io.lbry.browser.model.WalletBalance;
import io.lbry.browser.tasks.CommentCreateWithTipTask; import io.lbry.browser.tasks.CommentCreateTask;
import io.lbry.browser.tasks.CommentListHandler; import io.lbry.browser.tasks.CommentListHandler;
import io.lbry.browser.tasks.CommentListTask; import io.lbry.browser.tasks.CommentListTask;
import io.lbry.browser.tasks.claim.ChannelCreateUpdateTask; import io.lbry.browser.tasks.claim.ChannelCreateUpdateTask;
@ -58,7 +57,6 @@ import io.lbry.browser.utils.Helper;
import io.lbry.browser.utils.Lbry; import io.lbry.browser.utils.Lbry;
import io.lbry.browser.utils.LbryAnalytics; import io.lbry.browser.utils.LbryAnalytics;
import io.lbry.browser.utils.LbryUri; import io.lbry.browser.utils.LbryUri;
import io.lbry.browser.utils.Lbryio;
import lombok.Setter; import lombok.Setter;
public class ChannelCommentsFragment extends Fragment implements SdkStatusListener, WalletBalanceListener { public class ChannelCommentsFragment extends Fragment implements SdkStatusListener, WalletBalanceListener {
@ -367,9 +365,6 @@ public class ChannelCommentsFragment extends Fragment implements SdkStatusListen
} }
private void initCommentForm(View root) { private void initCommentForm(View root) {
double amount = Comment.LBC_COST;
String buttonText = getResources().getQuantityString(R.plurals.post_for_credits, amount == 1 ? 1 : 2, Helper.LBC_CURRENCY_FORMAT.format(amount));
buttonPostComment.setText(buttonText);
textCommentLimit.setText(String.format("%d / %d", Helper.getValue(inputComment.getText()).length(), Comment.MAX_LENGTH)); textCommentLimit.setText(String.format("%d / %d", Helper.getValue(inputComment.getText()).length(), Comment.MAX_LENGTH));
buttonClearReplyToComment.setOnClickListener(new View.OnClickListener() { buttonClearReplyToComment.setOnClickListener(new View.OnClickListener() {
@ -387,7 +382,7 @@ public class ChannelCommentsFragment extends Fragment implements SdkStatusListen
return; return;
} }
validateAndCheckPostComment(amount); validateAndCheckPostComment();
} }
}); });
@ -433,7 +428,7 @@ public class ChannelCommentsFragment extends Fragment implements SdkStatusListen
}); });
} }
private void validateAndCheckPostComment(double amount) { private void validateAndCheckPostComment() {
String comment = Helper.getValue(inputComment.getText()); String comment = Helper.getValue(inputComment.getText());
Claim channel = (Claim) commentChannelSpinner.getSelectedItem(); Claim channel = (Claim) commentChannelSpinner.getSelectedItem();
@ -445,29 +440,18 @@ public class ChannelCommentsFragment extends Fragment implements SdkStatusListen
showError(getString(R.string.please_select_channel)); showError(getString(R.string.please_select_channel));
return; return;
} }
if (Lbry.walletBalance == null || amount > Lbry.walletBalance.getAvailable().doubleValue()) {
showError(getString(R.string.insufficient_balance));
return;
}
Context context = getContext(); Context context = getContext();
if (context != null) { if (context != null) {
String titleText = getResources().getQuantityString( String titleText = getResources().getString(R.string.comment_confirm_post);
R.plurals.post_and_tip, String confirmText = getResources().getString(R.string.confirm_post_comment);
amount == 1 ? 1 : 2,
Helper.LBC_CURRENCY_FORMAT.format(amount));
String confirmText = getResources().getQuantityString(
R.plurals.confirm_post_comment,
amount == 1 ? 1 : 2,
Helper.LBC_CURRENCY_FORMAT.format(amount),
claim.getTitleOrName());
AlertDialog.Builder builder = new AlertDialog.Builder(context). AlertDialog.Builder builder = new AlertDialog.Builder(context).
setTitle(titleText). setTitle(titleText).
setMessage(confirmText) setMessage(confirmText)
.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() { .setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialogInterface, int i) { public void onClick(DialogInterface dialogInterface, int i) {
postComment(amount); postComment();
} }
}).setNegativeButton(R.string.no, null); }).setNegativeButton(R.string.no, null);
builder.show(); builder.show();
@ -545,17 +529,15 @@ public class ChannelCommentsFragment extends Fragment implements SdkStatusListen
replyToComment = null; replyToComment = null;
} }
private void postComment(double tipAmount) { private void postComment() {
if (postingComment) { if (postingComment) {
return; return;
} }
Comment comment = buildPostComment(); Comment comment = buildPostComment();
// only use 2 decimal places
BigDecimal amount = new BigDecimal(String.valueOf(tipAmount));
beforePostComment(); beforePostComment();
CommentCreateWithTipTask task = new CommentCreateWithTipTask(comment, amount, progressPostComment, new CommentCreateWithTipTask.CommentCreateWithTipHandler() { CommentCreateTask task = new CommentCreateTask(comment, progressPostComment, new CommentCreateTask.CommentCreateWithTipHandler() {
@Override @Override
public void onSuccess(Comment createdComment) { public void onSuccess(Comment createdComment) {
inputComment.setText(null); inputComment.setText(null);
@ -573,7 +555,6 @@ public class ChannelCommentsFragment extends Fragment implements SdkStatusListen
checkNoComments(); checkNoComments();
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putDouble("amount", amount.doubleValue());
bundle.putString("claim_id", claim != null ? claim.getClaimId() : null); bundle.putString("claim_id", claim != null ? claim.getClaimId() : null);
bundle.putString("claim_name", claim != null ? claim.getName() : null); bundle.putString("claim_name", claim != null ? claim.getName() : null);
LbryAnalytics.logEvent(LbryAnalytics.EVENT_COMMENT_CREATE, bundle); LbryAnalytics.logEvent(LbryAnalytics.EVENT_COMMENT_CREATE, bundle);

View file

@ -123,7 +123,7 @@ import io.lbry.browser.model.WalletBalance;
import io.lbry.browser.model.lbryinc.Reward; import io.lbry.browser.model.lbryinc.Reward;
import io.lbry.browser.model.lbryinc.Subscription; import io.lbry.browser.model.lbryinc.Subscription;
import io.lbry.browser.tasks.BufferEventTask; import io.lbry.browser.tasks.BufferEventTask;
import io.lbry.browser.tasks.CommentCreateWithTipTask; import io.lbry.browser.tasks.CommentCreateTask;
import io.lbry.browser.tasks.CommentListHandler; import io.lbry.browser.tasks.CommentListHandler;
import io.lbry.browser.tasks.CommentListTask; import io.lbry.browser.tasks.CommentListTask;
import io.lbry.browser.tasks.GenericTaskHandler; import io.lbry.browser.tasks.GenericTaskHandler;
@ -2989,9 +2989,6 @@ public class FileViewFragment extends BaseFragment implements
} }
private void initCommentForm(View root) { private void initCommentForm(View root) {
double amount = Comment.LBC_COST;
String buttonText = getResources().getQuantityString(R.plurals.post_for_credits, amount == 1 ? 1 : 2, Helper.LBC_CURRENCY_FORMAT.format(amount));
buttonPostComment.setText(buttonText);
textCommentLimit.setText(String.format("%d / %d", Helper.getValue(inputComment.getText()).length(), Comment.MAX_LENGTH)); textCommentLimit.setText(String.format("%d / %d", Helper.getValue(inputComment.getText()).length(), Comment.MAX_LENGTH));
buttonClearReplyToComment.setOnClickListener(new View.OnClickListener() { buttonClearReplyToComment.setOnClickListener(new View.OnClickListener() {
@ -3009,7 +3006,7 @@ public class FileViewFragment extends BaseFragment implements
return; return;
} }
validateAndCheckPostComment(amount); validateAndCheckPostComment();
} }
}); });
@ -3055,7 +3052,7 @@ public class FileViewFragment extends BaseFragment implements
}); });
} }
private void validateAndCheckPostComment(double amount) { private void validateAndCheckPostComment() {
String comment = Helper.getValue(inputComment.getText()); String comment = Helper.getValue(inputComment.getText());
Claim channel = (Claim) commentChannelSpinner.getSelectedItem(); Claim channel = (Claim) commentChannelSpinner.getSelectedItem();
@ -3067,29 +3064,18 @@ public class FileViewFragment extends BaseFragment implements
showError(getString(R.string.please_select_channel)); showError(getString(R.string.please_select_channel));
return; return;
} }
if (Lbry.walletBalance == null || amount > Lbry.walletBalance.getAvailable().doubleValue()) {
showError(getString(R.string.insufficient_balance));
return;
}
Context context = getContext(); Context context = getContext();
if (context != null) { if (context != null) {
String titleText = getResources().getQuantityString( String titleText = getResources().getString(R.string.comment_confirm_post);
R.plurals.post_and_tip, String confirmText = getResources().getString(R.string.confirm_post_comment);
amount == 1 ? 1 : 2,
Helper.LBC_CURRENCY_FORMAT.format(amount));
String confirmText = getResources().getQuantityString(
R.plurals.confirm_post_comment,
amount == 1 ? 1 : 2,
Helper.LBC_CURRENCY_FORMAT.format(amount),
claim.getTitleOrName());
AlertDialog.Builder builder = new AlertDialog.Builder(context). AlertDialog.Builder builder = new AlertDialog.Builder(context).
setTitle(titleText). setTitle(titleText).
setMessage(confirmText) setMessage(confirmText)
.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() { .setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialogInterface, int i) { public void onClick(DialogInterface dialogInterface, int i) {
postComment(amount); postComment();
} }
}).setNegativeButton(R.string.no, null); }).setNegativeButton(R.string.no, null);
builder.show(); builder.show();
@ -3167,17 +3153,15 @@ public class FileViewFragment extends BaseFragment implements
replyToComment = null; replyToComment = null;
} }
private void postComment(double tipAmount) { private void postComment() {
if (postingComment) { if (postingComment) {
return; return;
} }
Comment comment = buildPostComment(); Comment comment = buildPostComment();
// only use 2 decimal places
BigDecimal amount = new BigDecimal(String.valueOf(tipAmount));
beforePostComment(); beforePostComment();
CommentCreateWithTipTask task = new CommentCreateWithTipTask(comment, amount, progressPostComment, new CommentCreateWithTipTask.CommentCreateWithTipHandler() { CommentCreateTask task = new CommentCreateTask(comment, progressPostComment, new CommentCreateTask.CommentCreateWithTipHandler() {
@Override @Override
public void onSuccess(Comment createdComment) { public void onSuccess(Comment createdComment) {
inputComment.setText(null); inputComment.setText(null);
@ -3195,7 +3179,6 @@ public class FileViewFragment extends BaseFragment implements
checkNoComments(); checkNoComments();
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putDouble("amount", amount.doubleValue());
bundle.putString("claim_id", claim != null ? claim.getClaimId() : null); bundle.putString("claim_id", claim != null ? claim.getClaimId() : null);
bundle.putString("claim_name", claim != null ? claim.getName() : null); bundle.putString("claim_name", claim != null ? claim.getName() : null);
LbryAnalytics.logEvent(LbryAnalytics.EVENT_COMMENT_CREATE, bundle); LbryAnalytics.logEvent(LbryAnalytics.EVENT_COMMENT_CREATE, bundle);

View file

@ -47,22 +47,25 @@
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:orientation="horizontal" android:orientation="horizontal"
android:visibility="gone"> android:visibility="gone">
<View <View
android:id="@+id/comment_form_reply_to_vertical_bar" android:id="@+id/comment_form_reply_to_vertical_bar"
android:layout_width="3dp" android:layout_width="3dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:background="@color/nextLbryGreen"
android:background="@color/nextLbryGreen" /> android:orientation="vertical" />
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp"> android:layout_marginStart="8dp">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:layout_marginEnd="40dp"
android:layout_marginEnd="40dp"> android:orientation="vertical">
<TextView <TextView
android:id="@+id/comment_form_replying_to_text" android:id="@+id/comment_form_replying_to_text"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -77,19 +80,20 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="2dp" android:layout_marginTop="2dp"
android:lineSpacingMultiplier="1.05"
android:fontFamily="@font/inter" android:fontFamily="@font/inter"
android:lineSpacingMultiplier="1.05"
android:textFontWeight="300" android:textFontWeight="300"
android:textSize="14sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/comment_form_clear_reply_to" android:id="@+id/comment_form_clear_reply_to"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:layout_alignParentEnd="true"
android:layout_width="36dp" android:layout_width="36dp"
android:layout_height="36dp"> android:layout_height="36dp"
android:layout_alignParentEnd="true"
android:background="?attr/selectableItemBackground"
android:clickable="true">
<ImageView <ImageView
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
@ -168,12 +172,14 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp"> android:layout_marginTop="8dp">
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/comment_form_post" android:id="@+id/comment_form_post"
android:layout_centerVertical="true"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:fontFamily="@font/inter" /> android:layout_centerVertical="true"
android:fontFamily="@font/inter"
android:text="@string/comment_form_post" />
<ProgressBar <ProgressBar
android:id="@+id/comment_form_post_progress" android:id="@+id/comment_form_post_progress"
android:layout_width="20dp" android:layout_width="20dp"

View file

@ -37,58 +37,66 @@
<LinearLayout <LinearLayout
android:id="@+id/file_view_claim_display_area" android:id="@+id/file_view_claim_display_area"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"
android:visibility="visible"> android:visibility="visible">
<RelativeLayout <RelativeLayout
android:id="@+id/file_view_media_container" android:id="@+id/file_view_media_container"
android:background="@color/mediaContainerBackground"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="246dp"> android:layout_height="246dp"
android:background="@color/mediaContainerBackground">
<RelativeLayout <RelativeLayout
android:id="@+id/file_view_media_meta_container" android:id="@+id/file_view_media_meta_container"
android:clickable="true"
android:foreground="?attr/selectableItemBackground"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:clickable="true"
android:foreground="?attr/selectableItemBackground">
<ImageView <ImageView
android:id="@+id/file_view_thumbnail" android:id="@+id/file_view_thumbnail"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />
<ProgressBar <ProgressBar
android:id="@+id/file_view_main_action_loading" android:id="@+id/file_view_main_action_loading"
android:layout_width="36dp" android:layout_width="36dp"
android:layout_height="36dp" android:layout_height="36dp"
android:layout_centerInParent="true" /> android:layout_centerInParent="true" />
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/file_view_main_action_button" android:id="@+id/file_view_main_action_button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:fontFamily="@font/inter" android:fontFamily="@font/inter"
android:text="@string/play"
android:textSize="14sp" android:textSize="14sp"
android:visibility="invisible" android:visibility="invisible" />
android:text="@string/play" />
<LinearLayout <LinearLayout
android:id="@+id/file_view_fee_container" android:id="@+id/file_view_fee_container"
android:background="@drawable/bg_stream_cost"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_marginTop="4dp" android:layout_marginTop="4dp"
android:layout_marginEnd="4dp" android:layout_marginEnd="4dp"
android:paddingTop="2dp" android:background="@drawable/bg_stream_cost"
android:paddingBottom="2dp" android:orientation="horizontal"
android:paddingStart="6dp" android:paddingStart="6dp"
android:paddingTop="2dp"
android:paddingEnd="7dp" android:paddingEnd="7dp"
android:paddingBottom="2dp"
android:visibility="gone"> android:visibility="gone">
<ImageView <ImageView
android:layout_width="12dp" android:layout_width="12dp"
android:layout_height="12dp" android:layout_height="12dp"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:src="@drawable/ic_credits" /> android:src="@drawable/ic_credits" />
<TextView <TextView
android:id="@+id/file_view_fee" android:id="@+id/file_view_fee"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -97,22 +105,24 @@
android:layout_marginStart="1dp" android:layout_marginStart="1dp"
android:fontFamily="@font/inter" android:fontFamily="@font/inter"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:textSize="14sp" android:textFontWeight="300"
android:textFontWeight="300" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/file_view_exoplayer_container" android:id="@+id/file_view_exoplayer_container"
android:background="@android:color/black"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@android:color/black"
android:visibility="gone"> android:visibility="gone">
<com.google.android.exoplayer2.ui.PlayerView <com.google.android.exoplayer2.ui.PlayerView
android:id="@+id/file_view_exoplayer_view" android:id="@+id/file_view_exoplayer_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
app:controller_layout_id="@layout/exo_playback_control_view"/> app:controller_layout_id="@layout/exo_playback_control_view" />
<ProgressBar <ProgressBar
android:id="@+id/player_buffering_progress" android:id="@+id/player_buffering_progress"
android:layout_width="36dp" android:layout_width="36dp"
@ -123,47 +133,52 @@
<RelativeLayout <RelativeLayout
android:id="@+id/file_view_unsupported_container" android:id="@+id/file_view_unsupported_container"
android:background="@color/mediaContainerBackground"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/mediaContainerBackground"
android:padding="36dp" android:padding="36dp"
android:visibility="gone"> android:visibility="gone">
<ImageView <ImageView
android:id="@+id/file_view_unsupported_gerbil" android:id="@+id/file_view_unsupported_gerbil"
android:src="@drawable/gerbil_happy"
android:layout_width="64dp" android:layout_width="64dp"
android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_height="wrap_content" /> android:src="@drawable/gerbil_happy" />
<LinearLayout <LinearLayout
android:layout_toEndOf="@id/file_view_unsupported_gerbil"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="24dp" android:layout_marginStart="24dp"
android:layout_centerVertical="true"> android:layout_toEndOf="@id/file_view_unsupported_gerbil"
android:orientation="vertical">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:fontFamily="@font/inter" android:fontFamily="@font/inter"
android:text="@string/unsupported_content"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="18sp" android:textSize="18sp" />
android:text="@string/unsupported_content" />
<TextView <TextView
android:id="@+id/file_view_unsupported_text" android:id="@+id/file_view_unsupported_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/inter" android:fontFamily="@font/inter"
android:text="@string/unsupported_content_desc" android:text="@string/unsupported_content_desc"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="14sp"
android:textFontWeight="300" android:textFontWeight="300"
android:layout_width="wrap_content" android:textSize="14sp" />
android:layout_height="wrap_content" />
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/file_view_open_external_button" android:id="@+id/file_view_open_external_button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:fontFamily="@font/inter" android:fontFamily="@font/inter"
android:textSize="14sp" android:text="@string/open"
android:text="@string/open" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>
</RelativeLayout> </RelativeLayout>
@ -173,31 +188,37 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:clipToPadding="false"> android:clipToPadding="false">
<LinearLayout <LinearLayout
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
<include layout="@layout/card_reward_driver" android:orientation="vertical">
android:visibility="gone"
<include
layout="@layout/card_reward_driver"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content"
android:visibility="gone" />
<RelativeLayout <RelativeLayout
android:id="@+id/file_view_title_area" android:id="@+id/file_view_title_area"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:clickable="true"
android:background="?attr/selectableItemBackground" android:background="?attr/selectableItemBackground"
android:paddingTop="8dp" android:clickable="true"
android:paddingBottom="8dp"
android:paddingStart="16dp" android:paddingStart="16dp"
android:paddingEnd="4dp"> android:paddingTop="8dp"
android:paddingEnd="4dp"
android:paddingBottom="8dp">
<LinearLayout <LinearLayout
android:id="@+id/file_view_title_layout" android:id="@+id/file_view_title_layout"
android:orientation="vertical"
android:layout_centerVertical="true"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="48dp"> android:layout_centerVertical="true"
android:layout_marginEnd="48dp"
android:orientation="vertical">
<TextView <TextView
android:id="@+id/file_view_title" android:id="@+id/file_view_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -205,38 +226,41 @@
android:fontFamily="@font/inter" android:fontFamily="@font/inter"
android:textSize="16sp" android:textSize="16sp"
android:textStyle="bold" /> android:textStyle="bold" />
<LinearLayout <LinearLayout
android:layout_marginTop="4dp"
android:orientation="horizontal"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:orientation="horizontal">
<TextView <TextView
android:id="@+id/file_view_view_count" android:id="@+id/file_view_view_count"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:fontFamily="@font/inter" android:fontFamily="@font/inter"
android:textSize="12sp"
android:textFontWeight="300" android:textFontWeight="300"
android:textSize="12sp"
android:visibility="gone" /> android:visibility="gone" />
<TextView <TextView
android:id="@+id/file_view_publish_time" android:id="@+id/file_view_publish_time"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:fontFamily="@font/inter" android:fontFamily="@font/inter"
android:textSize="12sp" android:textFontWeight="300"
android:textFontWeight="300" /> android:textSize="12sp" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<ImageView <ImageView
android:id="@+id/file_view_desc_toggle_arrow" android:id="@+id/file_view_desc_toggle_arrow"
android:src="@drawable/ic_arrow_dropdown"
android:layout_toStartOf="@+id/file_view_title_layout"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_toStartOf="@+id/file_view_title_layout"
android:src="@drawable/ic_arrow_dropdown"
android:tint="@color/foreground" /> android:tint="@color/foreground" />
</RelativeLayout> </RelativeLayout>
@ -246,280 +270,308 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="horizontal"
android:weightSum="5"> android:weightSum="5">
<LinearLayout <LinearLayout
android:id="@+id/file_view_action_share" android:id="@+id/file_view_action_share"
android:clickable="true"
android:background="?attr/selectableItemBackground"
android:layout_weight="1"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="8dp" android:paddingTop="8dp"
android:paddingBottom="8dp"> android:paddingBottom="8dp">
<RelativeLayout <RelativeLayout
android:layout_width="36dp" android:layout_width="36dp"
android:layout_height="36dp" android:layout_height="36dp"
android:layout_gravity="center_horizontal"> android:layout_gravity="center_horizontal">
<ImageView <ImageView
android:tint="@color/foreground"
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:src="@drawable/ic_share" /> android:src="@drawable/ic_share"
android:tint="@color/foreground" />
</RelativeLayout> </RelativeLayout>
<TextView <TextView
android:fontFamily="@font/inter"
android:textSize="12sp"
android:text="@string/share"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" /> android:layout_gravity="center_horizontal"
android:fontFamily="@font/inter"
android:text="@string/share"
android:textSize="12sp" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/file_view_action_tip" android:id="@+id/file_view_action_tip"
android:clickable="true"
android:background="?attr/selectableItemBackground"
android:layout_weight="1"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="8dp" android:paddingTop="8dp"
android:paddingBottom="8dp"> android:paddingBottom="8dp">
<RelativeLayout <RelativeLayout
android:layout_width="36dp" android:layout_width="36dp"
android:layout_height="36dp" android:layout_height="36dp"
android:layout_gravity="center_horizontal"> android:layout_gravity="center_horizontal">
<io.lbry.browser.ui.controls.SolidIconView <io.lbry.browser.ui.controls.SolidIconView
android:textColor="@color/foreground"
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:textSize="20dp" android:text="@string/fa_gift"
android:text="@string/fa_gift"/> android:textColor="@color/foreground"
android:textSize="20dp" />
</RelativeLayout> </RelativeLayout>
<TextView <TextView
android:fontFamily="@font/inter"
android:textSize="12sp"
android:text="@string/support"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" /> android:layout_gravity="center_horizontal"
android:fontFamily="@font/inter"
android:text="@string/support"
android:textSize="12sp" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/file_view_action_repost" android:id="@+id/file_view_action_repost"
android:clickable="true"
android:background="?attr/selectableItemBackground"
android:layout_weight="1"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="8dp" android:paddingTop="8dp"
android:paddingBottom="8dp"> android:paddingBottom="8dp">
<RelativeLayout <RelativeLayout
android:layout_width="36dp" android:layout_width="36dp"
android:layout_height="36dp" android:layout_height="36dp"
android:layout_gravity="center_horizontal"> android:layout_gravity="center_horizontal">
<io.lbry.browser.ui.controls.SolidIconView <io.lbry.browser.ui.controls.SolidIconView
android:textColor="@color/foreground"
android:layout_centerInParent="true"
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
android:layout_centerInParent="true"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:textSize="20dp" android:text="@string/fa_repost"
android:text="@string/fa_repost"/> android:textColor="@color/foreground"
android:textSize="20dp" />
</RelativeLayout> </RelativeLayout>
<TextView <TextView
android:fontFamily="@font/inter"
android:textSize="12sp"
android:text="@string/repost"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" /> android:layout_gravity="center_horizontal"
android:fontFamily="@font/inter"
android:text="@string/repost"
android:textSize="12sp" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/file_view_action_edit" android:id="@+id/file_view_action_edit"
android:clickable="true"
android:background="?attr/selectableItemBackground"
android:layout_weight="1"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="8dp" android:paddingTop="8dp"
android:paddingBottom="8dp" android:paddingBottom="8dp"
android:visibility="gone"> android:visibility="gone">
<RelativeLayout <RelativeLayout
android:layout_width="36dp" android:layout_width="36dp"
android:layout_height="36dp" android:layout_height="36dp"
android:layout_gravity="center_horizontal"> android:layout_gravity="center_horizontal">
<ImageView <ImageView
android:tint="@color/foreground"
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:src="@drawable/ic_edit" /> android:src="@drawable/ic_edit"
android:tint="@color/foreground" />
</RelativeLayout> </RelativeLayout>
<TextView <TextView
android:fontFamily="@font/inter"
android:textSize="12sp"
android:text="@string/edit"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" /> android:layout_gravity="center_horizontal"
android:fontFamily="@font/inter"
android:text="@string/edit"
android:textSize="12sp" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/file_view_action_download" android:id="@+id/file_view_action_download"
android:clickable="true"
android:background="?attr/selectableItemBackground"
android:layout_weight="1"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="8dp" android:paddingTop="8dp"
android:paddingBottom="8dp"> android:paddingBottom="8dp">
<RelativeLayout <RelativeLayout
android:layout_width="36dp" android:layout_width="36dp"
android:layout_height="36dp" android:layout_height="36dp"
android:layout_gravity="center_horizontal"> android:layout_gravity="center_horizontal">
<ProgressBar <ProgressBar
android:id="@+id/file_view_download_progress" android:id="@+id/file_view_download_progress"
style="?android:progressBarStyleHorizontal"
android:layout_width="36dp" android:layout_width="36dp"
android:layout_height="36dp" android:layout_height="36dp"
style="?android:progressBarStyleHorizontal"
android:progressDrawable="@drawable/determinate_progress_circle" android:progressDrawable="@drawable/determinate_progress_circle"
android:visibility="gone" /> android:visibility="gone" />
<ImageView <ImageView
android:id="@+id/file_view_action_download_icon" android:id="@+id/file_view_action_download_icon"
android:tint="@color/foreground"
android:layout_width="20dp" android:layout_width="20dp"
android:layout_height="20dp" android:layout_height="20dp"
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:src="@drawable/ic_download" /> android:src="@drawable/ic_download"
android:tint="@color/foreground" />
</RelativeLayout> </RelativeLayout>
<TextView <TextView
android:fontFamily="@font/inter"
android:textSize="12sp"
android:text="@string/download"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" /> android:layout_gravity="center_horizontal"
android:fontFamily="@font/inter"
android:text="@string/download"
android:textSize="12sp" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/file_view_action_delete" android:id="@+id/file_view_action_delete"
android:clickable="true"
android:background="?attr/selectableItemBackground"
android:layout_weight="1"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="8dp" android:paddingTop="8dp"
android:paddingBottom="8dp" android:paddingBottom="8dp"
android:visibility="gone"> android:visibility="gone">
<RelativeLayout <RelativeLayout
android:layout_width="36dp" android:layout_width="36dp"
android:layout_height="36dp" android:layout_height="36dp"
android:layout_gravity="center_horizontal"> android:layout_gravity="center_horizontal">
<ImageView <ImageView
android:tint="@color/foreground"
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:src="@drawable/ic_delete" /> android:src="@drawable/ic_delete"
android:tint="@color/foreground" />
</RelativeLayout> </RelativeLayout>
<TextView <TextView
android:fontFamily="@font/inter"
android:textSize="12sp"
android:text="@string/delete"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" /> android:layout_gravity="center_horizontal"
android:fontFamily="@font/inter"
android:text="@string/delete"
android:textSize="12sp" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/file_view_action_unpublish" android:id="@+id/file_view_action_unpublish"
android:clickable="true"
android:background="?attr/selectableItemBackground"
android:layout_weight="1"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="8dp" android:paddingTop="8dp"
android:paddingBottom="8dp"> android:paddingBottom="8dp">
<RelativeLayout <RelativeLayout
android:layout_width="36dp" android:layout_width="36dp"
android:layout_height="36dp" android:layout_height="36dp"
android:layout_gravity="center_horizontal"> android:layout_gravity="center_horizontal">
<ImageView <ImageView
android:tint="@color/foreground"
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:src="@drawable/ic_unpublish" /> android:src="@drawable/ic_unpublish"
android:tint="@color/foreground" />
</RelativeLayout> </RelativeLayout>
<TextView <TextView
android:fontFamily="@font/inter"
android:textSize="12sp"
android:text="@string/unpublish"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" /> android:layout_gravity="center_horizontal"
android:fontFamily="@font/inter"
android:text="@string/unpublish"
android:textSize="12sp" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/file_view_action_report" android:id="@+id/file_view_action_report"
android:clickable="true"
android:background="?attr/selectableItemBackground"
android:layout_weight="1"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="8dp" android:paddingTop="8dp"
android:paddingBottom="8dp"> android:paddingBottom="8dp">
<RelativeLayout <RelativeLayout
android:layout_width="36dp" android:layout_width="36dp"
android:layout_height="36dp" android:layout_height="36dp"
android:layout_gravity="center_horizontal"> android:layout_gravity="center_horizontal">
<ImageView <ImageView
android:tint="@color/foreground"
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:src="@drawable/ic_report" /> android:src="@drawable/ic_report"
android:tint="@color/foreground" />
</RelativeLayout> </RelativeLayout>
<TextView <TextView
android:fontFamily="@font/inter"
android:textSize="12sp"
android:text="@string/report"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" /> android:layout_gravity="center_horizontal"
android:fontFamily="@font/inter"
android:text="@string/report"
android:textSize="12sp" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<View <View
android:background="@color/divider"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0.5dp"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:layout_height="0.5dp" /> android:background="@color/divider" />
<RelativeLayout <RelativeLayout
android:id="@+id/file_view_publisher_area" android:id="@+id/file_view_publisher_area"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<LinearLayout <LinearLayout
android:id="@+id/file_view_publisher_info_area" android:id="@+id/file_view_publisher_info_area"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="12dp" android:layout_toStartOf="@id/file_view_publisher_area_actions"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:paddingStart="16dp" android:paddingStart="16dp"
android:paddingBottom="12dp" android:paddingTop="12dp"
android:layout_toStartOf="@id/file_view_publisher_area_actions"> android:paddingBottom="12dp">
<RelativeLayout <RelativeLayout
android:id="@+id/file_view_publisher_avatar" android:id="@+id/file_view_publisher_avatar"
android:layout_width="50dp" android:layout_width="50dp"
@ -527,28 +579,31 @@
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:visibility="gone"> android:visibility="gone">
<RelativeLayout <RelativeLayout
android:layout_centerHorizontal="true"
android:background="@drawable/bg_channel_icon"
android:id="@+id/file_view_publisher_no_thumbnail" android:id="@+id/file_view_publisher_no_thumbnail"
android:layout_width="50dp" android:layout_width="50dp"
android:layout_height="50dp"> android:layout_height="50dp"
android:layout_centerHorizontal="true"
android:background="@drawable/bg_channel_icon">
<TextView <TextView
android:id="@+id/file_view_publisher_thumbnail_alpha" android:id="@+id/file_view_publisher_thumbnail_alpha"
android:layout_centerInParent="true"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:fontFamily="@font/inter" android:fontFamily="@font/inter"
android:textAllCaps="true" android:textAllCaps="true"
android:textSize="24sp"
android:textColor="@color/white" android:textColor="@color/white"
android:textFontWeight="300" /> android:textFontWeight="300"
android:textSize="24sp" />
</RelativeLayout> </RelativeLayout>
<ImageView <ImageView
android:layout_centerHorizontal="true"
android:id="@+id/file_view_publisher_thumbnail" android:id="@+id/file_view_publisher_thumbnail"
android:layout_width="50dp" android:layout_width="50dp"
android:layout_height="50dp" /> android:layout_height="50dp"
android:layout_centerHorizontal="true" />
</RelativeLayout> </RelativeLayout>
<LinearLayout <LinearLayout
@ -557,6 +612,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
android:id="@+id/file_view_publisher_title" android:id="@+id/file_view_publisher_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -565,6 +621,7 @@
android:textFontWeight="300" android:textFontWeight="300"
android:textSize="14sp" android:textSize="14sp"
android:visibility="gone" /> android:visibility="gone" />
<TextView <TextView
android:id="@+id/file_view_publisher_name" android:id="@+id/file_view_publisher_name"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -580,18 +637,20 @@
android:id="@+id/file_view_publisher_area_actions" android:id="@+id/file_view_publisher_area_actions"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="horizontal" android:layout_alignParentEnd="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_alignParentEnd="true"> android:orientation="horizontal">
<LinearLayout <LinearLayout
android:id="@+id/file_view_icon_follow" android:id="@+id/file_view_icon_follow"
android:background="?attr/selectableItemBackground"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="8dp" android:background="?attr/selectableItemBackground"
android:paddingBottom="8dp" android:clickable="true"
android:orientation="horizontal" android:orientation="horizontal"
android:clickable="true"> android:paddingTop="8dp"
android:paddingBottom="8dp">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -599,9 +658,9 @@
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:fontFamily="@font/inter" android:fontFamily="@font/inter"
android:text="@string/follow" android:text="@string/follow"
android:textAllCaps="true"
android:textSize="12sp" android:textSize="12sp"
android:textStyle="bold" android:textStyle="bold" />
android:textAllCaps="true" />
<io.lbry.browser.ui.controls.OutlineIconView <io.lbry.browser.ui.controls.OutlineIconView
android:layout_width="24dp" android:layout_width="24dp"
@ -615,12 +674,12 @@
<io.lbry.browser.ui.controls.SolidIconView <io.lbry.browser.ui.controls.SolidIconView
android:id="@+id/file_view_icon_unfollow" android:id="@+id/file_view_icon_unfollow"
android:clickable="true"
android:background="?attr/selectableItemBackground"
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:text="@string/fa_heart_broken" android:text="@string/fa_heart_broken"
android:textColor="@color/foreground" android:textColor="@color/foreground"
android:textSize="20dp" android:textSize="20dp"
@ -628,23 +687,23 @@
<io.lbry.browser.ui.controls.SolidIconView <io.lbry.browser.ui.controls.SolidIconView
android:id="@+id/file_view_icon_bell" android:id="@+id/file_view_icon_bell"
android:clickable="true"
android:background="?attr/selectableItemBackground"
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:text="@string/fa_bell_slash" android:text="@string/fa_bell_slash"
android:textColor="@color/foreground" android:textColor="@color/foreground"
android:textSize="20dp" android:textSize="20dp"
android:visibility="gone"/> android:visibility="gone" />
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>
<View <View
android:background="@color/divider"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0.5dp"
android:layout_marginBottom="12dp" android:layout_marginBottom="12dp"
android:layout_height="0.5dp" /> android:background="@color/divider" />
<LinearLayout <LinearLayout
android:id="@+id/file_view_description_area" android:id="@+id/file_view_description_area"
@ -702,22 +761,25 @@
<LinearLayout <LinearLayout
android:id="@+id/file_view_related_content_area" android:id="@+id/file_view_related_content_area"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="8dp"> android:layout_marginBottom="8dp"
android:orientation="vertical">
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"> android:layout_marginEnd="16dp">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/related_content" android:layout_centerVertical="true"
android:fontFamily="@font/inter" android:fontFamily="@font/inter"
android:textSize="16sp" android:text="@string/related_content"
android:layout_centerVertical="true" /> android:textSize="16sp" />
<ProgressBar <ProgressBar
android:id="@+id/file_view_related_content_progress" android:id="@+id/file_view_related_content_progress"
android:layout_width="16dp" android:layout_width="16dp"
@ -726,23 +788,25 @@
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:visibility="gone" /> android:visibility="gone" />
</RelativeLayout> </RelativeLayout>
<TextView <TextView
android:id="@+id/file_view_no_related_content" android:id="@+id/file_view_no_related_content"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:fontFamily="@font/inter" android:fontFamily="@font/inter"
android:text="@string/no_related_content" android:text="@string/no_related_content"
android:textSize="14sp"
android:textFontWeight="300" android:textFontWeight="300"
android:textSize="14sp"
android:visibility="gone" /> android:visibility="gone" />
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/file_view_related_content_list" android:id="@+id/file_view_related_content_list"
android:overScrollMode="never"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content"
android:overScrollMode="never" />
</LinearLayout> </LinearLayout>
<View <View
@ -755,14 +819,15 @@
android:id="@+id/file_view_comments_area" android:id="@+id/file_view_comments_area"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:paddingBottom="16dp" android:orientation="vertical"
android:orientation="vertical"> android:paddingBottom="16dp">
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"> android:layout_marginEnd="16dp">
<ProgressBar <ProgressBar
android:id="@+id/file_view_comments_progress" android:id="@+id/file_view_comments_progress"
android:layout_width="16dp" android:layout_width="16dp"
@ -787,8 +852,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:fontFamily="@font/inter" android:fontFamily="@font/inter"
android:text="@string/no_comments" android:text="@string/no_comments"
android:textFontWeight="300" android:textFontWeight="300"

View file

@ -87,23 +87,14 @@
<string name="comment_as">Comment as</string> <string name="comment_as">Comment as</string>
<string name="please_enter_comment">Please enter a comment to post.</string> <string name="please_enter_comment">Please enter a comment to post.</string>
<string name="please_select_channel">Please select a channel to post your comment as.</string> <string name="please_select_channel">Please select a channel to post your comment as.</string>
<string name="comment_form_post">Post</string>
<string name="comment_confirm_post">Confirm your comment</string>
<string name="confirm_post_comment">This will post your comment</string>
<string name="comment_posted">Your comment was successfully posted.</string> <string name="comment_posted">Your comment was successfully posted.</string>
<string name="please_select_repost_channel">Please select a channel to repost on.</string> <string name="please_select_repost_channel">Please select a channel to repost on.</string>
<string name="reply">Reply</string> <string name="reply">Reply</string>
<string name="replying_to">Replying to %1$s</string> <string name="replying_to">Replying to %1$s</string>
<string name="choose_app">Choose app</string> <string name="choose_app">Choose app</string>
<plurals name="post_and_tip">
<item quantity="one">Post and tip %1$s credit?</item>
<item quantity="other">Post and tip %1$s credits?</item>
</plurals>
<plurals name="post_for_credits">
<item quantity="one">Post for %1$s credit</item>
<item quantity="other">Post for %1$s credits</item>
</plurals>
<plurals name="confirm_post_comment">
<item quantity="one">This will post your comment with a tip of %1$s credit for %2$s</item>
<item quantity="other">This will post your comment with a tip of %1$s credits for %2$s</item>
</plurals>
<plurals name="view_count"> <plurals name="view_count">
<item quantity="one">%1$s view</item> <item quantity="one">%1$s view</item>
<item quantity="other">%1$s views</item> <item quantity="other">%1$s views</item>