selected icon loading optimizations
This commit is contained in:
parent
e067d9b6df
commit
b7448a7422
|
@ -67,15 +67,18 @@ namespace Bit.Android.Controls
|
|||
return;
|
||||
}
|
||||
|
||||
if(selected)
|
||||
{
|
||||
var selectedResource = IdFromTitle(string.Format("{0}_selected", icon), ResourceManager.DrawableClass);
|
||||
if(selected && selectedResource != 0)
|
||||
if(selectedResource != 0)
|
||||
{
|
||||
tab.SetIcon(selectedResource);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
tab.SetIcon(IdFromTitle(icon, ResourceManager.DrawableClass));
|
||||
}
|
||||
|
||||
var resource = IdFromTitle(icon, ResourceManager.DrawableClass);
|
||||
tab.SetIcon(resource);
|
||||
}
|
||||
|
||||
private int IdFromTitle(string title, Type type)
|
||||
|
|
Loading…
Reference in New Issue