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 ProgressBar pbHeaders;
|
||||||
|
|
||||||
private BottomNavigationView bnvActions;
|
private BottomNavigationView bnvActions;
|
||||||
|
|
||||||
|
private View vSeparatorBody;
|
||||||
private Button btnImages;
|
private Button btnImages;
|
||||||
private TextView tvBody;
|
private TextView tvBody;
|
||||||
private ProgressBar pbBody;
|
private ProgressBar pbBody;
|
||||||
|
@ -187,6 +189,8 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
|
||||||
pbHeaders = itemView.findViewById(R.id.pbHeaders);
|
pbHeaders = itemView.findViewById(R.id.pbHeaders);
|
||||||
|
|
||||||
bnvActions = itemView.findViewById(R.id.bnvActions);
|
bnvActions = itemView.findViewById(R.id.bnvActions);
|
||||||
|
|
||||||
|
vSeparatorBody = itemView.findViewById(R.id.vSeparatorBody);
|
||||||
btnImages = itemView.findViewById(R.id.btnImages);
|
btnImages = itemView.findViewById(R.id.btnImages);
|
||||||
tvBody = itemView.findViewById(R.id.tvBody);
|
tvBody = itemView.findViewById(R.id.tvBody);
|
||||||
pbBody = itemView.findViewById(R.id.pbBody);
|
pbBody = itemView.findViewById(R.id.pbBody);
|
||||||
|
@ -348,6 +352,7 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
|
||||||
pbHeaders.setVisibility(View.GONE);
|
pbHeaders.setVisibility(View.GONE);
|
||||||
grpHeaders.setVisibility(show_headers && show_expanded ? View.VISIBLE : View.GONE);
|
grpHeaders.setVisibility(show_headers && show_expanded ? View.VISIBLE : View.GONE);
|
||||||
bnvActions.setVisibility(View.GONE);
|
bnvActions.setVisibility(View.GONE);
|
||||||
|
vSeparatorBody.setVisibility(View.GONE);
|
||||||
btnImages.setVisibility(View.GONE);
|
btnImages.setVisibility(View.GONE);
|
||||||
pbBody.setVisibility(View.GONE);
|
pbBody.setVisibility(View.GONE);
|
||||||
grpAttachments.setVisibility(message.attachments > 0 && show_expanded ? View.VISIBLE : 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);
|
tvHeaders.setText(show_headers ? message.headers : null);
|
||||||
|
|
||||||
|
vSeparatorBody.setVisibility(View.VISIBLE);
|
||||||
tvBody.setText(null);
|
tvBody.setText(null);
|
||||||
pbBody.setVisibility(View.VISIBLE);
|
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.getMenu().findItem(R.id.action_reply).setVisible(message.content && !inOutbox);
|
||||||
|
|
||||||
bnvActions.setVisibility(View.VISIBLE);
|
bnvActions.setVisibility(View.VISIBLE);
|
||||||
|
vSeparatorBody.setVisibility(View.GONE);
|
||||||
|
|
||||||
bnvActions.setHasTransientState(false);
|
bnvActions.setHasTransientState(false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -343,7 +343,7 @@
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvTimeEx" />
|
app:layout_constraintTop_toBottomOf="@id/tvTimeEx" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/vSeparatorRawHeaders"
|
android:id="@+id/vSeparatorHeaders"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:layout_marginTop="3dp"
|
android:layout_marginTop="3dp"
|
||||||
|
@ -366,7 +366,7 @@
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@id/vwColor"
|
app:layout_constraintStart_toEndOf="@id/vwColor"
|
||||||
app:layout_constraintTop_toBottomOf="@id/vSeparatorRawHeaders" />
|
app:layout_constraintTop_toBottomOf="@id/vSeparatorHeaders" />
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/pbHeaders"
|
android:id="@+id/pbHeaders"
|
||||||
|
@ -377,7 +377,7 @@
|
||||||
app:layout_constraintBottom_toTopOf="@+id/bnvActions"
|
app:layout_constraintBottom_toTopOf="@+id/bnvActions"
|
||||||
app:layout_constraintEnd_toEndOf="@id/tvHeaders"
|
app:layout_constraintEnd_toEndOf="@id/tvHeaders"
|
||||||
app:layout_constraintStart_toStartOf="@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
|
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||||
android:id="@+id/bnvActions"
|
android:id="@+id/bnvActions"
|
||||||
|
@ -393,6 +393,16 @@
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvHeaders"
|
app:layout_constraintTop_toBottomOf="@id/tvHeaders"
|
||||||
app:menu="@menu/action_message" />
|
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
|
<Button
|
||||||
android:id="@+id/btnImages"
|
android:id="@+id/btnImages"
|
||||||
style="?android:attr/buttonStyleSmall"
|
style="?android:attr/buttonStyleSmall"
|
||||||
|
@ -404,7 +414,7 @@
|
||||||
android:minHeight="0dp"
|
android:minHeight="0dp"
|
||||||
android:text="@string/title_show_images"
|
android:text="@string/title_show_images"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/bnvActions" />
|
app:layout_constraintTop_toBottomOf="@id/vSeparatorBody" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvBody"
|
android:id="@+id/tvBody"
|
||||||
|
@ -470,7 +480,7 @@
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:visibility="visible"
|
android:visibility="visible"
|
||||||
app:constraint_referenced_ids="vSeparatorRawHeaders,tvHeaders" />
|
app:constraint_referenced_ids="vSeparatorHeaders,tvHeaders" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Group
|
<androidx.constraintlayout.widget.Group
|
||||||
android:id="@+id/grpAttachments"
|
android:id="@+id/grpAttachments"
|
||||||
|
@ -484,6 +494,6 @@
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:visibility="visible"
|
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>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
Loading…
Reference in New Issue