main #6

Merged
r-ca merged 10 commits from main into kyou/layout 2024-01-11 07:25:56 +00:00
Showing only changes of commit 81209f695d - Show all commits

View File

@ -11,6 +11,8 @@ import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.Button; import android.widget.Button;
import com.google.zxing.integration.android.IntentIntegrator;
/** /**
* A simple {@link Fragment} subclass. * A simple {@link Fragment} subclass.
* Use the {@link QRFragment#newInstance} factory method to * Use the {@link QRFragment#newInstance} factory method to
@ -74,12 +76,7 @@ public class QRFragment extends Fragment {
cameraButton.setOnClickListener(v -> { cameraButton.setOnClickListener(v -> {
Log.d("QRFragment", "onClick: called"); Log.d("QRFragment", "onClick: called");
if (!sharedPreferences.getBoolean("inCar", false)) { new IntentIntegrator(getActivity()).initiateScan();
editor.putBoolean("inCar", true);
} else {
editor.putBoolean("inCar", false);
}
editor.apply();
}); });
return view; return view;