Manual Merge master in foregroundService
base master Several bug still present - No notification - No Upload - Need more test
This commit is contained in:
@ -2,26 +2,17 @@ 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.ServerFile;
|
||||
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 {
|
||||
|
||||
@ -43,21 +34,20 @@ public class ProgressFragment extends Fragment {
|
||||
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);
|
||||
Transfer.fragment_progress = inflater.inflate(R.layout.fragment_progress, container, false);
|
||||
|
||||
return Progress.root;
|
||||
return Transfer.fragment_progress;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume(){
|
||||
super.onResume();
|
||||
|
||||
Progress.fragment_on = true;
|
||||
Transfer.fragment_on = true;
|
||||
|
||||
List instances = Transfer.getInstances();
|
||||
for (Object obj: instances) {
|
||||
Transfer tr = (Transfer) obj;
|
||||
Progress.showProgressFragment(tr);
|
||||
List<ServerFile> instances = ServerFile.getInstances();
|
||||
for (ServerFile file: instances) {
|
||||
file.showProgressFragment();
|
||||
}
|
||||
}
|
||||
|
||||
@ -65,6 +55,6 @@ public class ProgressFragment extends Fragment {
|
||||
public void onPause(){
|
||||
super.onPause();
|
||||
|
||||
Progress.fragment_on = false;
|
||||
Transfer.fragment_on = false;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user