Last active
December 16, 2015 23:48
-
-
Save px-amaac/5515988 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onResume() { | |
super.onResume(); | |
MainActivity context = ((MainActivity) getSherlockActivity()); | |
// hide "custom" button when category filter has not been customized | |
int filter = Global.getInstance(context).getCatFilterMask() & context.MASK_ALL; | |
Log.d(Global.LOG_TAG, "onResume() filter: " + filter); | |
if (filter == MASK_FOOD || filter == MASK_SHOP || filter == MASK_LODGE | |
|| filter == MASK_ALL) | |
bt.setVisibility(View.GONE); | |
else | |
bt.setVisibility(View.VISIBLE); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static final int MASK_ALL = 0x3ff; | |
private static final int MASK_FOOD = 0x00f; | |
private static final int MASK_SHOP = 0x050; | |
private static final int MASK_LODGE = 0x100; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment