Basic create activity implemented
10
app/src/main/res/drawable-anydpi/baseline_sd_storage_24.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#fff"
|
||||
android:pathData="M18,2h-8L4.02,8 4,20c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,4c0,-1.1 -0.9,-2 -2,-2zM12,8h-2L10,4h2v4zM15,8h-2L13,4h2v4zM18,8h-2L16,4h2v4z" />
|
||||
</vector>
|
||||
10
app/src/main/res/drawable-anydpi/ic_compress.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<!-- drawable/zip_box_outline.xml -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="48dp"
|
||||
android:width="48dp"
|
||||
android:viewportWidth="26"
|
||||
android:viewportHeight="26">
|
||||
<path
|
||||
android:fillColor="#fff"
|
||||
android:pathData="M12 17V15H14V17H12M14 13V11H12V13H14M14 9V7H12V9H14M10 11H12V9H10V11M10 15H12V13H10V15M21 5V19C21 20.1 20.1 21 19 21H5C3.9 21 3 20.1 3 19V5C3 3.9 3.9 3 5 3H19C20.1 3 21 3.9 21 5M19 5H12V7H10V5H5V19H19V5Z" />
|
||||
</vector>
|
||||
10
app/src/main/res/drawable-anydpi/printer.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<!-- drawable/printer.xml -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="24dp"
|
||||
android:width="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M18,3H6V7H18M19,12A1,1 0 0,1 18,11A1,1 0 0,1 19,10A1,1 0 0,1 20,11A1,1 0 0,1 19,12M16,19H8V14H16M19,8H5A3,3 0 0,0 2,11V17H6V21H18V17H22V11A3,3 0 0,0 19,8Z" />
|
||||
</vector>
|
||||
|
After Width: | Height: | Size: 152 B |
|
After Width: | Height: | Size: 159 B |
|
After Width: | Height: | Size: 193 B |
|
After Width: | Height: | Size: 206 B |
BIN
app/src/main/res/drawable-hdpi/baseline_settings_white_18.png
Normal file
|
After Width: | Height: | Size: 364 B |
BIN
app/src/main/res/drawable-hdpi/baseline_settings_white_24.png
Normal file
|
After Width: | Height: | Size: 460 B |
BIN
app/src/main/res/drawable-hdpi/baseline_settings_white_36.png
Normal file
|
After Width: | Height: | Size: 627 B |
BIN
app/src/main/res/drawable-hdpi/baseline_settings_white_48.png
Normal file
|
After Width: | Height: | Size: 788 B |
|
After Width: | Height: | Size: 118 B |
|
After Width: | Height: | Size: 123 B |
|
After Width: | Height: | Size: 159 B |
|
After Width: | Height: | Size: 162 B |
BIN
app/src/main/res/drawable-mdpi/baseline_settings_white_18.png
Normal file
|
After Width: | Height: | Size: 264 B |
BIN
app/src/main/res/drawable-mdpi/baseline_settings_white_24.png
Normal file
|
After Width: | Height: | Size: 345 B |
BIN
app/src/main/res/drawable-mdpi/baseline_settings_white_36.png
Normal file
|
After Width: | Height: | Size: 460 B |
BIN
app/src/main/res/drawable-mdpi/baseline_settings_white_48.png
Normal file
|
After Width: | Height: | Size: 554 B |
|
After Width: | Height: | Size: 159 B |
|
After Width: | Height: | Size: 162 B |
|
After Width: | Height: | Size: 206 B |
|
After Width: | Height: | Size: 240 B |
BIN
app/src/main/res/drawable-xhdpi/baseline_settings_white_18.png
Normal file
|
After Width: | Height: | Size: 460 B |
BIN
app/src/main/res/drawable-xhdpi/baseline_settings_white_24.png
Normal file
|
After Width: | Height: | Size: 554 B |
BIN
app/src/main/res/drawable-xhdpi/baseline_settings_white_36.png
Normal file
|
After Width: | Height: | Size: 788 B |
BIN
app/src/main/res/drawable-xhdpi/baseline_settings_white_48.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 193 B |
|
After Width: | Height: | Size: 206 B |
|
After Width: | Height: | Size: 271 B |
|
After Width: | Height: | Size: 276 B |
BIN
app/src/main/res/drawable-xxhdpi/baseline_settings_white_18.png
Normal file
|
After Width: | Height: | Size: 627 B |
BIN
app/src/main/res/drawable-xxhdpi/baseline_settings_white_24.png
Normal file
|
After Width: | Height: | Size: 788 B |
BIN
app/src/main/res/drawable-xxhdpi/baseline_settings_white_36.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
app/src/main/res/drawable-xxhdpi/baseline_settings_white_48.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 206 B |
|
After Width: | Height: | Size: 240 B |
|
After Width: | Height: | Size: 276 B |
|
After Width: | Height: | Size: 370 B |
BIN
app/src/main/res/drawable-xxxhdpi/baseline_settings_white_18.png
Normal file
|
After Width: | Height: | Size: 788 B |
BIN
app/src/main/res/drawable-xxxhdpi/baseline_settings_white_24.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/baseline_settings_white_36.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/baseline_settings_white_48.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
10
app/src/main/res/drawable/baseline_arrow_forward_24.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,4l-1.41,1.41L16.17,11H4v2h12.17l-5.58,5.59L12,20l8,-8z"/>
|
||||
</vector>
|
||||
30
app/src/main/res/layout-v28/fragment_text_input.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?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=".TextInput">
|
||||
|
||||
<!-- TODO: Update blank fragment layout -->
|
||||
<TextView
|
||||
android:id="@+id/head"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:textColor="@color/colorPrimaryDark"
|
||||
android:text="@string/text_input_head_undefined" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editTextTextPersonName"
|
||||
style="@style/Widget.AppCompat.EditText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:ems="15"
|
||||
android:inputType="textPersonName"
|
||||
android:singleLine="true"
|
||||
android:textFontWeight="600"
|
||||
android:textSize="30sp"
|
||||
android:background="@color/colorPrimary"
|
||||
android:hint="@string/text_input_title_undefined" />
|
||||
|
||||
</FrameLayout>
|
||||
97
app/src/main/res/layout/activity_create.xml
Normal file
@@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
style="@style/AppTheme"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".CreateActivity">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/colorPrimaryDark"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:title="Create">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/textView4"
|
||||
style="@style/Widget.AppCompat.Button.Colored"
|
||||
android:layout_width="86dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_margin="0dp"
|
||||
android:backgroundTint="#F8F8F8"
|
||||
android:padding="0dp"
|
||||
android:src="@drawable/printer"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="24sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/back"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:src="@drawable/baseline_arrow_forward_white_36"
|
||||
android:text=""
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/settings"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginEnd="60dp"
|
||||
android:scaleX="1"
|
||||
android:scaleY="1"
|
||||
android:src="@drawable/baseline_settings_white_36"
|
||||
android:text=""
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/settings2"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="54dp"
|
||||
android:layout_height="37dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="116dp"
|
||||
android:src="@drawable/ic_compress"
|
||||
android:text=""
|
||||
android:textColor="#000000"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/title"
|
||||
android:name="com.github.mondei1.offpass.TextInput"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="32dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/toolbar" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/username"
|
||||
android:name="com.github.mondei1.offpass.TextInput"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="10dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/title" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -66,7 +66,7 @@
|
||||
app:srcCompat="@android:drawable/ic_menu_set_as" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/imageButton2"
|
||||
android:id="@+id/add_button"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:layout_height="120dp"
|
||||
android:layout_weight="1"
|
||||
@@ -90,12 +90,13 @@
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:fontFamily="@font/righteous"
|
||||
android:text="ALPHA"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="36sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
tools:layout_editor_absoluteX="291dp" />
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
64
app/src/main/res/layout/create_bar.xml
Normal file
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.appcompat.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@color/colorPrimaryDark"
|
||||
app:title="Create">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<Button
|
||||
android:id="@+id/back"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="47dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:drawableTop="@drawable/baseline_arrow_forward_white_36"
|
||||
android:text=""
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/settings"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginEnd="52dp"
|
||||
android:drawableTop="@drawable/baseline_settings_white_36"
|
||||
android:scaleX="1"
|
||||
android:scaleY="1"
|
||||
android:text=""
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/settings2"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginEnd="108dp"
|
||||
android:drawableTop="@drawable/baseline_sd_storage_24"
|
||||
android:scaleX="1"
|
||||
android:scaleY="1"
|
||||
android:text=""
|
||||
android:textColor="#000000"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="Create"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="24sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
31
app/src/main/res/layout/fragment_text_input.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?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=".TextInput">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/head"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/text_input_head_undefined"
|
||||
android:textAllCaps="false"
|
||||
|
||||
android:textColor="@color/colorPrimaryDark"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/title"
|
||||
style="@style/Widget.AppCompat.EditText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:ems="15"
|
||||
android:inputType="textPersonName"
|
||||
android:singleLine="true"
|
||||
android:textStyle="bold"
|
||||
android:textSize="30sp"
|
||||
android:hint="@string/text_input_title_undefined" />
|
||||
|
||||
</FrameLayout>
|
||||
3
app/src/main/res/values-round/strings.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<resources>
|
||||
<string name="hello_world">Hello Round World!</string>
|
||||
</resources>
|
||||
15
app/src/main/res/values/dimens.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!--
|
||||
Because the window insets on round devices are larger than 15dp, this padding only applies
|
||||
to square screens.
|
||||
-->
|
||||
<dimen name="box_inset_layout_padding">0dp</dimen>
|
||||
|
||||
<!--
|
||||
This padding applies to both square and round screens. The total padding between the buttons
|
||||
and the window insets is box_inset_layout_padding (above variable) on square screens and
|
||||
inner_frame_layout_padding (below variable) on round screens.
|
||||
-->
|
||||
<dimen name="inner_frame_layout_padding">5dp</dimen>
|
||||
</resources>
|
||||
@@ -1,3 +1,11 @@
|
||||
<resources>
|
||||
<string name="app_name">OffPass</string>
|
||||
<string name="title_activity_create">CreateActivity</string>
|
||||
<!--
|
||||
This string is used for square devices and overridden by hello_world in
|
||||
values-round/strings.xml for round devices.
|
||||
-->
|
||||
|
||||
<string name="text_input_head_undefined">HEAD UNDEFINED</string>
|
||||
<string name="text_input_title_undefined">TITLE UNDEFINED</string>
|
||||
</resources>
|
||||
@@ -1,10 +1,17 @@
|
||||
<resources>
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<item name="android:actionBarStyle">@style/OffPassActionbar</item>
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">#fff</item>
|
||||
<item name="android:statusBarColor">@color/colorPrimaryDark</item>
|
||||
</style>
|
||||
|
||||
<style name="OffPassActionbar" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="background">@color/colorPrimaryDark</item>
|
||||
<item name="android:foreground">@color/colorPrimary</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||