From b81f8d5c874f86156c0d6f375d577e48145d930a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Mon, 15 Jan 2024 14:48:55 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=A2=E3=82=AF=E3=83=86=E3=82=A3=E3=83=93?= =?UTF-8?q?=E3=83=86=E3=82=A3=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 1 + app/src/main/AndroidManifest.xml | 6 ++++- .../nem/lacerta/ScannerOverrideActivity.java | 24 +++++++++++++++++++ .../res/layout/activity_scanner_override.xml | 10 ++++++++ .../feature/debug/DebugMenuTopFragment.java | 3 ++- 5 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 app/src/main/java/one/nem/lacerta/ScannerOverrideActivity.java create mode 100644 app/src/main/res/layout/activity_scanner_override.xml diff --git a/app/build.gradle b/app/build.gradle index 4db4c74d..3a95cf75 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -55,6 +55,7 @@ dependencies { implementation libs.androidx.appcompat implementation libs.com.google.android.material implementation libs.androidx.constraintlayout + implementation libs.androidx.activity testImplementation libs.junit androidTestImplementation libs.androidx.test.ext.junit androidTestImplementation libs.androidx.test.espresso.core diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index a5ae62e6..3fe7369f 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -5,6 +5,7 @@ + @@ -14,16 +15,19 @@ + diff --git a/app/src/main/java/one/nem/lacerta/ScannerOverrideActivity.java b/app/src/main/java/one/nem/lacerta/ScannerOverrideActivity.java new file mode 100644 index 00000000..b52c842c --- /dev/null +++ b/app/src/main/java/one/nem/lacerta/ScannerOverrideActivity.java @@ -0,0 +1,24 @@ +package one.nem.lacerta; + +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/app/src/main/res/layout/activity_scanner_override.xml b/app/src/main/res/layout/activity_scanner_override.xml new file mode 100644 index 00000000..98d3e3db --- /dev/null +++ b/app/src/main/res/layout/activity_scanner_override.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuTopFragment.java b/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuTopFragment.java index 92e50e6b..c55914e8 100644 --- a/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuTopFragment.java +++ b/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuTopFragment.java @@ -49,7 +49,8 @@ public class DebugMenuTopFragment extends Fragment { List debugMenuListItems = new ArrayList<>(); debugMenuListItems.add(new DebugMenuListItem("Document Tester", "placeholder", R.id.action_debugMenuTopFragment_to_debugMenuDocumentTesterTopFragment, true)); - debugMenuListItems.add(new DebugMenuListItem("Scanner", "placeholder", R.id.action_debugMenuTopFragment_to_scannerDataManagerStubFragment, true)); + debugMenuListItems.add(new DebugMenuListItem("ScannerStub", "placeholder", R.id.action_debugMenuTopFragment_to_scannerDataManagerStubFragment, true)); + debugMenuListItems.add(new DebugMenuListItem("Scanner", "placeholder", R.id.action_debugMenuTopFragment_to_scannerManagerFragment, true)); debugMenuListItems.add(new DebugMenuListItem("Document List", "placeholder", R.id.action_debugMenuTopFragment_to_debugMenuLibraryItemListPageFragment, true)); debugMenuListItems.add(new DebugMenuListItem("VCS", "placeholder", R.id.action_debugMenuTopFragment_to_debugMenuVcsGeneralFragment, true));