first commit
This commit is contained in:
@ -0,0 +1,70 @@
|
||||
package com.localtransfer.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.core.app.NotificationCompat;
|
||||
import androidx.core.app.NotificationManagerCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.localtransfer.Progress;
|
||||
import com.localtransfer.R;
|
||||
import com.localtransfer.Transfer;
|
||||
|
||||
import java.util.ConcurrentModificationException;
|
||||
import java.util.List;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
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
|
||||
Progress.root = inflater.inflate(R.layout.fragment_progress, container, false);
|
||||
|
||||
return Progress.root;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume(){
|
||||
super.onResume();
|
||||
|
||||
Progress.fragment_on = true;
|
||||
|
||||
List instances = Progress.getInstances();
|
||||
for (Object obj: instances) {
|
||||
Progress p = (Progress) obj;
|
||||
p.showProgress();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause(){
|
||||
super.onPause();
|
||||
|
||||
Progress.fragment_on = false;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user