Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8012611f authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fix but that avatar overlapping with status bar."

parents e9e0335d 7dd57436
Loading
Loading
Loading
Loading
+20 −0
Original line number Original line Diff line number Diff line
@@ -31,8 +31,10 @@ import android.support.v4.app.FragmentTransaction;
import android.support.v4.content.ContextCompat;
import android.support.v4.content.ContextCompat;
import android.telecom.CallAudioState;
import android.telecom.CallAudioState;
import android.telephony.TelephonyManager;
import android.telephony.TelephonyManager;
import android.transition.TransitionManager;
import android.view.LayoutInflater;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View;
import android.view.View.OnAttachStateChangeListener;
import android.view.View.OnClickListener;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.ViewGroup;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityEvent;
@@ -182,6 +184,24 @@ public class InCallFragment extends Fragment
    View space = view.findViewById(R.id.navigation_bar_background);
    View space = view.findViewById(R.id.navigation_bar_background);
    space.getLayoutParams().height = ViewUtil.getNavigationBarHeight(getContext());
    space.getLayoutParams().height = ViewUtil.getNavigationBarHeight(getContext());


    // Workaround to adjust padding for status bar and navigation bar since fitsSystemWindows
    // doesn't work well when switching with other fragments.
    view.addOnAttachStateChangeListener(
        new OnAttachStateChangeListener() {
          @Override
          public void onViewAttachedToWindow(View v) {
            View container = v.findViewById(R.id.incall_ui_container);
            int topInset = v.getRootWindowInsets().getSystemWindowInsetTop();
            int bottomInset = v.getRootWindowInsets().getSystemWindowInsetBottom();
            if (topInset != container.getPaddingTop()) {
              TransitionManager.beginDelayedTransition(((ViewGroup) container.getParent()));
              container.setPadding(0, topInset, 0, bottomInset);
            }
          }

          @Override
          public void onViewDetachedFromWindow(View v) {}
        });
    return view;
    return view;
  }
  }


+1 −0
Original line number Original line Diff line number Diff line
@@ -22,6 +22,7 @@
    android:layout_height="match_parent">
    android:layout_height="match_parent">


  <RelativeLayout
  <RelativeLayout
      android:id="@+id/incall_ui_container"
      android:layout_width="match_parent"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_height="match_parent"
      android:clipChildren="false"
      android:clipChildren="false"