diff --git a/component/scanner/build.gradle b/component/scanner/build.gradle index 735535ff..defa4b6e 100644 --- a/component/scanner/build.gradle +++ b/component/scanner/build.gradle @@ -30,6 +30,8 @@ dependencies { implementation libs.androidx.appcompat implementation libs.com.google.android.material + implementation libs.androidx.activity + implementation libs.androidx.constraintlayout testImplementation libs.junit androidTestImplementation libs.androidx.test.ext.junit androidTestImplementation libs.androidx.test.espresso.core diff --git a/component/scanner/src/main/AndroidManifest.xml b/component/scanner/src/main/AndroidManifest.xml index a5918e68..2b9f05ea 100644 --- a/component/scanner/src/main/AndroidManifest.xml +++ b/component/scanner/src/main/AndroidManifest.xml @@ -1,4 +1,10 @@ + + + + \ No newline at end of file diff --git a/component/scanner/src/main/java/one/nem/lacerta/component/scanner/ScannerOverrideActivity.java b/component/scanner/src/main/java/one/nem/lacerta/component/scanner/ScannerOverrideActivity.java new file mode 100644 index 00000000..67b4959d --- /dev/null +++ b/component/scanner/src/main/java/one/nem/lacerta/component/scanner/ScannerOverrideActivity.java @@ -0,0 +1,24 @@ +package one.nem.lacerta.component.scanner; + +import android.os.Bundle; + +import androidx.activity.EdgeToEdge; +import androidx.appcompat.app.AppCompatActivity; +import androidx.core.graphics.Insets; +import androidx.core.view.ViewCompat; +import androidx.core.view.WindowInsetsCompat; + +public class ScannerOverrideActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + EdgeToEdge.enable(this); + setContentView(R.layout.activity_scanner_override); + ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> { + Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars()); + v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom); + return insets; + }); + } +} \ No newline at end of file diff --git a/component/scanner/src/main/res/layout/activity_scanner_override.xml b/component/scanner/src/main/res/layout/activity_scanner_override.xml new file mode 100644 index 00000000..98d3e3db --- /dev/null +++ b/component/scanner/src/main/res/layout/activity_scanner_override.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file