Browse Source

Fixed compose view visibily states

main
M66B 6 years ago
parent
commit
9bb4e9b92d
2 changed files with 9 additions and 4 deletions
  1. +8
    -3
      app/src/main/java/eu/faircode/email/FragmentCompose.java
  2. +1
    -1
      app/src/main/res/layout/fragment_compose.xml

+ 8
- 3
app/src/main/java/eu/faircode/email/FragmentCompose.java View File

@ -111,8 +111,6 @@ public class FragmentCompose extends FragmentEx {
grpCc = view.findViewById(R.id.grpCc);
grpReady = view.findViewById(R.id.grpReady);
grpCc.setVisibility("reply_all".equals(action) ? View.VISIBLE : View.GONE);
// Wire controls
ivIdentityAdd.setOnClickListener(new View.OnClickListener() {
@ -176,6 +174,9 @@ public class FragmentCompose extends FragmentEx {
setHasOptionsMenu(true);
// Initialize
spFrom.setVisibility(View.GONE);
ivIdentityAdd.setVisibility(View.GONE);
grpCc.setVisibility(View.GONE);
grpReady.setVisibility(View.GONE);
pbWait.setVisibility(View.VISIBLE);
bottom_navigation.getMenu().setGroupEnabled(0, false);
@ -203,7 +204,10 @@ public class FragmentCompose extends FragmentEx {
break;
}
// This seems to be necessary to prevent layout freezes
spFrom.setVisibility(View.VISIBLE);
ivIdentityAdd.setVisibility(View.VISIBLE);
// For some reason this is needed to make sure the loader starts
handler.post(new Runnable() {
@Override
public void run() {
@ -421,6 +425,7 @@ public class FragmentCompose extends FragmentEx {
String action = result.getString("action");
pbWait.setVisibility(View.GONE);
grpCc.setVisibility("reply_all".equals(action) ? View.VISIBLE : View.GONE);
grpReady.setVisibility(View.VISIBLE);
FragmentCompose.this.thread = thread;


+ 1
- 1
app/src/main/res/layout/fragment_compose.xml View File

@ -180,5 +180,5 @@
android:id="@+id/grpReady"
android:layout_width="0dp"
android:layout_height="0dp"
app:constraint_referenced_ids="spFrom,ivIdentityAdd,etTo,etSubject,vSeparator,scroll,bottom_navigation" />
app:constraint_referenced_ids="etTo,ivToAdd,etSubject,vSeparator,scroll,bottom_navigation" />
</android.support.constraint.ConstraintLayout>

Loading…
Cancel
Save