Add option to lock orientation state

This new option will control if the screen orientation
lock option is displayed or not. If set, the orientation lock
is forced and the unlock option is hidden.
This commit is contained in:
Branden Archer
2018-10-06 14:27:35 -07:00
parent 4de952ba2d
commit 10e720de91
5 changed files with 56 additions and 0 deletions

View File

@@ -200,6 +200,12 @@ public class LoyaltyCardViewActivity extends AppCompatActivity
{
getMenuInflater().inflate(R.menu.card_view_menu, menu);
if(settings.getLockBarcodeScreenOrientation())
{
MenuItem item = menu.findItem(R.id.action_lock_unlock);
setOrientatonLock(item, true);
item.setVisible(false);
}
return super.onCreateOptionsMenu(menu);
}