some tests
This commit is contained in:
parent
250aa03e9a
commit
a02b8b79c1
|
@ -67,6 +67,9 @@ import es.dmoral.toasty.Toasty;
|
|||
|
||||
import static app.fedilab.fedilabtube.client.RetrofitPeertubeAPI.ActionType.MUTE;
|
||||
import static app.fedilab.fedilabtube.client.RetrofitPeertubeAPI.ActionType.REPLY;
|
||||
import static app.fedilab.fedilabtube.helper.CommentDecorationHelper.allDecoration;
|
||||
import static app.fedilab.fedilabtube.helper.CommentDecorationHelper.hideDecoration;
|
||||
import static app.fedilab.fedilabtube.helper.CommentDecorationHelper.topDecorationOnly;
|
||||
|
||||
|
||||
public class CommentListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||
|
@ -108,6 +111,7 @@ public class CommentListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHo
|
|||
return new ViewHolder(itemBinding);
|
||||
}
|
||||
|
||||
|
||||
@SuppressLint({"SetJavaScriptEnabled", "ClickableViewAccessibility"})
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull final RecyclerView.ViewHolder viewHolder, int i) {
|
||||
|
@ -123,21 +127,21 @@ public class CommentListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHo
|
|||
return;
|
||||
holder.binding.mainContainer.setTag(i);
|
||||
|
||||
ConstraintLayout.LayoutParams params = new ConstraintLayout.LayoutParams(
|
||||
(int) Helper.convertDpToPixel(40, context),
|
||||
(int) Helper.convertDpToPixel(40, context)
|
||||
);
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams((int) Helper.convertDpToPixel(20, context), LinearLayout.LayoutParams.MATCH_PARENT);
|
||||
if (comment.isReply()) {
|
||||
int ident = CommentDecorationHelper.getIndentation(comment.getInReplyToCommentId(), comments);
|
||||
holder.binding.decorationCurved.setVisibility(View.VISIBLE);
|
||||
holder.binding.decorationCurvedLine.setVisibility(View.VISIBLE);
|
||||
params.setMargins((int) Helper.convertDpToPixel(ident * 10, context), 0, 0, 0);
|
||||
|
||||
if (CommentDecorationHelper.hasReplies(comment.getId(), comments)) {
|
||||
allDecoration(holder.binding);
|
||||
} else {
|
||||
topDecorationOnly(holder.binding);
|
||||
}
|
||||
params.setMargins((int) Helper.convertDpToPixel(ident * 20, context), 0, 0, 0);
|
||||
} else {
|
||||
holder.binding.decorationCurved.setVisibility(View.GONE);
|
||||
holder.binding.decorationCurvedLine.setVisibility(View.GONE);
|
||||
hideDecoration(holder.binding);
|
||||
params.setMargins(0, 0, 0, 0);
|
||||
}
|
||||
holder.binding.commentAccountProfile.setLayoutParams(params);
|
||||
holder.binding.decorationContainer.setLayoutParams(params);
|
||||
holder.binding.moreActions.setOnClickListener(view -> {
|
||||
PopupMenu popup = new PopupMenu(context, holder.binding.moreActions);
|
||||
popup.getMenuInflater()
|
||||
|
|
|
@ -14,9 +14,12 @@ package app.fedilab.fedilabtube.helper;
|
|||
* You should have received a copy of the GNU General Public License along with TubeLab; if not,
|
||||
* see <http://www.gnu.org/licenses>. */
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import app.fedilab.fedilabtube.client.data.CommentData;
|
||||
import app.fedilab.fedilabtube.databinding.DrawerCommentBinding;
|
||||
|
||||
public class CommentDecorationHelper {
|
||||
|
||||
|
@ -40,4 +43,37 @@ public class CommentDecorationHelper {
|
|||
return Math.min(currentIdentation, 5);
|
||||
}
|
||||
}
|
||||
|
||||
public static void topDecorationOnly(DrawerCommentBinding binding) {
|
||||
binding.decorationTop.setVisibility(View.VISIBLE);
|
||||
binding.decorationCurvedTop.setVisibility(View.VISIBLE);
|
||||
binding.decorationCurvedBottom.setVisibility(View.GONE);
|
||||
binding.decorationCurvedLine.setVisibility(View.VISIBLE);
|
||||
binding.decorationBottom.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
public static void allDecoration(DrawerCommentBinding binding) {
|
||||
binding.decorationTop.setVisibility(View.VISIBLE);
|
||||
binding.decorationCurvedTop.setVisibility(View.VISIBLE);
|
||||
binding.decorationCurvedBottom.setVisibility(View.VISIBLE);
|
||||
binding.decorationCurvedLine.setVisibility(View.VISIBLE);
|
||||
binding.decorationBottom.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
public static void hideDecoration(DrawerCommentBinding binding) {
|
||||
binding.decorationTop.setVisibility(View.GONE);
|
||||
binding.decorationCurvedTop.setVisibility(View.GONE);
|
||||
binding.decorationCurvedBottom.setVisibility(View.GONE);
|
||||
binding.decorationCurvedLine.setVisibility(View.GONE);
|
||||
binding.decorationBottom.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
public static boolean hasReplies(String commentId, List<CommentData.Comment> comments) {
|
||||
for (CommentData.Comment comment : comments) {
|
||||
if (comment.getInReplyToCommentId() != null && commentId.compareTo(comment.getInReplyToCommentId()) == 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,63 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<size
|
||||
android:width="60dp"
|
||||
android:height="60dp" />
|
||||
<corners android:bottomLeftRadius="60dp" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="@color/colorAccent" />
|
||||
</shape>
|
||||
</item>
|
||||
<item
|
||||
android:right="1dp"
|
||||
android:top="-59dp">
|
||||
<shape android:shape="line">
|
||||
<size
|
||||
android:width="60dp"
|
||||
android:height="1dp" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="?attr/backgroundColor" />
|
||||
</shape>
|
||||
</item>
|
||||
<item
|
||||
android:right="-60dp"
|
||||
android:top="-60dp">
|
||||
<rotate
|
||||
android:fromDegrees="90"
|
||||
android:pivotX="50%"
|
||||
android:pivotY="50%"
|
||||
android:toDegrees="-90">
|
||||
<shape android:shape="line">
|
||||
<size
|
||||
android:width="60dp"
|
||||
android:height="1dp" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="?attr/backgroundColor" />
|
||||
</shape>
|
||||
</rotate>
|
||||
</item>
|
||||
<item>
|
||||
<clip>
|
||||
<rotate
|
||||
android:fromDegrees="90"
|
||||
android:pivotX="50%"
|
||||
android:pivotY="50%"
|
||||
android:toDegrees="-90">
|
||||
<shape android:shape="line">
|
||||
<size
|
||||
android:width="60dp"
|
||||
android:height="1dp" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="?attr/backgroundColor" />
|
||||
</shape>
|
||||
</rotate>
|
||||
</clip>
|
||||
</item>
|
||||
</layer-list>
|
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<rotate
|
||||
android:fromDegrees="180"
|
||||
android:pivotX="50%"
|
||||
android:pivotY="50%"
|
||||
android:toDegrees="270">
|
||||
<shape android:shape="rectangle">
|
||||
<size
|
||||
android:width="30dp"
|
||||
android:height="30dp" />
|
||||
<solid android:color="@color/colorAccent" />
|
||||
<corners android:bottomLeftRadius="30dp" />
|
||||
</shape>
|
||||
</rotate>
|
||||
|
||||
</item>
|
||||
<item
|
||||
android:right="1.5dp"
|
||||
android:top="1.5dp">
|
||||
<rotate
|
||||
android:fromDegrees="180"
|
||||
android:pivotX="50%"
|
||||
android:pivotY="50%"
|
||||
android:toDegrees="270">
|
||||
<shape android:shape="rectangle">
|
||||
<size
|
||||
android:width="30dp"
|
||||
android:height="30dp" />
|
||||
<solid android:color="?attr/backgroundView" />
|
||||
<corners android:bottomLeftRadius="30dp" />
|
||||
</shape>
|
||||
</rotate>
|
||||
</item>
|
||||
|
||||
</layer-list>
|
|
@ -11,8 +11,8 @@
|
|||
</shape>
|
||||
</item>
|
||||
<item
|
||||
android:bottom="1dp"
|
||||
android:left="1dp">
|
||||
android:bottom="1.5dp"
|
||||
android:left="1.5dp">
|
||||
<shape android:shape="rectangle">
|
||||
<size
|
||||
android:width="30dp"
|
|
@ -125,7 +125,8 @@
|
|||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="horizontal"
|
||||
tools:ignore="UseCompoundDrawables">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/peertube_title"
|
||||
|
@ -325,7 +326,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<LinearLayout
|
||||
android:layout_margin="10dp"
|
||||
android:id="@+id/main_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -349,165 +349,8 @@
|
|||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:background="?android:colorBackground"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:id="@+id/post_comment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<LinearLayout
|
||||
android:layout_margin="10dp"
|
||||
android:id="@+id/post_main_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:divider="?android:dividerHorizontal"
|
||||
android:orientation="vertical"
|
||||
android:showDividers="end">
|
||||
|
||||
<ImageView
|
||||
android:layout_margin="5dp"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:id="@+id/close_post"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:contentDescription="@string/close"
|
||||
android:src="@drawable/ic_baseline_close_24" />
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/reply_content"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<ImageView
|
||||
android:id="@+id/comment_account_profile"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:contentDescription="@string/profile_picture"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/comment_account_displayname"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:singleLine="true"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toStartOf="@+id/comment_date"
|
||||
app:layout_constraintStart_toEndOf="@+id/comment_account_profile"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/comment_account_username"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintStart_toEndOf="@+id/comment_account_profile"
|
||||
app:layout_constraintTop_toBottomOf="@+id/comment_account_displayname" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/comment_date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_weight="0"
|
||||
android:gravity="end"
|
||||
android:maxLines="1"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/comment_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textIsSelectable="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/comment_account_profile" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/write_comment_container"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<View
|
||||
android:id="@+id/separator_top"
|
||||
android:layout_margin="5dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/write_container"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="@android:color/darker_gray"/>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
app:layout_constraintTop_toBottomOf="@+id/separator_top"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/separator_bottom"
|
||||
android:id="@+id/write_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<ImageView
|
||||
android:id="@+id/my_pp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:contentDescription="@string/profile_picture" />
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/text_field_boxes"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/my_pp"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/add_comment_write"
|
||||
android:gravity="top"
|
||||
android:inputType="textMultiLine"
|
||||
android:hint="@string/add_public_reply"
|
||||
android:minLines="4"
|
||||
android:maxLines="8"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
<Button
|
||||
app:layout_constraintTop_toBottomOf="@+id/text_field_boxes"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
style="@style/Widget.AppCompat.Button.Borderless.Colored"
|
||||
android:id="@+id/send"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/send_comment"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/separator_bottom"
|
||||
android:layout_margin="5dp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/write_container"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="@android:color/darker_gray"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<!-- View where the video will be shown when video goes fullscreen -->
|
||||
|
@ -532,13 +375,181 @@
|
|||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_gravity="center"
|
||||
android:id="@+id/main_options_video"
|
||||
android:layout_margin="30dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="30dp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/post_comment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?android:colorBackground"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/post_main_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:divider="?android:dividerHorizontal"
|
||||
android:orientation="vertical"
|
||||
android:showDividers="end">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close_post"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:layout_margin="5dp"
|
||||
android:contentDescription="@string/close"
|
||||
android:src="@drawable/ic_baseline_close_24" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/reply_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/comment_account_profile"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:contentDescription="@string/profile_picture"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/comment_account_displayname"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:singleLine="true"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toStartOf="@+id/comment_date"
|
||||
app:layout_constraintStart_toEndOf="@+id/comment_account_profile"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/comment_account_username"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintStart_toEndOf="@+id/comment_account_profile"
|
||||
app:layout_constraintTop_toBottomOf="@+id/comment_account_displayname" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/comment_date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_weight="0"
|
||||
android:gravity="end"
|
||||
android:maxLines="1"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/comment_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textIsSelectable="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/comment_account_profile" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/write_comment_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp">
|
||||
|
||||
<View
|
||||
android:id="@+id/separator_top"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:layout_margin="5dp"
|
||||
android:background="@android:color/darker_gray"
|
||||
app:layout_constraintBottom_toTopOf="@+id/write_container"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/write_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toTopOf="@+id/separator_bottom"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/separator_top">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/my_pp"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:contentDescription="@string/profile_picture"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/text_field_boxes"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/my_pp"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/add_comment_write"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="top"
|
||||
android:hint="@string/add_public_reply"
|
||||
android:inputType="textMultiLine"
|
||||
android:maxLines="8"
|
||||
android:minLines="4" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/send"
|
||||
style="@style/Widget.AppCompat.Button.Borderless.Colored"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/send_comment"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/text_field_boxes" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/separator_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:layout_margin="5dp"
|
||||
android:background="@android:color/darker_gray"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/write_container" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/video_params_submenu"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -20,54 +20,84 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:divider="?android:dividerHorizontal"
|
||||
android:orientation="vertical"
|
||||
android:orientation="horizontal"
|
||||
android:clickable="true"
|
||||
android:showDividers="end"
|
||||
android:focusable="true">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:id="@+id/decoration_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/decoration_middle"
|
||||
android:visibility="gone"
|
||||
android:layout_width="2dp"
|
||||
android:id="@+id/decoration_top"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="?attr/colorAccent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/decoration_curved"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/decoration_curved"
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:background="@drawable/rounded_decoration_2"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:id="@+id/decoration_curved_top"
|
||||
android:layout_width="11dp"
|
||||
android:layout_height="10dp"
|
||||
android:background="@drawable/rounded_decoration_top"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/decoration_extension"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/colorAccent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/decoration_curved_bottom"
|
||||
app:layout_constraintStart_toEndOf="@+id/decoration_curved_top"
|
||||
app:layout_constraintTop_toTopOf="@+id/decoration_curved_bottom" />
|
||||
|
||||
<View
|
||||
android:id="@+id/decoration_curved_bottom"
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:layout_marginTop="17dp"
|
||||
android:background="@drawable/rounded_decoration_bottom"
|
||||
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/decoration_curved_line"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/colorAccent"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/decoration_curved"
|
||||
app:layout_constraintEnd_toStartOf="@+id/comment_account_profile"
|
||||
app:layout_constraintStart_toEndOf="@+id/decoration_curved" />
|
||||
app:layout_constraintBottom_toBottomOf="@+id/decoration_curved_top"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/decoration_curved_top" />
|
||||
|
||||
<View
|
||||
android:id="@+id/decoration_long"
|
||||
android:layout_width="2dp"
|
||||
android:id="@+id/decoration_bottom"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="8.5dp"
|
||||
android:background="?attr/colorAccent"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/decoration_curved_bottom"
|
||||
app:layout_constraintTop_toBottomOf="@+id/decoration_curved_bottom" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/sub_comment_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
app:layout_constraintStart_toEndOf="@+id/decoration_container"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/comment_account_profile"
|
||||
|
@ -75,9 +105,8 @@
|
|||
android:layout_height="40dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:src="@drawable/missing_peertube"
|
||||
android:layout_marginStart="10dp"
|
||||
android:contentDescription="@string/profile_picture"
|
||||
app:layout_constraintStart_toStartOf="@id/decoration_long"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
|
@ -172,4 +201,5 @@
|
|||
app:layout_constraintTop_toBottomOf="@+id/comment_content" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<item name="android:textColor">?attr/colorOnBackground</item>
|
||||
<item name="backgroundView">@color/backgroundDark</item>
|
||||
<item name="android:windowBackground">@android:color/black</item>
|
||||
<item name="android:colorBackground">@android:color/black</item>
|
||||
</style>
|
||||
|
||||
<style name="AppThemeNoActionBar" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||
|
@ -18,6 +20,8 @@
|
|||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<item name="backgroundView">@color/backgroundDark</item>
|
||||
<item name="android:textColor">?attr/colorOnBackground</item>
|
||||
<item name="android:windowBackground">@android:color/black</item>
|
||||
<item name="android:colorBackground">@android:color/black</item>
|
||||
</style>
|
||||
|
||||
<style name="theme" parent="@style/ThemeOverlay.AppCompat.Dark" />
|
||||
|
|
Loading…
Reference in New Issue