Fix crash when using .NoActionBar theme.
m_activity.getActionBar() returns null when a .NoActionBar theme is declared in AndroidManifest.xml file Change-Id: I671891d03913209c3f9f34a6f4dd8894c20de5c2 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
This commit is contained in:
parent
b725f4e144
commit
1a358a052e
@ -1200,6 +1200,8 @@ public class QtActivityDelegate
|
|||||||
|
|
||||||
private void setActionBarVisibility(boolean visible)
|
private void setActionBarVisibility(boolean visible)
|
||||||
{
|
{
|
||||||
|
if (m_activity.getActionBar() == null)
|
||||||
|
return;
|
||||||
if (ViewConfiguration.get(m_activity).hasPermanentMenuKey() || !visible)
|
if (ViewConfiguration.get(m_activity).hasPermanentMenuKey() || !visible)
|
||||||
m_activity.getActionBar().hide();
|
m_activity.getActionBar().hide();
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user