Last active
August 10, 2020 06:13
-
-
Save bengongon97/4bc348df58acbf65bec1a9c19555eb66 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 | |
protected void onCreate(Bundle savedInstanceState) { | |
//... your other codes | |
binding.containerLayout.setVisibility(View.GONE); | |
binding.playlistImageView.setOnClickListener(new View.OnClickListener() { | |
@Override | |
public void onClick(View view) { | |
if(binding.containerLayout.getVisibility() == View.GONE){ | |
binding.containerLayout.setVisibility(View.VISIBLE); | |
} | |
else{ | |
binding.containerLayout.setVisibility(View.GONE); | |
} | |
} | |
}); | |
} | |
@Override | |
public void onBackPressed() { | |
if(binding.containerLayout.getVisibility() == View.VISIBLE){ | |
binding.containerLayout.setVisibility(View.GONE); | |
} | |
else{ | |
super.onBackPressed(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment