Add account new UI (#692)
Merge branch 'new-account-ui' of codeberg.org:gitnex/GitNex into new-account-ui Merge branch 'master' into new-account-ui Merge branch 'master' of codeberg.org:gitnex/GitNex into master Merge branch 'master' into new-account-ui Transition of adding account to new UI Merge branch 'master' of codeberg.org:gitnex/GitNex into master Merge branch 'master' of codeberg.org:gitnex/GitNex into master endline Co-authored-by: M M Arif <mmarif@swatian.com> Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/692
This commit is contained in:
@@ -55,65 +55,91 @@
|
||||
android:padding="16dp"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/protocolSpinnerLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@drawable/shape_dropdown">
|
||||
app:boxBackgroundColor="?attr/inputBackgroundColor"
|
||||
android:textColorHint="?attr/hintColor"
|
||||
app:hintTextColor="?attr/hintColor"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:hint="@string/protocol"
|
||||
app:endIconTint="?attr/iconsColor"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox.ExposedDropdownMenu">
|
||||
|
||||
<Spinner
|
||||
<AutoCompleteTextView
|
||||
android:id="@+id/protocolSpinner"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="44dp"
|
||||
android:padding="10dp"
|
||||
android:spinnerMode="dropdown" />
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="none"
|
||||
android:textColor="?attr/inputTextColor"
|
||||
android:labelFor="@+id/protocolSpinner"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/instanceUrl"
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/instanceUrlLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:background="@drawable/shape_inputs"
|
||||
android:drawableStart="@drawable/ic_link"
|
||||
android:drawablePadding="10dp"
|
||||
android:hint="@string/instanceUrl"
|
||||
android:inputType="textUri"
|
||||
android:padding="10dp"
|
||||
android:textColor="?attr/inputTextColor"
|
||||
android:textColorHighlight="?attr/hintColor"
|
||||
app:boxBackgroundColor="?attr/inputBackgroundColor"
|
||||
android:textColorHint="?attr/hintColor"
|
||||
android:textSize="14sp"
|
||||
android:autofillHints="@string/instanceUrl" />
|
||||
app:hintTextColor="?attr/hintColor"
|
||||
app:boxStrokeErrorColor="@color/darkRed"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:startIconDrawable="@drawable/ic_link"
|
||||
app:startIconTint="?attr/iconsColor"
|
||||
app:endIconMode="clear_text"
|
||||
app:endIconTint="?attr/iconsColor"
|
||||
android:hint="@string/instanceUrl">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/loginToken"
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/instanceUrl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?attr/inputTextColor"
|
||||
android:textColorHighlight="?attr/hintColor"
|
||||
android:textColorHint="?attr/hintColor"
|
||||
android:maxLines="1"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/loginTokenLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:background="@drawable/shape_inputs"
|
||||
android:drawableStart="@drawable/ic_lock"
|
||||
android:drawablePadding="10dp"
|
||||
android:hint="@string/copyToken"
|
||||
android:inputType="text"
|
||||
android:padding="10dp"
|
||||
android:textColor="?attr/inputTextColor"
|
||||
android:textColorHighlight="?attr/hintColor"
|
||||
app:boxBackgroundColor="?attr/inputBackgroundColor"
|
||||
android:textColorHint="?attr/hintColor"
|
||||
android:textSize="14sp"
|
||||
android:visibility="visible"
|
||||
android:autofillHints="@string/copyToken" />
|
||||
app:hintTextColor="?attr/hintColor"
|
||||
app:boxStrokeErrorColor="@color/darkRed"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:startIconDrawable="@drawable/ic_lock"
|
||||
app:startIconTint="?attr/iconsColor"
|
||||
app:endIconMode="clear_text"
|
||||
app:endIconTint="?attr/iconsColor"
|
||||
android:hint="@string/copyToken">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/loginToken"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?attr/inputTextColor"
|
||||
android:textColorHighlight="?attr/hintColor"
|
||||
android:textColorHint="?attr/hintColor"
|
||||
android:maxLines="1"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/addNewAccount"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:text="@string/addNewAccountText"
|
||||
android:textColor="@color/btnTextColor"
|
||||
|
||||
12
app/src/main/res/layout/list_spinner_items.xml
Normal file
12
app/src/main/res/layout/list_spinner_items.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:padding="16dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
tools:ignore="MissingConstraints"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android" />
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
<item name="pagerTabIndicatorColor">@color/darkGreen</item>
|
||||
<item name="android:actionOverflowButtonStyle">@style/customOverflowButtonStyle</item>
|
||||
<item name="actionOverflowMenuStyle">@style/customOverflowMenuStyle</item>
|
||||
<item name="colorSurface">@color/lightThemeInputBackground</item>
|
||||
</style>
|
||||
<!-- Light theme -->
|
||||
|
||||
@@ -73,6 +74,7 @@
|
||||
<item name="pagerTabIndicatorColor">@color/retroThemeColorPrimary</item>
|
||||
<item name="android:actionOverflowButtonStyle">@style/customOverflowButtonStyle</item>
|
||||
<item name="actionOverflowMenuStyle">@style/customOverflowMenuStyle</item>
|
||||
<item name="colorSurface">@color/retroThemeInputBackground</item>
|
||||
</style>
|
||||
<!-- Retro theme -->
|
||||
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
<string name="navigation_drawer_open">Open Navigation Drawer</string>
|
||||
<string name="navigation_drawer_close">Close Navigation Drawer</string>
|
||||
<string name="logo">Login to Gitea</string>
|
||||
<string name="protocol">Protocol</string>
|
||||
<string name="urlInfoTooltip">1- Choose the correct protocol(https or http). \n2- Enter Gitea url e.g: try.gitea.io. \n3- If you have enabled 2FA for your account, enter the code in the OTP Code field. \n4- For HTTP basic auth use USERNAME@DOMAIN.COM in the URL field.</string>
|
||||
<string name="malformedUrl">Couldn\'t connect to host. Please check your URL or port for any errors</string>
|
||||
<string name="protocolError">It is not recommended to use HTTP protocol unless you are testing on local network</string>
|
||||
@@ -93,6 +94,7 @@
|
||||
<string name="emptyFieldURL">Instance URL is required</string>
|
||||
<string name="emptyFieldUsername">Username is required</string>
|
||||
<string name="emptyFieldPassword">Password is required</string>
|
||||
<string name="protocolEmptyError">Protocol is required</string>
|
||||
|
||||
<string name="checkNetConnection">Cannot access network, please check your Internet connection</string>
|
||||
<string name="netConnectionIsBack">Yay, We have Internet connection!</string>
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
<item name="pagerTabIndicatorColor">@color/darkGreen</item>
|
||||
<item name="android:actionOverflowButtonStyle">@style/customOverflowButtonStyle</item>
|
||||
<item name="actionOverflowMenuStyle">@style/customOverflowMenuStyle</item>
|
||||
<item name="colorSurface">@color/inputBackground</item>
|
||||
</style>
|
||||
<!-- Dark theme - default -->
|
||||
|
||||
@@ -72,6 +73,7 @@
|
||||
<item name="pagerTabIndicatorColor">@color/darkGreen</item>
|
||||
<item name="android:actionOverflowButtonStyle">@style/customOverflowButtonStyle</item>
|
||||
<item name="actionOverflowMenuStyle">@style/customOverflowMenuStyle</item>
|
||||
<item name="colorSurface">@color/lightThemeInputBackground</item>
|
||||
</style>
|
||||
<!-- Light theme -->
|
||||
|
||||
@@ -109,6 +111,7 @@
|
||||
<item name="pagerTabIndicatorColor">@color/retroThemeColorPrimary</item>
|
||||
<item name="android:actionOverflowButtonStyle">@style/customOverflowButtonStyle</item>
|
||||
<item name="actionOverflowMenuStyle">@style/customOverflowMenuStyle</item>
|
||||
<item name="colorSurface">@color/retroThemeInputBackground</item>
|
||||
</style>
|
||||
<!-- Retro theme -->
|
||||
|
||||
|
||||
Reference in New Issue
Block a user