mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 04:35:57 +00:00
Simplified showing operations
This commit is contained in:
parent
30ae325ec4
commit
5ace4072c3
2 changed files with 21 additions and 33 deletions
|
@ -56,7 +56,6 @@ public class AdapterOperation extends RecyclerView.Adapter<AdapterOperation.View
|
|||
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener, View.OnLongClickListener {
|
||||
private View itemView;
|
||||
private TextView tvFolder;
|
||||
private TextView tvMessage;
|
||||
private TextView tvOperation;
|
||||
private TextView tvTime;
|
||||
private TextView tvError;
|
||||
|
@ -66,7 +65,6 @@ public class AdapterOperation extends RecyclerView.Adapter<AdapterOperation.View
|
|||
|
||||
this.itemView = itemView.findViewById(R.id.clItem);
|
||||
tvFolder = itemView.findViewById(R.id.tvFolder);
|
||||
tvMessage = itemView.findViewById(R.id.tvMessage);
|
||||
tvOperation = itemView.findViewById(R.id.tvOperation);
|
||||
tvTime = itemView.findViewById(R.id.tvTime);
|
||||
tvError = itemView.findViewById(R.id.tvError);
|
||||
|
@ -101,7 +99,6 @@ public class AdapterOperation extends RecyclerView.Adapter<AdapterOperation.View
|
|||
(operation.accountName == null ? "" : operation.accountName + "/") + operation.folderName;
|
||||
|
||||
tvFolder.setText(folderName);
|
||||
tvMessage.setText(operation.message == null ? null : Long.toString(operation.message));
|
||||
tvOperation.setText(sb.toString());
|
||||
tvTime.setText(DateUtils.getRelativeTimeSpanString(context, operation.created));
|
||||
tvError.setText(operation.error);
|
||||
|
|
|
@ -9,73 +9,64 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
android:paddingStart="6dp"
|
||||
android:paddingTop="3dp"
|
||||
android:paddingEnd="6dp"
|
||||
android:paddingBottom="3dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvFolder"
|
||||
android:layout_width="120dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="middle"
|
||||
android:singleLine="true"
|
||||
android:text="Folder"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvMessage"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:gravity="end"
|
||||
android:text="1234567"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintStart_toEndOf="@id/tvFolder"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_default="percent"
|
||||
app:layout_constraintWidth_percent=".40" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvOperation"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:ellipsize="middle"
|
||||
android:ellipsize="end"
|
||||
android:paddingStart="6dp"
|
||||
android:singleLine="true"
|
||||
android:text="Name"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tvTime"
|
||||
app:layout_constraintStart_toEndOf="@id/tvMessage"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintStart_toEndOf="@id/tvFolder"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_default="percent"
|
||||
app:layout_constraintWidth_percent=".40" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:ellipsize="start"
|
||||
android:gravity="end"
|
||||
android:paddingStart="6dp"
|
||||
android:singleLine="true"
|
||||
android:text="Time"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/barrier"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:barrierDirection="bottom"
|
||||
app:constraint_referenced_ids="tvFolder,tvMessage,tvOperation,tvTime" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_default="percent"
|
||||
app:layout_constraintWidth_percent=".20" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvError"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:text="error"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textColor="?attr/colorWarning"
|
||||
android:textIsSelectable="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/barrier" />
|
||||
app:layout_constraintTop_toBottomOf="@id/tvFolder" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</FrameLayout>
|
Loading…
Reference in a new issue