Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,6 @@ private void refreshLayout(Configuration newConfig) {
@SuppressLint("LongLogTag")
private void resetAppBar(Configuration newConfig) {
if (appBarLayout != null) {
boolean isLandscape = newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE;

if (mExpandable) {
appBarLayout.setEnabled(true);
appBarLayout.seslSetCustomHeightProportion(false, 0);
Expand Down Expand Up @@ -380,7 +378,7 @@ public void setTitle(CharSequence expandedTitle, CharSequence collapsedTitle) {
public void setSubtitle(CharSequence subtitle) {
mSubtitle = subtitle;
if (mExpandable) {
collapsingToolbarLayout.setSubtitle(subtitle);
collapsingToolbarLayout.seslSetSubtitle(subtitle);
}
collapsedSubTitleView.setText(subtitle);

Expand All @@ -391,6 +389,7 @@ private void updateCollapsedSubtitleVisibility() {
TypedValue outValue = new TypedValue();
getResources().getValue(mIsOneUI4 ? R.dimen.sesl4_appbar_height_proportion : R.dimen.sesl_appbar_height_proportion, outValue, true);
if (!mExpandable || outValue.getFloat() == 0.0) {
appBarLayout.setExpanded(false);
collapsedSubTitleView.setVisibility((mSubtitle != null && mSubtitle.length() != 0) ? VISIBLE : GONE);
} else {
collapsedSubTitleView.setVisibility(GONE);
Expand All @@ -412,6 +411,7 @@ public void setExpanded(boolean expanded) {
setExpanded(expanded, ViewCompat.isLaidOut(appBarLayout));
}

@SuppressLint("LongLogTag")
public void setExpanded(boolean expanded, boolean animate) {
if (mExpandable) {
mExpanded = expanded;
Expand Down Expand Up @@ -537,7 +537,7 @@ public void setSelectModeCount(int count) {

if (mSubtitle != null && mSubtitle.length() != 0) {
if (mExpandable) {
collapsingToolbarLayout.setSubtitle(null);
collapsingToolbarLayout.seslSetSubtitle(null);
}
collapsedSubTitleView.setText(null);
collapsedSubTitleView.setVisibility(GONE);
Expand Down Expand Up @@ -569,7 +569,7 @@ public void showSearchMode() {
if (mExpandable) collapsingToolbarLayout.setTitle(getResources().getString(R.string.action_search));

if (mSubtitle != null && mSubtitle.length() != 0) {
if (mExpandable) collapsingToolbarLayout.setSubtitle(null);
if (mExpandable) collapsingToolbarLayout.seslSetSubtitle(null);
collapsedSubTitleView.setText(null);
collapsedSubTitleView.setVisibility(GONE);
}
Expand Down
Loading