Well, I'm having trouble on how to use onattach. I have a view that is set visible when a button is triggered. I would like this View to disappear at the end of a fragment operation. Look at the Code that will make more sense.
In Activity:
private View layoutProgress;
protected void onCreate(Bundle savedInstanceState){
layoutProgress = findViewById(R.id.layout_progress);
layoutProgress.setVisibility(View.GONE);
}
When the Button is flipped:
fragment.getInstance().printScreen();(Função de Tirar foto no fragment)
layoutProgress.setVisibility(View.VISIBLE);
No Fragment:
Performs the necessary and would like it to disappear the layoutProgress.
How to do this? Sorry for the edit, I'm still learning to format better.