Hide keyboard on detaching fragment

Do we really need to do this ourselves, Google?
This commit is contained in:
M66B
2018-08-05 12:09:46 +00:00
parent 10e96f6a3f
commit 8d42f6809f
13 changed files with 72 additions and 87 deletions

View File

@@ -27,10 +27,8 @@ import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -44,7 +42,7 @@ import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class FragmentSetup extends Fragment {
public class FragmentSetup extends FragmentEx {
private Button btnAccount;
private ProgressBar pbAccount;
private TextView tvAccountDone;
@@ -69,6 +67,8 @@ public class FragmentSetup extends Fragment {
@Override
@Nullable
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
setSubtitle(R.string.title_setup);
View view = inflater.inflate(R.layout.fragment_setup, container, false);
// Get controls
@@ -248,12 +248,6 @@ public class FragmentSetup extends Fragment {
return view;
}
@Override
public void onResume() {
super.onResume();
((AppCompatActivity) getActivity()).getSupportActionBar().setSubtitle(R.string.title_setup);
}
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
boolean has = (grantResults.length > 0);