mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-07-05 20:42:08 -07:00
Android Regist UI
This commit is contained in:
parent
b11bc55d9f
commit
5279868ba0
9 changed files with 242 additions and 13 deletions
|
@ -38,7 +38,8 @@
|
|||
<activity
|
||||
android:name=".regist.RegistActivity"
|
||||
android:theme="@style/MageTheme"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"/>
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
|
||||
android:windowSoftInputMode="adjustResize"/>
|
||||
</application>
|
||||
|
||||
</manifest>
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="?attr/colorAccent" android:state_focused="true"/>
|
||||
<item android:alpha="0.87" android:color="?attr/colorOnSurface" android:state_hovered="true"/>
|
||||
<item android:alpha="0.12" android:color="?attr/colorOnSurface" android:state_enabled="false"/>
|
||||
<item android:alpha="0.38" android:color="?attr/colorOnSurface"/>
|
||||
</selector>
|
|
@ -1,4 +1,4 @@
|
|||
<vector android:height="24dp" android:viewportHeight="24"
|
||||
android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="?attr/colorOnSurface" android:pathData="M22.99,9C19.15,5.16 13.8,3.76 8.84,4.78l2.52,2.52c3.47,-0.17 6.99,1.05 9.63,3.7l2,-2zM18.99,13c-1.29,-1.29 -2.84,-2.13 -4.49,-2.56l3.53,3.53 0.96,-0.97zM2,3.05L5.07,6.1C3.6,6.82 2.22,7.78 1,9l1.99,2c1.24,-1.24 2.67,-2.16 4.2,-2.77l2.24,2.24C7.81,10.89 6.27,11.73 5,13v0.01L6.99,15c1.36,-1.36 3.14,-2.04 4.92,-2.06L18.98,20l1.27,-1.26L3.29,1.79 2,3.05zM9,17l3,3 3,-3c-1.65,-1.66 -4.34,-1.66 -6,0z"/>
|
||||
<path android:fillColor="?android:attr/textColorSecondary" android:pathData="M22.99,9C19.15,5.16 13.8,3.76 8.84,4.78l2.52,2.52c3.47,-0.17 6.99,1.05 9.63,3.7l2,-2zM18.99,13c-1.29,-1.29 -2.84,-2.13 -4.49,-2.56l3.53,3.53 0.96,-0.97zM2,3.05L5.07,6.1C3.6,6.82 2.22,7.78 1,9l1.99,2c1.24,-1.24 2.67,-2.16 4.2,-2.77l2.24,2.24C7.81,10.89 6.27,11.73 5,13v0.01L6.99,15c1.36,-1.36 3.14,-2.04 4.92,-2.06L18.98,20l1.27,-1.26L3.29,1.79 2,3.05zM9,17l3,3 3,-3c-1.65,-1.66 -4.34,-1.66 -6,0z"/>
|
||||
</vector>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<vector android:height="24dp" android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="?attr/colorOnSurface" android:pathData="M1,9l2,2c4.97,-4.97 13.03,-4.97 18,0l2,-2C16.93,2.93 7.08,2.93 1,9zM9,17l3,3 3,-3c-1.65,-1.66 -4.34,-1.66 -6,0zM5,13l2,2c2.76,-2.76 7.24,-2.76 10,0l2,-2C15.14,9.14 8.87,9.14 5,13z"/>
|
||||
<path android:fillColor="?android:attr/textColorSecondary" android:pathData="M1,9l2,2c4.97,-4.97 13.03,-4.97 18,0l2,-2C16.93,2.93 7.08,2.93 1,9zM9,17l3,3 3,-3c-1.65,-1.66 -4.34,-1.66 -6,0zM5,13l2,2c2.76,-2.76 7.24,-2.76 10,0l2,-2C15.14,9.14 8.87,9.14 5,13z"/>
|
||||
</vector>
|
||||
|
|
17
android/app/src/main/res/drawable/ic_regist_console.xml
Normal file
17
android/app/src/main/res/drawable/ic_regist_console.xml
Normal file
|
@ -0,0 +1,17 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="512dp"
|
||||
android:height="128dp"
|
||||
android:viewportWidth="135.46666"
|
||||
android:viewportHeight="33.86667">
|
||||
<path
|
||||
android:pathData="m11.331,7.41 l-4.693,7.889L70.036,15.299c0.24,-2.845 1.1,-5.519 2.445,-7.889zM4.693,18.568 L0,26.457h72.482c-1.345,-2.37 -2.205,-5.044 -2.446,-7.889z"
|
||||
android:strokeAlpha="1"
|
||||
android:strokeWidth="14.0576067"
|
||||
android:fillColor="#000000"
|
||||
android:strokeColor="#00000000"
|
||||
android:fillAlpha="1"/>
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="m79.862,16.933c0,-5.253 4.27,-9.523 9.523,-9.523h12.288v-5.837L89.386,1.573c-8.479,0 -15.36,6.881 -15.36,15.36 0,8.479 6.881,15.36 15.36,15.36L101.674,32.294L101.674,26.457L89.386,26.457c-5.253,0 -9.523,-4.27 -9.523,-9.523zM92.458,20.005h24.576v-6.144L92.458,13.861ZM120.106,1.573h-12.288v5.837h12.288c5.253,0 9.523,4.27 9.523,9.523 0,5.253 -4.27,9.523 -9.523,9.523h-12.288v5.837h12.288c8.479,0 15.36,-6.881 15.36,-15.36 0,-8.479 -6.881,-15.36 -15.36,-15.36z"
|
||||
android:strokeWidth="3.07205129"/>
|
||||
</vector>
|
|
@ -36,7 +36,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
app:layout_behavior=".main.FloatingActionButtonSpeedDialBehavior"
|
||||
android:gravity="right">
|
||||
android:gravity="right"
|
||||
android:clipChildren="false">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -113,7 +114,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:background="?attr/colorPrimarySurface"
|
||||
app:layout_scrollFlags="scroll|enterAlways">
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
android:theme="@style/AppTheme.Toolbar">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
|
|
|
@ -1,10 +1,108 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/rootLayout"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?android:attr/windowBackground">
|
||||
<ScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/rootLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?android:attr/windowBackground"
|
||||
android:scrollbars="none">
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<ImageView
|
||||
android:id="@+id/iconImageView"
|
||||
android:layout_width="256dp"
|
||||
android:layout_height="64dp"
|
||||
android:src="@drawable/ic_regist_console"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:tint="?attr/colorOnPrimary"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginTop="16dp"/>
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/titleTextView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Register Console"
|
||||
android:textSize="32dp"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="16dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/iconImageView"
|
||||
android:textAppearance="?attr/textAppearanceHeadline1"/>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/hostTextInputLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="Host"
|
||||
app:startIconDrawable="@drawable/ic_register"
|
||||
app:layout_constraintTop_toBottomOf="@id/titleTextView"
|
||||
android:layout_marginTop="32dp">
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.checkbox.MaterialCheckBox
|
||||
android:id="@+id/broadcastCheckBox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/hostTextInputLayout"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:text="Broadcast"/>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/psnIdTextInputLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="PSN ID (username, case-sensitive)"
|
||||
app:startIconDrawable="@drawable/ic_register"
|
||||
app:layout_constraintTop_toBottomOf="@id/broadcastCheckBox"
|
||||
android:layout_marginTop="16dp">
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/pinHelpTextView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Navigate to Settings -> Whatever to obtain the PIN"
|
||||
app:layout_constraintTop_toBottomOf="@id/psnIdTextInputLayout"
|
||||
android:textAppearance="?attr/textAppearanceBody1"
|
||||
android:layout_marginTop="32dp"/>
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/pinTextInputLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="PIN"
|
||||
app:startIconDrawable="@drawable/ic_register"
|
||||
app:layout_constraintTop_toBottomOf="@id/pinHelpTextView"
|
||||
android:layout_marginTop="16dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/pinTextInputLayout"
|
||||
style="@style/MageTheme.Button"
|
||||
android:text="Register"
|
||||
android:layout_marginTop="32dp" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</ScrollView>
|
||||
|
|
|
@ -12,6 +12,10 @@
|
|||
<item name="android:windowActivityTransitions">true</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.Toolbar" parent="AppTheme">
|
||||
<item name="android:textColorSecondary">#fff</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.FloatingActionButtonSpeedDial">
|
||||
<item name="tint">@color/floating_action_button_speed_dial_tint</item>
|
||||
<item name="android:backgroundTint">@color/floating_action_button_speed_dial_background</item>
|
||||
|
@ -32,12 +36,37 @@
|
|||
<item name="colorControlNormal">@color/accent</item>
|
||||
<item name="colorButtonNormal">@color/accent</item>
|
||||
<item name="android:textAppearanceButton">@style/TextAppearanceButton</item>
|
||||
<item name="android:textColor">?attr/colorOnPrimary</item>
|
||||
|
||||
<item name="textAppearanceHeadline1">@style/MageTheme.TextAppearanceHeadline1</item>
|
||||
|
||||
<item name="android:colorControlActivated">?attr/colorAccent</item>
|
||||
<item name="android:colorControlHighlight">?attr/colorAccent</item>
|
||||
|
||||
<item name="textInputStyle">@style/MageTheme.TextInputStyle</item>
|
||||
|
||||
<item name="android:windowActivityTransitions">true</item>
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
|
||||
</style>
|
||||
|
||||
<style name="MageTheme.TextAppearanceHeadline1" parent="TextAppearance.MaterialComponents.Headline1">
|
||||
<item name="fontFamily">sans-serif-condensed-light</item>
|
||||
</style>
|
||||
|
||||
<style name="MageTheme.TextInputStyle" parent="Widget.MaterialComponents.TextInputLayout.FilledBox">
|
||||
<item name="hintTextColor">?attr/colorAccent</item>
|
||||
<item name="boxCornerRadiusTopStart">16dp</item>
|
||||
<item name="boxCornerRadiusTopEnd">16dp</item>
|
||||
<item name="boxStrokeColor">@color/mage_text_input_box_stroke</item>
|
||||
</style>
|
||||
|
||||
<style name="MageTheme.Button" parent="Widget.MaterialComponents.Button">
|
||||
<item name="tint">?attr/colorOnSecondary</item>
|
||||
<item name="android:backgroundTint">?attr/colorSecondary</item>
|
||||
<item name="android:textColor">?attr/colorOnSecondary</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearanceButton" parent="TextAppearance.MaterialComponents.Button">
|
||||
<item name="android:textColor">?attr/colorOnSecondary</item>
|
||||
</style>
|
||||
|
|
75
assets/regist_console.svg
Normal file
75
assets/regist_console.svg
Normal file
|
@ -0,0 +1,75 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="512"
|
||||
height="128"
|
||||
viewBox="0 0 135.46666 33.866667"
|
||||
version="1.1"
|
||||
id="svg965"
|
||||
inkscape:version="0.92.4 5da689c313, 2019-01-14"
|
||||
sodipodi:docname="regist_console.svg">
|
||||
<defs
|
||||
id="defs959" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.7"
|
||||
inkscape:cx="51.850789"
|
||||
inkscape:cy="-28.019222"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
inkscape:window-width="1918"
|
||||
inkscape:window-height="1048"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="15"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:object-paths="true"
|
||||
inkscape:lockguides="true" />
|
||||
<metadata
|
||||
id="metadata962">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Ebene 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-263.13332)">
|
||||
<g
|
||||
id="g936"
|
||||
transform="translate(0,-1.5730817)">
|
||||
<path
|
||||
sodipodi:nodetypes="cccccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path950"
|
||||
d="m 11.331465,272.11625 -4.6931241,7.88903 H 70.036206 c 0.240423,-2.8445 1.100465,-5.51908 2.445287,-7.88903 z M 4.6931248,283.27458 0,291.1631 h 72.481988 c -1.344886,-2.36971 -2.205309,-5.04406 -2.445782,-7.88852 z"
|
||||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:14.0576067;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
d="m 79.862257,281.63975 c 0,-5.25322 4.270154,-9.52337 9.523364,-9.52337 h 12.288209 v -5.8369 H 89.385621 c -8.478855,0 -15.360254,6.88139 -15.360254,15.36027 0,8.47885 6.881399,15.36024 15.360254,15.36024 H 101.67383 V 291.1631 H 89.385621 c -5.25321,0 -9.523364,-4.27015 -9.523364,-9.52335 z m 12.595413,3.07205 h 24.57642 v -6.14411 H 92.45767 Z m 27.64847,-18.43232 h -12.2882 v 5.8369 h 12.2882 c 5.25322,0 9.52338,4.27015 9.52338,9.52337 0,5.2532 -4.27016,9.52335 -9.52338,9.52335 h -12.2882 v 5.83689 h 12.2882 c 8.47886,0 15.36025,-6.88139 15.36025,-15.36024 0,-8.47888 -6.88139,-15.36027 -15.36025,-15.36027 z"
|
||||
id="path891"
|
||||
style="stroke-width:3.07205129" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3 KiB |
Loading…
Add table
Add a link
Reference in a new issue