mirror of https://github.com/M66B/FairEmail.git
Hide action bar for outbox messages
This commit is contained in:
parent
3c7c3df8d2
commit
bc46be4ac6
|
@ -144,6 +144,8 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
|
|||
private ProgressBar pbHeaders;
|
||||
|
||||
private BottomNavigationView bnvActions;
|
||||
|
||||
private View vSeparatorBody;
|
||||
private Button btnImages;
|
||||
private TextView tvBody;
|
||||
private ProgressBar pbBody;
|
||||
|
@ -187,6 +189,8 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
|
|||
pbHeaders = itemView.findViewById(R.id.pbHeaders);
|
||||
|
||||
bnvActions = itemView.findViewById(R.id.bnvActions);
|
||||
|
||||
vSeparatorBody = itemView.findViewById(R.id.vSeparatorBody);
|
||||
btnImages = itemView.findViewById(R.id.btnImages);
|
||||
tvBody = itemView.findViewById(R.id.tvBody);
|
||||
pbBody = itemView.findViewById(R.id.pbBody);
|
||||
|
@ -348,6 +352,7 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
|
|||
pbHeaders.setVisibility(View.GONE);
|
||||
grpHeaders.setVisibility(show_headers && show_expanded ? View.VISIBLE : View.GONE);
|
||||
bnvActions.setVisibility(View.GONE);
|
||||
vSeparatorBody.setVisibility(View.GONE);
|
||||
btnImages.setVisibility(View.GONE);
|
||||
pbBody.setVisibility(View.GONE);
|
||||
grpAttachments.setVisibility(message.attachments > 0 && show_expanded ? View.VISIBLE : View.GONE);
|
||||
|
@ -377,6 +382,7 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
|
|||
|
||||
tvHeaders.setText(show_headers ? message.headers : null);
|
||||
|
||||
vSeparatorBody.setVisibility(View.VISIBLE);
|
||||
tvBody.setText(null);
|
||||
pbBody.setVisibility(View.VISIBLE);
|
||||
|
||||
|
@ -422,6 +428,7 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
|
|||
bnvActions.getMenu().findItem(R.id.action_reply).setVisible(message.content && !inOutbox);
|
||||
|
||||
bnvActions.setVisibility(View.VISIBLE);
|
||||
vSeparatorBody.setVisibility(View.GONE);
|
||||
|
||||
bnvActions.setHasTransientState(false);
|
||||
}
|
||||
|
|
|
@ -343,7 +343,7 @@
|
|||
app:layout_constraintTop_toBottomOf="@id/tvTimeEx" />
|
||||
|
||||
<View
|
||||
android:id="@+id/vSeparatorRawHeaders"
|
||||
android:id="@+id/vSeparatorHeaders"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="3dp"
|
||||
|
@ -366,7 +366,7 @@
|
|||
android:textSize="12sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/vwColor"
|
||||
app:layout_constraintTop_toBottomOf="@id/vSeparatorRawHeaders" />
|
||||
app:layout_constraintTop_toBottomOf="@id/vSeparatorHeaders" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pbHeaders"
|
||||
|
@ -377,7 +377,7 @@
|
|||
app:layout_constraintBottom_toTopOf="@+id/bnvActions"
|
||||
app:layout_constraintEnd_toEndOf="@id/tvHeaders"
|
||||
app:layout_constraintStart_toStartOf="@id/tvHeaders"
|
||||
app:layout_constraintTop_toBottomOf="@id/vSeparatorRawHeaders" />
|
||||
app:layout_constraintTop_toBottomOf="@id/vSeparatorHeaders" />
|
||||
|
||||
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||
android:id="@+id/bnvActions"
|
||||
|
@ -393,6 +393,16 @@
|
|||
app:layout_constraintTop_toBottomOf="@id/tvHeaders"
|
||||
app:menu="@menu/action_message" />
|
||||
|
||||
<View
|
||||
android:id="@+id/vSeparatorBody"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:background="?attr/colorSeparator"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/vwColor"
|
||||
app:layout_constraintTop_toBottomOf="@id/bnvActions" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnImages"
|
||||
style="?android:attr/buttonStyleSmall"
|
||||
|
@ -404,7 +414,7 @@
|
|||
android:minHeight="0dp"
|
||||
android:text="@string/title_show_images"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/bnvActions" />
|
||||
app:layout_constraintTop_toBottomOf="@id/vSeparatorBody" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvBody"
|
||||
|
@ -470,7 +480,7 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="visible"
|
||||
app:constraint_referenced_ids="vSeparatorRawHeaders,tvHeaders" />
|
||||
app:constraint_referenced_ids="vSeparatorHeaders,tvHeaders" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/grpAttachments"
|
||||
|
@ -484,6 +494,6 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="visible"
|
||||
app:constraint_referenced_ids="ivAddContact,vSeparatorAddress,tvFromExTitle,tvFromEx,tvToTitle,tvTo,tvReplyToTitle,tvReplyTo,tvCcTitle,tvCc,tvBccTitle,tvBcc,tvTimeEx,tvSubjectEx,bnvActions,tvBody,bottom_navigation" />
|
||||
app:constraint_referenced_ids="ivAddContact,vSeparatorAddress,tvFromExTitle,tvFromEx,tvToTitle,tvTo,tvReplyToTitle,tvReplyTo,tvCcTitle,tvCc,tvBccTitle,tvBcc,tvTimeEx,tvSubjectEx,tvBody" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</FrameLayout>
|
Loading…
Reference in New Issue