Skip to content
This repository has been archived by the owner on Jan 13, 2020. It is now read-only.

Commit

Permalink
* show featured butotn only after images are loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepenz committed Feb 7, 2015
1 parent f20cd24 commit 7c51fcd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public boolean onCreateOptionsMenu(Menu menu) {

menu.findItem(R.id.action_open_source).setIcon(new IconicsDrawable(this, FontAwesome.Icon.faw_github).color(Color.WHITE).actionBarSize());
menu_featured = menu.findItem(R.id.action_featured).setIcon(new IconicsDrawable(this, FontAwesome.Icon.faw_star).color(Color.WHITE).actionBarSize());
menu_featured.setVisible(false);
menu.findItem(R.id.action_shuffle).setIcon(new IconicsDrawable(this, FontAwesome.Icon.faw_random).color(Color.WHITE).actionBarSize());

return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ public class ImagesFragment extends Fragment {
public void onCreate(Bundle savedInstanceState) {
setHasOptionsMenu(true);

//hide the actionMenuItem so it is not clickable
((MainActivity) getActivity()).menu_featured.setVisible(false);

//get the drawables for the actionItems to save memory
menuFeatured = new IconicsDrawable(ImagesFragment.this.getActivity(), FontAwesome.Icon.faw_star).color(Color.WHITE).actionBarSize();
menuUnFeatured = new IconicsDrawable(ImagesFragment.this.getActivity(), FontAwesome.Icon.faw_star_o).color(Color.WHITE).actionBarSize();
Expand Down

0 comments on commit 7c51fcd

Please sign in to comment.