59 lines
1.4 KiB
Java
59 lines
1.4 KiB
Java
package com.localtransfer.fragment;
|
|
|
|
import android.os.Bundle;
|
|
|
|
import androidx.fragment.app.Fragment;
|
|
|
|
import android.view.LayoutInflater;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
|
|
import com.localtransfer.R;
|
|
import com.localtransfer.Transfer;
|
|
|
|
import java.util.List;
|
|
|
|
public class ProgressFragment extends Fragment {
|
|
|
|
public ProgressFragment() {
|
|
// Required empty public constructor
|
|
}
|
|
|
|
public static ProgressFragment newInstance() {
|
|
ProgressFragment fragment = new ProgressFragment();
|
|
return fragment;
|
|
}
|
|
|
|
@Override
|
|
public void onCreate(Bundle savedInstanceState) {
|
|
super.onCreate(savedInstanceState);
|
|
}
|
|
|
|
@Override
|
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
|
Bundle savedInstanceState) {
|
|
// Inflate the layout for this fragment
|
|
Transfer.fragment_progress = inflater.inflate(R.layout.fragment_progress, container, false);
|
|
|
|
return Transfer.fragment_progress;
|
|
}
|
|
|
|
@Override
|
|
public void onResume(){
|
|
super.onResume();
|
|
|
|
Transfer.fragment_on = true;
|
|
|
|
List<Transfer> instances = Transfer.getInstances();
|
|
for (Transfer file: instances) {
|
|
file.showProgressFragment();
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public void onPause(){
|
|
super.onPause();
|
|
|
|
Transfer.fragment_on = false;
|
|
}
|
|
} |