1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-26 09:47:13 +00:00

Improved layout

This commit is contained in:
M66B 2018-08-21 13:38:47 +00:00
parent e4b5d4fbbf
commit ede8a4e563
2 changed files with 8 additions and 4 deletions

View file

@ -214,6 +214,7 @@ public class FragmentMessage extends FragmentEx {
grpHeader.setVisibility(free ? View.GONE : View.VISIBLE);
grpAddresses.setVisibility(View.GONE);
grpAttachments.setVisibility(View.GONE);
top_navigation.setVisibility(View.GONE);
tvCount.setVisibility(View.GONE);
tvError.setVisibility(View.GONE);
fab.setVisibility(View.GONE);
@ -229,6 +230,7 @@ public class FragmentMessage extends FragmentEx {
grpHeader.setVisibility(free ? View.GONE : View.VISIBLE);
grpAddresses.setVisibility((int) tvCc.getTag());
rvAttachment.setVisibility((int) rvAttachment.getTag());
top_navigation.setVisibility(View.VISIBLE);
tvCount.setVisibility((int) tvCount.getTag());
tvError.setVisibility((int) tvError.getTag());
fab.setVisibility(View.VISIBLE);
@ -266,7 +268,9 @@ public class FragmentMessage extends FragmentEx {
grpHeader.setVisibility(View.GONE);
grpAddresses.setVisibility(View.GONE);
grpAttachments.setVisibility(View.GONE);
top_navigation.setVisibility(View.GONE);
grpMessage.setVisibility(View.GONE);
bottom_navigation.setVisibility(View.GONE);
tvCount.setVisibility(View.GONE);
tvError.setVisibility(View.GONE);
fab.setVisibility(View.GONE);
@ -354,6 +358,8 @@ public class FragmentMessage extends FragmentEx {
@Override
protected void onLoaded(Bundle args, Spanned body) {
tvBody.setText(body);
grpMessage.setVisibility(View.VISIBLE);
fab.setVisibility(View.VISIBLE);
}
}.load(FragmentMessage.this, args);
@ -416,10 +422,8 @@ public class FragmentMessage extends FragmentEx {
grpHeader.setVisibility(free ? View.GONE : View.VISIBLE);
if (free)
grpAddresses.setVisibility(View.GONE);
grpMessage.setVisibility(View.VISIBLE);
tvCount.setVisibility(!free && message.count > 1 ? View.VISIBLE : View.GONE);
tvError.setVisibility(free || message.error == null ? View.GONE : View.VISIBLE);
fab.setVisibility(free ? View.GONE : View.VISIBLE);
}
}
});

View file

@ -274,7 +274,7 @@
android:id="@+id/grpHeader"
android:layout_width="0dp"
android:layout_height="0dp"
app:constraint_referenced_ids="tvFrom,tvToTitle,tvTo,tvTime,tvSubject,top_navigation" />
app:constraint_referenced_ids="tvFrom,tvToTitle,tvTo,tvTime,tvSubject" />
<androidx.constraintlayout.widget.Group
android:id="@+id/grpAddresses"
@ -292,5 +292,5 @@
android:id="@+id/grpMessage"
android:layout_width="0dp"
android:layout_height="0dp"
app:constraint_referenced_ids="scroll,bottom_navigation" />
app:constraint_referenced_ids="scroll" />
</androidx.constraintlayout.widget.ConstraintLayout>