[Sound panel] Update Ui layout to match with mertial next

please check bug for before/after screenshot.

Bug: 191317779
Test: verified on device
Change-Id: Ia570dde71ce9f18376eaba48102cecde6adb85bb
This commit is contained in:
shaoweishen
2021-09-28 14:04:06 +00:00
parent 4f2a6225c9
commit fb164fe128
12 changed files with 116 additions and 123 deletions

View File

@@ -100,10 +100,8 @@ public class PanelFragment extends Fragment {
private TextView mHeaderTitle;
private TextView mHeaderSubtitle;
private int mMaxHeight;
private View mFooterDivider;
private boolean mPanelCreating;
private ProgressBar mProgressBar;
private View mHeaderDivider;
private final Map<Uri, LiveData<Slice>> mSliceLiveData = new LinkedHashMap<>();
@@ -210,9 +208,7 @@ public class PanelFragment extends Fragment {
mHeaderLayout = mLayoutView.findViewById(R.id.header_layout);
mHeaderTitle = mLayoutView.findViewById(R.id.header_title);
mHeaderSubtitle = mLayoutView.findViewById(R.id.header_subtitle);
mFooterDivider = mLayoutView.findViewById(R.id.footer_divider);
mProgressBar = mLayoutView.findViewById(R.id.progress_bar);
mHeaderDivider = mLayoutView.findViewById(R.id.header_divider);
// Make the panel layout gone here, to avoid janky animation when updating from old panel.
// We will make it visible once the panel is ready to load.
@@ -257,8 +253,6 @@ public class PanelFragment extends Fragment {
enableTitle(title);
}
mFooterDivider.setVisibility(View.GONE);
mSeeMoreButton.setOnClickListener(getSeeMoreListener());
mDoneButton.setOnClickListener(getCloseListener());
@@ -324,10 +318,8 @@ public class PanelFragment extends Fragment {
private void updateProgressBar() {
if (mPanel.isProgressBarVisible()) {
mProgressBar.setVisibility(View.VISIBLE);
mHeaderDivider.setVisibility(View.GONE);
} else {
mProgressBar.setVisibility(View.GONE);
mHeaderDivider.setVisibility(View.VISIBLE);
}
}