summaryrefslogtreecommitdiffstats
path: root/app/src/main/res
diff options
context:
space:
mode:
authorMaksymilian Jopek <maks@jopek.eu>2022-09-22 20:25:19 +0200
committerMaksymilian Jopek <maks@jopek.eu>2022-09-22 20:25:19 +0200
commitd191a1cfc5ec76fd9985a0878b42775dbe1eddf8 (patch)
treef93cb7fb6de2abc9f178987f081865ce43aed0d9 /app/src/main/res
parent36703c46b11a2300cdbba219628fc63be5bde7c3 (diff)
downloadlector-de-codi-d191a1cfc5ec76fd9985a0878b42775dbe1eddf8.tar.gz
lector-de-codi-d191a1cfc5ec76fd9985a0878b42775dbe1eddf8.tar.zst
lector-de-codi-d191a1cfc5ec76fd9985a0878b42775dbe1eddf8.zip
All / settings logic
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/drawable/ic_baseline_settings_24.xml5
-rw-r--r--app/src/main/res/layout/fragment_barcode_gen.xml10
-rw-r--r--app/src/main/res/layout/fragment_qrcode_gen.xml44
-rw-r--r--app/src/main/res/layout/fragment_settings.xml55
-rw-r--r--app/src/main/res/menu/activity_main_drawer.xml8
-rw-r--r--app/src/main/res/menu/main.xml10
-rw-r--r--app/src/main/res/navigation/mobile_navigation.xml6
-rw-r--r--app/src/main/res/values/strings.xml1
8 files changed, 132 insertions, 7 deletions
diff --git a/app/src/main/res/drawable/ic_baseline_settings_24.xml b/app/src/main/res/drawable/ic_baseline_settings_24.xml
new file mode 100644
index 0000000..298a5a1
--- /dev/null
+++ b/app/src/main/res/drawable/ic_baseline_settings_24.xml
@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:tint="#000000"
+ android:viewportHeight="24" android:viewportWidth="24"
+ android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="@android:color/white" android:pathData="M19.14,12.94c0.04,-0.3 0.06,-0.61 0.06,-0.94c0,-0.32 -0.02,-0.64 -0.07,-0.94l2.03,-1.58c0.18,-0.14 0.23,-0.41 0.12,-0.61l-1.92,-3.32c-0.12,-0.22 -0.37,-0.29 -0.59,-0.22l-2.39,0.96c-0.5,-0.38 -1.03,-0.7 -1.62,-0.94L14.4,2.81c-0.04,-0.24 -0.24,-0.41 -0.48,-0.41h-3.84c-0.24,0 -0.43,0.17 -0.47,0.41L9.25,5.35C8.66,5.59 8.12,5.92 7.63,6.29L5.24,5.33c-0.22,-0.08 -0.47,0 -0.59,0.22L2.74,8.87C2.62,9.08 2.66,9.34 2.86,9.48l2.03,1.58C4.84,11.36 4.8,11.69 4.8,12s0.02,0.64 0.07,0.94l-2.03,1.58c-0.18,0.14 -0.23,0.41 -0.12,0.61l1.92,3.32c0.12,0.22 0.37,0.29 0.59,0.22l2.39,-0.96c0.5,0.38 1.03,0.7 1.62,0.94l0.36,2.54c0.05,0.24 0.24,0.41 0.48,0.41h3.84c0.24,0 0.44,-0.17 0.47,-0.41l0.36,-2.54c0.59,-0.24 1.13,-0.56 1.62,-0.94l2.39,0.96c0.22,0.08 0.47,0 0.59,-0.22l1.92,-3.32c0.12,-0.22 0.07,-0.47 -0.12,-0.61L19.14,12.94zM12,15.6c-1.98,0 -3.6,-1.62 -3.6,-3.6s1.62,-3.6 3.6,-3.6s3.6,1.62 3.6,3.6S13.98,15.6 12,15.6z"/>
+</vector>
diff --git a/app/src/main/res/layout/fragment_barcode_gen.xml b/app/src/main/res/layout/fragment_barcode_gen.xml
index caec265..c90f4a7 100644
--- a/app/src/main/res/layout/fragment_barcode_gen.xml
+++ b/app/src/main/res/layout/fragment_barcode_gen.xml
@@ -39,7 +39,6 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
-
<ImageView
android:id="@+id/barcode_img"
android:layout_width="wrap_content"
@@ -53,4 +52,13 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
+ <Button
+ android:id="@+id/btn_save_barcode"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Save Barcode"
+ android:layout_marginBottom="80dp"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_qrcode_gen.xml b/app/src/main/res/layout/fragment_qrcode_gen.xml
index c35eb6c..ebe8c00 100644
--- a/app/src/main/res/layout/fragment_qrcode_gen.xml
+++ b/app/src/main/res/layout/fragment_qrcode_gen.xml
@@ -7,9 +7,42 @@
tools:context=".ui.qrcode_gen.QRCodeGenFragment">
<TextView
- android:id="@+id/text_slideshow"
+ android:id="@id/edit_text_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:text="Gimme text to encode in qrcode"
+ android:textAlignment="center"
+ android:layout_marginTop="40dp"
+ android:textSize="20sp"
+ app:layout_constraintStart_toEndOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent" />
+ <EditText
+ android:labelFor="@+id/edit_text_label"
+ android:id="@+id/plain_text_inputt"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:inputType="text"
+ android:layout_marginTop="80dp"
+ app:layout_constraintStart_toEndOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent" />
+ <Button
+ android:id="@+id/btn_gen_barcode"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Generate QRcode"
+ android:layout_marginTop="160dp"
+ app:layout_constraintStart_toEndOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent" />
+ <ImageView
+ android:id="@+id/barcode_img"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
@@ -19,4 +52,13 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
+ <Button
+ android:id="@+id/btn_save_barcode"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Save QRCode"
+ android:layout_marginBottom="80dp"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_settings.xml b/app/src/main/res/layout/fragment_settings.xml
new file mode 100644
index 0000000..ac387fb
--- /dev/null
+++ b/app/src/main/res/layout/fragment_settings.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ tools:context=".ui.settings.SettingsFragment">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical">
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="Where to save pictures?"
+ android:textAlignment="center"
+ android:layout_marginTop="40dp"
+ android:gravity="center"
+ android:textSize="20sp" />
+ <EditText
+ android:id="@+id/et_where_save"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:inputType="text"
+ android:layout_marginTop="10dp" />
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="Width of saved image"
+ android:textAlignment="center"
+ android:layout_marginTop="40dp"
+ android:gravity="center"
+ android:textSize="20sp" />
+ <EditText
+ android:id="@+id/et_save_width"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:inputType="numberDecimal"
+ android:layout_marginTop="10dp" />
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="Height of saved image"
+ android:textAlignment="center"
+ android:layout_marginTop="40dp"
+ android:gravity="center"
+ android:textSize="20sp" />
+ <EditText
+ android:id="@+id/et_save_height"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:inputType="numberDecimal"
+ android:layout_marginTop="10dp" />
+ </LinearLayout>
+</FrameLayout> \ No newline at end of file
diff --git a/app/src/main/res/menu/activity_main_drawer.xml b/app/src/main/res/menu/activity_main_drawer.xml
index b8ed546..6d45cac 100644
--- a/app/src/main/res/menu/activity_main_drawer.xml
+++ b/app/src/main/res/menu/activity_main_drawer.xml
@@ -24,5 +24,13 @@
android:title="@string/menu_qrcode_gen" />
</menu>
</item>
+ <item android:title="SETTINGS">
+ <menu>
+ <item
+ android:id="@+id/nav_settings"
+ android:icon="@drawable/ic_baseline_settings_24"
+ android:title="Settings" />
+ </menu>
+ </item>
</group>
</menu> \ No newline at end of file
diff --git a/app/src/main/res/menu/main.xml b/app/src/main/res/menu/main.xml
index 412d5f8..28b13c5 100644
--- a/app/src/main/res/menu/main.xml
+++ b/app/src/main/res/menu/main.xml
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
- <item
- android:id="@+id/action_settings"
- android:orderInCategory="100"
- android:title="@string/action_settings"
- app:showAsAction="never" />
+<!-- <item-->
+<!-- android:id="@+id/action_settings"-->
+<!-- android:orderInCategory="100"-->
+<!-- android:title="@string/action_settings"-->
+<!-- app:showAsAction="never" />-->
</menu> \ No newline at end of file
diff --git a/app/src/main/res/navigation/mobile_navigation.xml b/app/src/main/res/navigation/mobile_navigation.xml
index 23328c9..86c8cd6 100644
--- a/app/src/main/res/navigation/mobile_navigation.xml
+++ b/app/src/main/res/navigation/mobile_navigation.xml
@@ -22,4 +22,10 @@
android:name="com.jopek.lectordecodi.ui.qrcode_gen.QRCodeGenFragment"
android:label="@string/menu_qrcode_gen"
tools:layout="@layout/fragment_qrcode_gen" />
+
+ <fragment
+ android:id="@+id/nav_settings"
+ android:name="com.jopek.lectordecodi.ui.settings.SettingsFragment"
+ android:label="@string/menu_settings"
+ tools:layout="@layout/fragment_qrcode_gen" />
</navigation> \ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 1a3ac07..7c65a0c 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -13,4 +13,5 @@
<string name="menu_reader">QbarRCode Reader</string>
<string name="menu_barcode_gen">Barcode generator</string>
<string name="menu_qrcode_gen">QR Code Generator</string>
+ <string name="menu_settings">Settings</string>
</resources> \ No newline at end of file