Extend explore repositories search (#703)

Merge branch 'master' into improve-explore-screen

improve email address input ui

Add filter query actions

Add radio buttons

improve nav accounts list images

Merge branch 'master' into improve-explore-screen

# Conflicts:
#	app/src/main/res/values/strings.xml

Implement dialog and use new input layout

Co-authored-by: M M Arif <mmarif@swatian.com>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/703
This commit is contained in:
M M Arif
2020-09-27 09:55:59 +02:00
parent bf19e52799
commit d20a773d1d
9 changed files with 326 additions and 46 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:layout_width="match_parent"
<LinearLayout android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="?attr/primaryBackgroundColor">
@ -50,27 +50,30 @@
android:padding="16dp"
android:orientation="vertical">
<TextView
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/userEmailLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/profileEmailTitle"
android:textColor="?attr/primaryTextColor"
android:textSize="16sp" />
<EditText
android:id="@+id/userEmail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:padding="10dp"
android:textSize="14sp"
tools:ignore="Autofill"
android:inputType="textEmailAddress"
android:labelFor="@+id/userEmail"
android:background="@drawable/shape_inputs"
android:textColor="?attr/inputTextColor"
app:boxBackgroundColor="?attr/inputBackgroundColor"
android:textColorHint="?attr/hintColor"
android:textColorHighlight="?attr/primaryTextColor"/>
app:hintTextColor="?attr/hintColor"
app:boxStrokeErrorColor="@color/darkRed"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
app:endIconMode="clear_text"
app:endIconTint="?attr/iconsColor"
android:hint="@string/profileEmailTitle">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/userEmail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:textSize="16sp" />
</com.google.android.material.textfield.TextInputLayout>
<Button
android:id="@+id/addEmailButton"

View File

@ -0,0 +1,125 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shape_custom_dialog"
android:orientation="vertical">
<LinearLayout
android:id="@+id/dialogFrame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp"
android:id="@+id/titleFrame"
android:orientation="vertical">
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?attr/primaryTextColor"
android:textSize="20sp"
android:textStyle="bold"
android:drawableStart="@drawable/ic_filter"
android:drawablePadding="16dp"
android:text="@string/exploreFilterDialogTitle"
android:layout_marginBottom="4dp" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:id="@+id/dividerTitle"
android:background="?attr/dividerColor" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="100"
android:layout_margin="12dp"
android:orientation="vertical">
<CheckBox
android:id="@+id/includeTopic"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="false"
android:textColor="?attr/primaryTextColor"
android:text="@string/exploreFilterIncludeTopic"
android:textSize="16sp" />
<CheckBox
android:id="@+id/includeDesc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="false"
android:textColor="?attr/primaryTextColor"
android:text="@string/exploreFilterIncludeDesc"
android:textSize="16sp" />
<CheckBox
android:id="@+id/includeTemplate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="false"
android:textColor="?attr/primaryTextColor"
android:text="@string/exploreFilterIncludeTemplateRepos"
android:textSize="16sp" />
<CheckBox
android:id="@+id/onlyArchived"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="false"
android:textColor="?attr/primaryTextColor"
android:text="@string/exploreFilterIncludeArchive"
android:textSize="16sp" />
<CheckBox
android:id="@+id/onlyPrivate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="false"
android:textColor="?attr/primaryTextColor"
android:text="@string/exploreFilterIncludePrivate"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:id="@+id/divider"
android:background="?attr/dividerColor" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:orientation="horizontal" >
<Button
android:id="@+id/cancel"
android:layout_width="wrap_content"
android:layout_height="60dp"
style="?android:attr/button"
android:layout_alignParentStart="true"
android:text="@string/close"
android:textColor="@color/colorWhite"
android:textSize="16sp" />
</RelativeLayout>
</LinearLayout>

View File

@ -13,24 +13,44 @@
style="@style/Widget.MaterialComponents.ProgressIndicator.Linear.Indeterminate"
app:indicatorColor="?attr/progressIndicatorColor" />
<EditText
android:id="@+id/searchKeyword"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:textSize="14sp"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp"
android:inputType="text"
android:background="@drawable/shape_inputs"
android:textColor="?attr/inputTextColor"
android:textColorHint="?attr/hintColor"
android:hint="@string/exploreTextBoxHint"
android:textColorHighlight="?attr/primaryTextColor"
android:imeOptions="actionSend"
android:autofillHints="@string/exploreTextBoxHint" />
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/searchKeywordLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:boxBackgroundColor="?attr/inputBackgroundColor"
android:textColorHint="?attr/hintColor"
app:hintTextColor="?attr/hintColor"
app:boxStrokeErrorColor="@color/darkRed"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
app:startIconDrawable="@drawable/ic_search"
app:startIconTint="?attr/iconsColor"
app:endIconMode="clear_text"
app:endIconTint="?attr/iconsColor"
android:hint="@string/exploreTextBoxHint">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/searchKeyword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?attr/inputTextColor"
android:textColorHighlight="?attr/hintColor"
android:textColorHint="?attr/hintColor"
android:imeOptions="actionSend"
android:inputType="text"
android:textSize="16sp" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
<TextView
android:id="@+id/noData"

View File

@ -46,7 +46,7 @@
android:gravity="end"
android:paddingEnd="25dp"
android:paddingStart="15dp"
android:paddingTop="10dp"
android:paddingTop="6dp"
android:orientation="horizontal">
<androidx.recyclerview.widget.RecyclerView

View File

@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<ImageView
android:id="@+id/userAccountAvatar"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_width="36dp"
android:layout_height="36dp"
android:paddingStart="4dp"
android:paddingEnd="4dp"
android:contentDescription="@string/generalImgContentText"
xmlns:android="http://schemas.android.com/apk/res/android" />