Replace illustration for sending data from removable drive

This commit is contained in:
Torsten Grote
2022-10-03 13:52:54 -03:00
parent f4dd3c4f06
commit 7bcffdf0d1
8 changed files with 378 additions and 115 deletions

View File

@@ -9,7 +9,6 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ProgressBar;
import android.widget.ScrollView;
import android.widget.TextView;
import android.widget.Toast;
@@ -31,13 +30,13 @@ import androidx.fragment.app.FragmentActivity;
import androidx.lifecycle.ViewModelProvider;
import static android.os.Build.VERSION.SDK_INT;
import static android.view.View.FOCUS_DOWN;
import static android.view.View.VISIBLE;
import static android.widget.Toast.LENGTH_LONG;
import static java.util.logging.Level.WARNING;
import static java.util.logging.Logger.getLogger;
import static org.briarproject.bramble.util.LogUtils.logException;
import static org.briarproject.briar.android.AppModule.getAndroidComponent;
import static org.briarproject.briar.android.util.UiUtils.hideViewOnSmallScreen;
@RequiresApi(19)
@MethodsNotNullByDefault
@@ -55,7 +54,6 @@ public class SendFragment extends Fragment {
ViewModelProvider.Factory viewModelFactory;
private RemovableDriveViewModel viewModel;
private ScrollView scrollView;
private TextView introTextView;
private Button button;
private ProgressBar progressBar;
@@ -78,7 +76,6 @@ public class SendFragment extends Fragment {
View v = inflater.inflate(R.layout.fragment_transfer_data_send,
container, false);
scrollView = (ScrollView) v;
introTextView = v.findViewById(R.id.introTextView);
progressBar = v.findViewById(R.id.progressBar);
button = v.findViewById(R.id.fileButton);
@@ -107,8 +104,7 @@ public class SendFragment extends Fragment {
public void onStart() {
super.onStart();
requireActivity().setTitle(R.string.removable_drive_title_send);
// Scroll down in case the screen is small, so the button is visible
scrollView.post(() -> scrollView.fullScroll(FOCUS_DOWN));
hideViewOnSmallScreen(requireView().findViewById(R.id.imageView));
}
@Override