diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-04-24 16:42:18 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-04-24 16:42:18 +0200 |
| commit | b4695e613f0bca451485f95572f23d464b56a95e (patch) | |
| tree | f893b2035458b47a9b8bbdb3a78205511d2ce3c5 /tflite/src/main/res | |
Initial importmain
Diffstat (limited to 'tflite/src/main/res')
28 files changed, 487 insertions, 0 deletions
diff --git a/tflite/src/main/res/drawable/ic_launcher_background.xml b/tflite/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..268681b --- /dev/null +++ b/tflite/src/main/res/drawable/ic_launcher_background.xml | |||
| @@ -0,0 +1,89 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <!-- | ||
| 3 | ~ Copyright 2020 Google LLC | ||
| 4 | ~ | ||
| 5 | ~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 6 | ~ you may not use this file except in compliance with the License. | ||
| 7 | ~ You may obtain a copy of the License at | ||
| 8 | ~ | ||
| 9 | ~ https://www.apache.org/licenses/LICENSE-2.0 | ||
| 10 | ~ | ||
| 11 | ~ Unless required by applicable law or agreed to in writing, software | ||
| 12 | ~ distributed under the License is distributed on an "AS IS" BASIS, | ||
| 13 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 14 | ~ See the License for the specific language governing permissions and | ||
| 15 | ~ limitations under the License. | ||
| 16 | --> | ||
| 17 | <vector | ||
| 18 | xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 19 | android:height="108dp" | ||
| 20 | android:width="108dp" | ||
| 21 | android:viewportHeight="108" | ||
| 22 | android:viewportWidth="108"> | ||
| 23 | <path android:fillColor="#008577" | ||
| 24 | android:pathData="M0,0h108v108h-108z"/> | ||
| 25 | <path android:fillColor="#00000000" android:pathData="M9,0L9,108" | ||
| 26 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 27 | <path android:fillColor="#00000000" android:pathData="M19,0L19,108" | ||
| 28 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 29 | <path android:fillColor="#00000000" android:pathData="M29,0L29,108" | ||
| 30 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 31 | <path android:fillColor="#00000000" android:pathData="M39,0L39,108" | ||
| 32 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 33 | <path android:fillColor="#00000000" android:pathData="M49,0L49,108" | ||
| 34 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 35 | <path android:fillColor="#00000000" android:pathData="M59,0L59,108" | ||
| 36 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 37 | <path android:fillColor="#00000000" android:pathData="M69,0L69,108" | ||
| 38 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 39 | <path android:fillColor="#00000000" android:pathData="M79,0L79,108" | ||
| 40 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 41 | <path android:fillColor="#00000000" android:pathData="M89,0L89,108" | ||
| 42 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 43 | <path android:fillColor="#00000000" android:pathData="M99,0L99,108" | ||
| 44 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 45 | <path android:fillColor="#00000000" android:pathData="M0,9L108,9" | ||
| 46 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 47 | <path android:fillColor="#00000000" android:pathData="M0,19L108,19" | ||
| 48 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 49 | <path android:fillColor="#00000000" android:pathData="M0,29L108,29" | ||
| 50 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 51 | <path android:fillColor="#00000000" android:pathData="M0,39L108,39" | ||
| 52 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 53 | <path android:fillColor="#00000000" android:pathData="M0,49L108,49" | ||
| 54 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 55 | <path android:fillColor="#00000000" android:pathData="M0,59L108,59" | ||
| 56 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 57 | <path android:fillColor="#00000000" android:pathData="M0,69L108,69" | ||
| 58 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 59 | <path android:fillColor="#00000000" android:pathData="M0,79L108,79" | ||
| 60 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 61 | <path android:fillColor="#00000000" android:pathData="M0,89L108,89" | ||
| 62 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 63 | <path android:fillColor="#00000000" android:pathData="M0,99L108,99" | ||
| 64 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 65 | <path android:fillColor="#00000000" android:pathData="M19,29L89,29" | ||
| 66 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 67 | <path android:fillColor="#00000000" android:pathData="M19,39L89,39" | ||
| 68 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 69 | <path android:fillColor="#00000000" android:pathData="M19,49L89,49" | ||
| 70 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 71 | <path android:fillColor="#00000000" android:pathData="M19,59L89,59" | ||
| 72 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 73 | <path android:fillColor="#00000000" android:pathData="M19,69L89,69" | ||
| 74 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 75 | <path android:fillColor="#00000000" android:pathData="M19,79L89,79" | ||
| 76 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 77 | <path android:fillColor="#00000000" android:pathData="M29,19L29,89" | ||
| 78 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 79 | <path android:fillColor="#00000000" android:pathData="M39,19L39,89" | ||
| 80 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 81 | <path android:fillColor="#00000000" android:pathData="M49,19L49,89" | ||
| 82 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 83 | <path android:fillColor="#00000000" android:pathData="M59,19L59,89" | ||
| 84 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 85 | <path android:fillColor="#00000000" android:pathData="M69,19L69,89" | ||
| 86 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 87 | <path android:fillColor="#00000000" android:pathData="M79,19L79,89" | ||
| 88 | android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/> | ||
| 89 | </vector> | ||
diff --git a/tflite/src/main/res/drawable/ic_shutter.xml b/tflite/src/main/res/drawable/ic_shutter.xml new file mode 100644 index 0000000..ab352ba --- /dev/null +++ b/tflite/src/main/res/drawable/ic_shutter.xml | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <!-- | ||
| 3 | ~ Copyright 2019 Google LLC | ||
| 4 | ~ | ||
| 5 | ~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 6 | ~ you may not use this file except in compliance with the License. | ||
| 7 | ~ You may obtain a copy of the License at | ||
| 8 | ~ | ||
| 9 | ~ https://www.apache.org/licenses/LICENSE-2.0 | ||
| 10 | ~ | ||
| 11 | ~ Unless required by applicable law or agreed to in writing, software | ||
| 12 | ~ distributed under the License is distributed on an "AS IS" BASIS, | ||
| 13 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 14 | ~ See the License for the specific language governing permissions and | ||
| 15 | ~ limitations under the License. | ||
| 16 | --> | ||
| 17 | <selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| 18 | <item android:state_pressed="true" android:drawable="@drawable/ic_shutter_pressed" /> | ||
| 19 | <item android:state_focused="true" android:drawable="@drawable/ic_shutter_focused" /> | ||
| 20 | <item android:drawable="@drawable/ic_shutter_normal" /> | ||
| 21 | </selector> \ No newline at end of file | ||
diff --git a/tflite/src/main/res/drawable/ic_shutter_focused.xml b/tflite/src/main/res/drawable/ic_shutter_focused.xml new file mode 100644 index 0000000..fa852ac --- /dev/null +++ b/tflite/src/main/res/drawable/ic_shutter_focused.xml | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <!-- | ||
| 3 | ~ Copyright 2019 Google LLC | ||
| 4 | ~ | ||
| 5 | ~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 6 | ~ you may not use this file except in compliance with the License. | ||
| 7 | ~ You may obtain a copy of the License at | ||
| 8 | ~ | ||
| 9 | ~ https://www.apache.org/licenses/LICENSE-2.0 | ||
| 10 | ~ | ||
| 11 | ~ Unless required by applicable law or agreed to in writing, software | ||
| 12 | ~ distributed under the License is distributed on an "AS IS" BASIS, | ||
| 13 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 14 | ~ See the License for the specific language governing permissions and | ||
| 15 | ~ limitations under the License. | ||
| 16 | --> | ||
| 17 | <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 18 | android:width="24dp" | ||
| 19 | android:height="24dp" | ||
| 20 | android:viewportWidth="74" | ||
| 21 | android:viewportHeight="74"> | ||
| 22 | <path android:fillColor="#FFFFFF" android:fillType="evenOdd" | ||
| 23 | android:pathData="M73.1,37C73.1,17.0637 56.9373,0.9 37,0.9C17.0627,0.9 0.9,17.0637 0.9,37C0.9,56.9373 17.0627,73.1 37,73.1C56.9373,73.1 73.1,56.9373 73.1,37" | ||
| 24 | android:strokeColor="#00000000" android:strokeWidth="1"/> | ||
| 25 | <path android:fillColor="#58A0C4" android:fillType="evenOdd" | ||
| 26 | android:pathData="M67.4,37C67.4,53.7895 53.7895,67.4 37,67.4C20.2105,67.4 6.6,53.7895 6.6,37C6.6,20.2105 20.2105,6.6 37,6.6C53.7895,6.6 67.4,20.2105 67.4,37" | ||
| 27 | android:strokeColor="#00000000" android:strokeWidth="1"/> | ||
| 28 | </vector> | ||
diff --git a/tflite/src/main/res/drawable/ic_shutter_normal.xml b/tflite/src/main/res/drawable/ic_shutter_normal.xml new file mode 100644 index 0000000..25a10e1 --- /dev/null +++ b/tflite/src/main/res/drawable/ic_shutter_normal.xml | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <!-- | ||
| 3 | ~ Copyright 2019 Google LLC | ||
| 4 | ~ | ||
| 5 | ~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 6 | ~ you may not use this file except in compliance with the License. | ||
| 7 | ~ You may obtain a copy of the License at | ||
| 8 | ~ | ||
| 9 | ~ https://www.apache.org/licenses/LICENSE-2.0 | ||
| 10 | ~ | ||
| 11 | ~ Unless required by applicable law or agreed to in writing, software | ||
| 12 | ~ distributed under the License is distributed on an "AS IS" BASIS, | ||
| 13 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 14 | ~ See the License for the specific language governing permissions and | ||
| 15 | ~ limitations under the License. | ||
| 16 | --> | ||
| 17 | <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 18 | android:width="24dp" | ||
| 19 | android:height="24dp" | ||
| 20 | android:viewportWidth="74" | ||
| 21 | android:viewportHeight="74"> | ||
| 22 | <path android:fillColor="#FFFFFF" android:fillType="evenOdd" | ||
| 23 | android:pathData="M73.1,37C73.1,17.0637 56.9373,0.9 37,0.9C17.0627,0.9 0.9,17.0637 0.9,37C0.9,56.9373 17.0627,73.1 37,73.1C56.9373,73.1 73.1,56.9373 73.1,37" | ||
| 24 | android:strokeColor="#00000000" android:strokeWidth="1"/> | ||
| 25 | <path android:fillColor="#CFD7DB" android:fillType="evenOdd" | ||
| 26 | android:pathData="M67.4,37C67.4,53.7895 53.7895,67.4 37,67.4C20.2105,67.4 6.6,53.7895 6.6,37C6.6,20.2105 20.2105,6.6 37,6.6C53.7895,6.6 67.4,20.2105 67.4,37" | ||
| 27 | android:strokeColor="#00000000" android:strokeWidth="1"/> | ||
| 28 | </vector> | ||
diff --git a/tflite/src/main/res/drawable/ic_shutter_pressed.xml b/tflite/src/main/res/drawable/ic_shutter_pressed.xml new file mode 100644 index 0000000..fa852ac --- /dev/null +++ b/tflite/src/main/res/drawable/ic_shutter_pressed.xml | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <!-- | ||
| 3 | ~ Copyright 2019 Google LLC | ||
| 4 | ~ | ||
| 5 | ~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 6 | ~ you may not use this file except in compliance with the License. | ||
| 7 | ~ You may obtain a copy of the License at | ||
| 8 | ~ | ||
| 9 | ~ https://www.apache.org/licenses/LICENSE-2.0 | ||
| 10 | ~ | ||
| 11 | ~ Unless required by applicable law or agreed to in writing, software | ||
| 12 | ~ distributed under the License is distributed on an "AS IS" BASIS, | ||
| 13 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 14 | ~ See the License for the specific language governing permissions and | ||
| 15 | ~ limitations under the License. | ||
| 16 | --> | ||
| 17 | <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 18 | android:width="24dp" | ||
| 19 | android:height="24dp" | ||
| 20 | android:viewportWidth="74" | ||
| 21 | android:viewportHeight="74"> | ||
| 22 | <path android:fillColor="#FFFFFF" android:fillType="evenOdd" | ||
| 23 | android:pathData="M73.1,37C73.1,17.0637 56.9373,0.9 37,0.9C17.0627,0.9 0.9,17.0637 0.9,37C0.9,56.9373 17.0627,73.1 37,73.1C56.9373,73.1 73.1,56.9373 73.1,37" | ||
| 24 | android:strokeColor="#00000000" android:strokeWidth="1"/> | ||
| 25 | <path android:fillColor="#58A0C4" android:fillType="evenOdd" | ||
| 26 | android:pathData="M67.4,37C67.4,53.7895 53.7895,67.4 37,67.4C20.2105,67.4 6.6,53.7895 6.6,37C6.6,20.2105 20.2105,6.6 37,6.6C53.7895,6.6 67.4,20.2105 67.4,37" | ||
| 27 | android:strokeColor="#00000000" android:strokeWidth="1"/> | ||
| 28 | </vector> | ||
diff --git a/tflite/src/main/res/drawable/shape_rectangle.xml b/tflite/src/main/res/drawable/shape_rectangle.xml new file mode 100644 index 0000000..5365e4c --- /dev/null +++ b/tflite/src/main/res/drawable/shape_rectangle.xml | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <!-- | ||
| 3 | ~ Copyright 2020 Google LLC | ||
| 4 | ~ | ||
| 5 | ~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 6 | ~ you may not use this file except in compliance with the License. | ||
| 7 | ~ You may obtain a copy of the License at | ||
| 8 | ~ | ||
| 9 | ~ https://www.apache.org/licenses/LICENSE-2.0 | ||
| 10 | ~ | ||
| 11 | ~ Unless required by applicable law or agreed to in writing, software | ||
| 12 | ~ distributed under the License is distributed on an "AS IS" BASIS, | ||
| 13 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 14 | ~ See the License for the specific language governing permissions and | ||
| 15 | ~ limitations under the License. | ||
| 16 | --> | ||
| 17 | <shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 18 | android:shape="rectangle"> | ||
| 19 | <corners | ||
| 20 | android:radius="4dp" | ||
| 21 | android:topRightRadius="0dp" | ||
| 22 | android:bottomRightRadius="0dp" | ||
| 23 | android:bottomLeftRadius="0dp" /> | ||
| 24 | <stroke | ||
| 25 | android:width="4dp" | ||
| 26 | android:color="@android:color/white" /> | ||
| 27 | <solid android:color="@android:color/transparent"/> | ||
| 28 | </shape> \ No newline at end of file | ||
diff --git a/tflite/src/main/res/layout-land/activity_camera.xml b/tflite/src/main/res/layout-land/activity_camera.xml new file mode 100644 index 0000000..1cc66f1 --- /dev/null +++ b/tflite/src/main/res/layout-land/activity_camera.xml | |||
| @@ -0,0 +1,72 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <!-- | ||
| 3 | ~ Copyright 2020 Google LLC | ||
| 4 | ~ | ||
| 5 | ~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 6 | ~ you may not use this file except in compliance with the License. | ||
| 7 | ~ You may obtain a copy of the License at | ||
| 8 | ~ | ||
| 9 | ~ https://www.apache.org/licenses/LICENSE-2.0 | ||
| 10 | ~ | ||
| 11 | ~ Unless required by applicable law or agreed to in writing, software | ||
| 12 | ~ distributed under the License is distributed on an "AS IS" BASIS, | ||
| 13 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 14 | ~ See the License for the specific language governing permissions and | ||
| 15 | ~ limitations under the License. | ||
| 16 | --> | ||
| 17 | <androidx.constraintlayout.widget.ConstraintLayout | ||
| 18 | xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 19 | xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| 20 | xmlns:tools="http://schemas.android.com/tools" | ||
| 21 | android:id="@+id/camera_container" | ||
| 22 | android:background="@android:color/black" | ||
| 23 | android:layout_width="match_parent" | ||
| 24 | android:layout_height="match_parent"> | ||
| 25 | |||
| 26 | <androidx.camera.view.PreviewView | ||
| 27 | android:id="@+id/view_finder" | ||
| 28 | android:layout_width="match_parent" | ||
| 29 | android:layout_height="match_parent"/> | ||
| 30 | |||
| 31 | <ImageView | ||
| 32 | android:id="@+id/image_predicted" | ||
| 33 | android:layout_width="match_parent" | ||
| 34 | android:layout_height="match_parent" | ||
| 35 | android:scaleType="centerCrop" | ||
| 36 | android:visibility="gone" /> | ||
| 37 | |||
| 38 | <TextView | ||
| 39 | android:id="@+id/text_prediction" | ||
| 40 | android:layout_width="wrap_content" | ||
| 41 | android:layout_height="wrap_content" | ||
| 42 | android:layout_marginTop="@dimen/margin_xsmall" | ||
| 43 | app:layout_constraintTop_toTopOf="parent" | ||
| 44 | app:layout_constraintStart_toStartOf="parent" | ||
| 45 | app:layout_constraintEnd_toEndOf="parent" | ||
| 46 | android:textAllCaps="true" | ||
| 47 | android:textAppearance="@style/TextAppearance.AppCompat.Display1" | ||
| 48 | android:text="@string/unknown" /> | ||
| 49 | |||
| 50 | <View | ||
| 51 | android:id="@+id/box_prediction" | ||
| 52 | android:layout_width="0dp" | ||
| 53 | android:layout_height="0dp" | ||
| 54 | android:background="@drawable/shape_rectangle" | ||
| 55 | app:layout_constraintTop_toTopOf="parent" | ||
| 56 | app:layout_constraintStart_toStartOf="parent" /> | ||
| 57 | |||
| 58 | <!-- Camera control buttons --> | ||
| 59 | |||
| 60 | <ImageButton | ||
| 61 | android:id="@+id/camera_capture_button" | ||
| 62 | android:layout_width="@dimen/round_button_large" | ||
| 63 | android:layout_height="@dimen/round_button_large" | ||
| 64 | android:layout_marginEnd="@dimen/shutter_button_margin" | ||
| 65 | android:scaleType="fitCenter" | ||
| 66 | android:background="@drawable/ic_shutter" | ||
| 67 | app:layout_constraintEnd_toEndOf="parent" | ||
| 68 | app:layout_constraintTop_toTopOf="parent" | ||
| 69 | app:layout_constraintBottom_toBottomOf="parent" | ||
| 70 | android:contentDescription="@string/capture_button_alt" /> | ||
| 71 | |||
| 72 | </androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file | ||
diff --git a/tflite/src/main/res/layout/activity_camera.xml b/tflite/src/main/res/layout/activity_camera.xml new file mode 100644 index 0000000..c094f94 --- /dev/null +++ b/tflite/src/main/res/layout/activity_camera.xml | |||
| @@ -0,0 +1,72 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <!-- | ||
| 3 | ~ Copyright 2020 Google LLC | ||
| 4 | ~ | ||
| 5 | ~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 6 | ~ you may not use this file except in compliance with the License. | ||
| 7 | ~ You may obtain a copy of the License at | ||
| 8 | ~ | ||
| 9 | ~ https://www.apache.org/licenses/LICENSE-2.0 | ||
| 10 | ~ | ||
| 11 | ~ Unless required by applicable law or agreed to in writing, software | ||
| 12 | ~ distributed under the License is distributed on an "AS IS" BASIS, | ||
| 13 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 14 | ~ See the License for the specific language governing permissions and | ||
| 15 | ~ limitations under the License. | ||
| 16 | --> | ||
| 17 | <androidx.constraintlayout.widget.ConstraintLayout | ||
| 18 | xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 19 | xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| 20 | xmlns:tools="http://schemas.android.com/tools" | ||
| 21 | android:id="@+id/camera_container" | ||
| 22 | android:background="@android:color/black" | ||
| 23 | android:layout_width="match_parent" | ||
| 24 | android:layout_height="match_parent"> | ||
| 25 | |||
| 26 | <androidx.camera.view.PreviewView | ||
| 27 | android:id="@+id/view_finder" | ||
| 28 | android:layout_width="match_parent" | ||
| 29 | android:layout_height="match_parent"/> | ||
| 30 | |||
| 31 | <ImageView | ||
| 32 | android:id="@+id/image_predicted" | ||
| 33 | android:layout_width="match_parent" | ||
| 34 | android:layout_height="match_parent" | ||
| 35 | android:scaleType="centerCrop" | ||
| 36 | android:visibility="gone" /> | ||
| 37 | |||
| 38 | <TextView | ||
| 39 | android:id="@+id/text_prediction" | ||
| 40 | android:layout_width="wrap_content" | ||
| 41 | android:layout_height="wrap_content" | ||
| 42 | android:layout_marginTop="@dimen/margin_xsmall" | ||
| 43 | app:layout_constraintTop_toTopOf="parent" | ||
| 44 | app:layout_constraintStart_toStartOf="parent" | ||
| 45 | app:layout_constraintEnd_toEndOf="parent" | ||
| 46 | android:textAllCaps="true" | ||
| 47 | android:textAppearance="@style/TextAppearance.AppCompat.Display1" | ||
| 48 | android:text="@string/unknown" /> | ||
| 49 | |||
| 50 | <View | ||
| 51 | android:id="@+id/box_prediction" | ||
| 52 | android:layout_width="0dp" | ||
| 53 | android:layout_height="0dp" | ||
| 54 | android:background="@drawable/shape_rectangle" | ||
| 55 | app:layout_constraintTop_toTopOf="parent" | ||
| 56 | app:layout_constraintStart_toStartOf="parent" /> | ||
| 57 | |||
| 58 | <!-- Camera control buttons --> | ||
| 59 | |||
| 60 | <ImageButton | ||
| 61 | android:id="@+id/camera_capture_button" | ||
| 62 | android:layout_width="@dimen/round_button_large" | ||
| 63 | android:layout_height="@dimen/round_button_large" | ||
| 64 | android:layout_marginBottom="@dimen/shutter_button_margin" | ||
| 65 | android:scaleType="fitCenter" | ||
| 66 | android:background="@drawable/ic_shutter" | ||
| 67 | app:layout_constraintLeft_toLeftOf="parent" | ||
| 68 | app:layout_constraintRight_toRightOf="parent" | ||
| 69 | app:layout_constraintBottom_toBottomOf="parent" | ||
| 70 | android:contentDescription="@string/capture_button_alt" /> | ||
| 71 | |||
| 72 | </androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file | ||
diff --git a/tflite/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/tflite/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..fe90d56 --- /dev/null +++ b/tflite/src/main/res/mipmap-anydpi-v26/ic_launcher.xml | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <!-- | ||
| 3 | ~ Copyright 2019 Google LLC | ||
| 4 | ~ | ||
| 5 | ~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 6 | ~ you may not use this file except in compliance with the License. | ||
| 7 | ~ You may obtain a copy of the License at | ||
| 8 | ~ | ||
| 9 | ~ https://www.apache.org/licenses/LICENSE-2.0 | ||
| 10 | ~ | ||
| 11 | ~ Unless required by applicable law or agreed to in writing, software | ||
| 12 | ~ distributed under the License is distributed on an "AS IS" BASIS, | ||
| 13 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 14 | ~ See the License for the specific language governing permissions and | ||
| 15 | ~ limitations under the License. | ||
| 16 | --> | ||
| 17 | <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| 18 | <background android:drawable="@drawable/ic_launcher_background"/> | ||
| 19 | <foreground android:drawable="@mipmap/ic_launcher_foreground"/> | ||
| 20 | </adaptive-icon> \ No newline at end of file | ||
diff --git a/tflite/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/tflite/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..fe90d56 --- /dev/null +++ b/tflite/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <!-- | ||
| 3 | ~ Copyright 2019 Google LLC | ||
| 4 | ~ | ||
| 5 | ~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 6 | ~ you may not use this file except in compliance with the License. | ||
| 7 | ~ You may obtain a copy of the License at | ||
| 8 | ~ | ||
| 9 | ~ https://www.apache.org/licenses/LICENSE-2.0 | ||
| 10 | ~ | ||
| 11 | ~ Unless required by applicable law or agreed to in writing, software | ||
| 12 | ~ distributed under the License is distributed on an "AS IS" BASIS, | ||
| 13 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 14 | ~ See the License for the specific language governing permissions and | ||
| 15 | ~ limitations under the License. | ||
| 16 | --> | ||
| 17 | <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| 18 | <background android:drawable="@drawable/ic_launcher_background"/> | ||
| 19 | <foreground android:drawable="@mipmap/ic_launcher_foreground"/> | ||
| 20 | </adaptive-icon> \ No newline at end of file | ||
diff --git a/tflite/src/main/res/mipmap-hdpi/ic_launcher.png b/tflite/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..edd7b36 --- /dev/null +++ b/tflite/src/main/res/mipmap-hdpi/ic_launcher.png | |||
| Binary files differ | |||
diff --git a/tflite/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/tflite/src/main/res/mipmap-hdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..a050bf2 --- /dev/null +++ b/tflite/src/main/res/mipmap-hdpi/ic_launcher_foreground.png | |||
| Binary files differ | |||
diff --git a/tflite/src/main/res/mipmap-hdpi/ic_launcher_round.png b/tflite/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 0000000..ec13a43 --- /dev/null +++ b/tflite/src/main/res/mipmap-hdpi/ic_launcher_round.png | |||
| Binary files differ | |||
diff --git a/tflite/src/main/res/mipmap-mdpi/ic_launcher.png b/tflite/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..6fd4f91 --- /dev/null +++ b/tflite/src/main/res/mipmap-mdpi/ic_launcher.png | |||
| Binary files differ | |||
diff --git a/tflite/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/tflite/src/main/res/mipmap-mdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..df81982 --- /dev/null +++ b/tflite/src/main/res/mipmap-mdpi/ic_launcher_foreground.png | |||
| Binary files differ | |||
diff --git a/tflite/src/main/res/mipmap-mdpi/ic_launcher_round.png b/tflite/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 0000000..2616048 --- /dev/null +++ b/tflite/src/main/res/mipmap-mdpi/ic_launcher_round.png | |||
| Binary files differ | |||
diff --git a/tflite/src/main/res/mipmap-xhdpi/ic_launcher.png b/tflite/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..fdae11d --- /dev/null +++ b/tflite/src/main/res/mipmap-xhdpi/ic_launcher.png | |||
| Binary files differ | |||
diff --git a/tflite/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/tflite/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..667d566 --- /dev/null +++ b/tflite/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png | |||
| Binary files differ | |||
diff --git a/tflite/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/tflite/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 0000000..cb11f72 --- /dev/null +++ b/tflite/src/main/res/mipmap-xhdpi/ic_launcher_round.png | |||
| Binary files differ | |||
diff --git a/tflite/src/main/res/mipmap-xxhdpi/ic_launcher.png b/tflite/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..5d4fa36 --- /dev/null +++ b/tflite/src/main/res/mipmap-xxhdpi/ic_launcher.png | |||
| Binary files differ | |||
diff --git a/tflite/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/tflite/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..33dc1c6 --- /dev/null +++ b/tflite/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png | |||
| Binary files differ | |||
diff --git a/tflite/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/tflite/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..07d1393 --- /dev/null +++ b/tflite/src/main/res/mipmap-xxhdpi/ic_launcher_round.png | |||
| Binary files differ | |||
diff --git a/tflite/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/tflite/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..675e313 --- /dev/null +++ b/tflite/src/main/res/mipmap-xxxhdpi/ic_launcher.png | |||
| Binary files differ | |||
diff --git a/tflite/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/tflite/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..9f9808a --- /dev/null +++ b/tflite/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png | |||
| Binary files differ | |||
diff --git a/tflite/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/tflite/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..54e07e0 --- /dev/null +++ b/tflite/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png | |||
| Binary files differ | |||
diff --git a/tflite/src/main/res/values/dimens.xml b/tflite/src/main/res/values/dimens.xml new file mode 100644 index 0000000..53948b6 --- /dev/null +++ b/tflite/src/main/res/values/dimens.xml | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <!-- | ||
| 3 | ~ Copyright 2020 Google LLC | ||
| 4 | ~ | ||
| 5 | ~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 6 | ~ you may not use this file except in compliance with the License. | ||
| 7 | ~ You may obtain a copy of the License at | ||
| 8 | ~ | ||
| 9 | ~ https://www.apache.org/licenses/LICENSE-2.0 | ||
| 10 | ~ | ||
| 11 | ~ Unless required by applicable law or agreed to in writing, software | ||
| 12 | ~ distributed under the License is distributed on an "AS IS" BASIS, | ||
| 13 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 14 | ~ See the License for the specific language governing permissions and | ||
| 15 | ~ limitations under the License. | ||
| 16 | --> | ||
| 17 | <resources> | ||
| 18 | <dimen name="margin_xsmall">16dp</dimen> | ||
| 19 | <dimen name="margin_small">32dp</dimen> | ||
| 20 | <dimen name="margin_medium">48dp</dimen> | ||
| 21 | <dimen name="margin_large">64dp</dimen> | ||
| 22 | <dimen name="margin_xlarge">92dp</dimen> | ||
| 23 | |||
| 24 | <dimen name="spacing_small">4dp</dimen> | ||
| 25 | <dimen name="spacing_medium">8dp</dimen> | ||
| 26 | <dimen name="spacing_large">16dp</dimen> | ||
| 27 | |||
| 28 | <dimen name="round_button_small">32dp</dimen> | ||
| 29 | <dimen name="round_button_medium">64dp</dimen> | ||
| 30 | <dimen name="round_button_large">92dp</dimen> | ||
| 31 | |||
| 32 | <dimen name="shutter_button_margin">80dp</dimen> | ||
| 33 | </resources> \ No newline at end of file | ||
diff --git a/tflite/src/main/res/values/strings.xml b/tflite/src/main/res/values/strings.xml new file mode 100644 index 0000000..dbfb4c0 --- /dev/null +++ b/tflite/src/main/res/values/strings.xml | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <!-- | ||
| 3 | ~ Copyright 2020 Google LLC | ||
| 4 | ~ | ||
| 5 | ~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 6 | ~ you may not use this file except in compliance with the License. | ||
| 7 | ~ You may obtain a copy of the License at | ||
| 8 | ~ | ||
| 9 | ~ https://www.apache.org/licenses/LICENSE-2.0 | ||
| 10 | ~ | ||
| 11 | ~ Unless required by applicable law or agreed to in writing, software | ||
| 12 | ~ distributed under the License is distributed on an "AS IS" BASIS, | ||
| 13 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 14 | ~ See the License for the specific language governing permissions and | ||
| 15 | ~ limitations under the License. | ||
| 16 | --> | ||
| 17 | <resources> | ||
| 18 | <string name="app_name">Camera Object Detector</string> | ||
| 19 | <string name="capture_button_alt">Capture</string> | ||
| 20 | <string name="unknown">UNKNOWN</string> | ||
| 21 | </resources> | ||
diff --git a/tflite/src/main/res/values/styles.xml b/tflite/src/main/res/values/styles.xml new file mode 100644 index 0000000..8bfac62 --- /dev/null +++ b/tflite/src/main/res/values/styles.xml | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <!-- | ||
| 3 | ~ Copyright 2020 Google LLC | ||
| 4 | ~ | ||
| 5 | ~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 6 | ~ you may not use this file except in compliance with the License. | ||
| 7 | ~ You may obtain a copy of the License at | ||
| 8 | ~ | ||
| 9 | ~ https://www.apache.org/licenses/LICENSE-2.0 | ||
| 10 | ~ | ||
| 11 | ~ Unless required by applicable law or agreed to in writing, software | ||
| 12 | ~ distributed under the License is distributed on an "AS IS" BASIS, | ||
| 13 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 14 | ~ See the License for the specific language governing permissions and | ||
| 15 | ~ limitations under the License. | ||
| 16 | --> | ||
| 17 | <resources> | ||
| 18 | |||
| 19 | <!-- Base application theme. --> | ||
| 20 | <style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar"> | ||
| 21 | <item name="android:immersive">true</item> | ||
| 22 | <item name="android:windowFullscreen">true</item> | ||
| 23 | <item name="android:windowTranslucentStatus">true</item> | ||
| 24 | <item name="android:windowTranslucentNavigation">true</item> | ||
| 25 | </style> | ||
| 26 | |||
| 27 | </resources> | ||
