fix notifications crashing with collapse button
closes sk22#410
This commit is contained in:
parent
50029c7f73
commit
bd39ed3754
@ -378,11 +378,15 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
|
|||||||
more.setContentDescription(desc);
|
more.setContentDescription(desc);
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) more.setTooltipText(desc);
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) more.setTooltipText(desc);
|
||||||
|
|
||||||
String collapseText = item.parentFragment.getString(item.status.textExpanded ? R.string.sk_collapse : R.string.sk_expand);
|
if (item.status == null || !item.status.textExpandable) {
|
||||||
collapseBtn.setVisibility(item.status.textExpandable ? View.VISIBLE : View.GONE);
|
collapseBtn.setVisibility(View.GONE);
|
||||||
collapseBtn.setContentDescription(collapseText);
|
} else {
|
||||||
collapseBtn.animate().scaleY(item.status.textExpanded ? -1 : 1).start();
|
String collapseText = item.parentFragment.getString(item.status.textExpanded ? R.string.sk_collapse : R.string.sk_expand);
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) collapseBtn.setTooltipText(collapseText);
|
collapseBtn.setVisibility(item.status.textExpandable ? View.VISIBLE : View.GONE);
|
||||||
|
collapseBtn.setContentDescription(collapseText);
|
||||||
|
collapseBtn.animate().scaleY(item.status.textExpanded ? -1 : 1).start();
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) collapseBtn.setTooltipText(collapseText);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user