App wide UI changes and refactors (#630)

Enhance and update the buttons across the app, colorful animation on tap

update toasty in view models

update toasty in fragments

update toasty in actions, activities, adapters

Alert dialogs buttons arrangements

strings fixes

switch to fab buttons

remove snackbar

Enhance whole app UI, bring consistency among the elements

Co-authored-by: M M Arif <mmarif@swatian.com>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/630
This commit is contained in:
M M Arif
2020-08-06 17:16:51 +02:00
parent 30921ea330
commit 12a7b6040b
92 changed files with 628 additions and 1043 deletions

View File

@ -113,12 +113,11 @@
<Button
android:id="@+id/addNewAccount"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="60dp"
android:layout_marginStart="10dp"
android:layout_marginTop="15dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
android:layout_marginBottom="15dp"
android:background="@drawable/shape_buttons"
android:text="@string/addNewAccountText"
android:textColor="@color/btnTextColor"
android:textSize="16sp" />

View File

@ -213,9 +213,8 @@
android:layout_gravity="end"
android:layout_marginTop="20dp"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_height="60dp"
android:text="@string/newCreateButtonCopy"
android:background="@drawable/shape_buttons"
android:textColor="@color/btnTextColor" />
</LinearLayout>

View File

@ -103,11 +103,10 @@
android:layout_gravity="end"
android:layout_marginTop="20dp"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_height="60dp"
android:text="@string/newCreateButtonCopy"
android:background="@drawable/shape_buttons"
android:textColor="@color/btnTextColor" />
</LinearLayout>
</LinearLayout>
</LinearLayout>

View File

@ -152,9 +152,8 @@
android:layout_gravity="end"
android:layout_marginTop="20dp"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_height="60dp"
android:text="@string/newCreateButtonCopy"
android:background="@drawable/shape_buttons"
android:textColor="@color/btnTextColor" />
<View
@ -165,4 +164,4 @@
</ScrollView>
</LinearLayout>
</LinearLayout>

View File

@ -181,9 +181,8 @@
android:layout_gravity="end"
android:layout_marginTop="20dp"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_height="60dp"
android:text="@string/newCreateButtonCopy"
android:background="@drawable/shape_buttons"
android:textColor="@color/btnTextColor" />
<View

View File

@ -164,9 +164,8 @@
android:layout_gravity="end"
android:layout_marginTop="20dp"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_height="60dp"
android:text="@string/newCreateButtonCopy"
android:background="@drawable/shape_buttons"
android:textColor="@color/btnTextColor" />
<View

View File

@ -164,9 +164,8 @@
android:layout_gravity="end"
android:layout_marginTop="20dp"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_height="60dp"
android:text="@string/saveButton"
android:background="@drawable/shape_buttons"
android:textColor="@color/btnTextColor" />
</LinearLayout>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
@ -38,6 +38,7 @@
<RelativeLayout
android:id="@+id/relativeMainLayoutFrame"
android:layout_width="match_parent"
android:layout_marginTop="50dp"
android:layout_height="match_parent">
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
@ -225,19 +226,6 @@
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<ImageView
android:id="@+id/addNewComment"
android:src="@drawable/ic_reply"
android:tint="@color/colorWhite"
android:layout_width="54dp"
android:layout_height="54dp"
android:layout_margin="15dp"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:background="@drawable/shape_circle"
android:padding="@dimen/fab_padding"
android:contentDescription="@string/addNewContent" />
<ProgressBar
android:id="@+id/progressBar"
style="@style/Base.Widget.AppCompat.ProgressBar"
@ -248,4 +236,18 @@
</RelativeLayout>
</LinearLayout>
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
android:id="@+id/addNewComment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="16dp"
android:text="@string/commentButtonText"
android:contentDescription="@string/commentButtonText"
android:textColor="@color/colorWhite"
android:backgroundTint="@color/darkGreen"
app:layout_behavior="com.google.android.material.behavior.HideBottomViewOnScrollBehavior"
app:iconTint="@color/colorWhite"
app:icon="@drawable/ic_reply" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -202,7 +202,7 @@
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="60dp"
android:text="@string/btnLogin"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
@ -210,7 +210,6 @@
android:layout_marginTop="15dp"
android:textColor="@color/btnTextColor"
android:textSize="16sp"
android:background="@drawable/shape_buttons"
android:id="@+id/login_button"/>
<TextView

View File

@ -160,9 +160,8 @@
android:layout_gravity="end"
android:layout_marginTop="20dp"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_height="60dp"
android:text="@string/mergePullRequestButtonText"
android:background="@drawable/shape_buttons"
android:textColor="@color/btnTextColor" />
<TextView

View File

@ -228,10 +228,8 @@
android:layout_gravity="end"
android:layout_marginTop="20dp"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:width="140dp"
android:layout_height="60dp"
android:text="@string/newFileButtonCopy"
android:background="@drawable/shape_buttons"
android:textColor="@color/btnTextColor" />
</LinearLayout>

View File

@ -144,9 +144,8 @@
android:layout_gravity="end"
android:layout_marginTop="20dp"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_height="6dp"
android:text="@string/newCreateButtonCopy"
android:background="@drawable/shape_buttons"
android:textColor="@color/btnTextColor" />
</LinearLayout>

View File

@ -120,9 +120,8 @@
android:layout_gravity="end"
android:layout_marginTop="20dp"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_height="60dp"
android:text="@string/newCreateButtonCopy"
android:background="@drawable/shape_buttons"
android:textColor="@color/btnTextColor" />
</LinearLayout>

View File

@ -158,9 +158,8 @@
android:layout_gravity="end"
android:layout_marginTop="20dp"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_height="60dp"
android:text="@string/newCreateButtonCopy"
android:background="@drawable/shape_buttons"
android:textColor="@color/btnTextColor" />
</LinearLayout>

View File

@ -78,11 +78,10 @@
android:layout_gravity="end"
android:layout_marginTop="20dp"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_height="60dp"
android:text="@string/profileEmailButton"
android:background="@drawable/shape_buttons"
android:textColor="@color/btnTextColor" />
</LinearLayout>
</LinearLayout>
</LinearLayout>

View File

@ -103,9 +103,8 @@
android:layout_gravity="end"
android:layout_marginTop="20dp"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_height="60dp"
android:text="@string/commentButtonText"
android:background="@drawable/shape_buttons"
android:textColor="@color/btnTextColor" />
</LinearLayout>

View File

@ -1,8 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout
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"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".activities.MainActivity">
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
@ -28,18 +30,6 @@
android:indeterminate="true"
android:visibility="visible" />
<ImageView
android:src="@drawable/ic_add"
android:id="@+id/addNewRepo"
android:layout_width="54dp"
android:layout_height="54dp"
android:layout_margin="15dp"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:background="@drawable/shape_circle"
android:padding="@dimen/fab_padding"
android:contentDescription="@string/addNewContent" />
<TextView
android:id="@+id/noDataMyRepo"
android:layout_width="match_parent"
@ -51,4 +41,18 @@
android:textSize="20sp"
android:visibility="gone" />
</RelativeLayout>
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
android:id="@+id/addNewRepo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="16dp"
android:text="@string/pageTitleNewRepo"
android:contentDescription="@string/pageTitleNewRepo"
android:textColor="@color/colorWhite"
android:backgroundTint="@color/darkGreen"
app:layout_behavior="com.google.android.material.behavior.HideBottomViewOnScrollBehavior"
app:iconTint="@color/colorWhite"
app:icon="@drawable/ic_add" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/mainLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -44,17 +46,18 @@
android:textSize="20sp"
android:visibility="gone" />
<ImageView
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
android:id="@+id/markAllAsRead"
android:layout_width="54dp"
android:layout_height="54dp"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:layout_margin="15dp"
android:background="@drawable/shape_circle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="16dp"
android:text="@string/markAsRead"
android:contentDescription="@string/markAsRead"
android:padding="@dimen/fab_padding"
android:src="@drawable/ic_done"
android:tint="@color/colorWhite" />
android:textColor="@color/colorWhite"
android:backgroundTint="@color/darkGreen"
app:layout_behavior="com.google.android.material.behavior.HideBottomViewOnScrollBehavior"
app:iconTint="@color/colorWhite"
app:icon="@drawable/ic_done" />
</RelativeLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/pullToRefresh"
@ -26,18 +28,6 @@
android:indeterminate="true"
android:visibility="visible" />
<ImageView
android:src="@drawable/ic_add"
android:id="@+id/addNewOrganization"
android:layout_width="54dp"
android:layout_height="54dp"
android:layout_margin="15dp"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:background="@drawable/shape_circle"
android:padding="@dimen/fab_padding"
android:contentDescription="@string/addNewContent" />
<TextView
android:id="@+id/noDataOrg"
android:layout_width="match_parent"
@ -49,4 +39,18 @@
android:textSize="20sp"
android:visibility="gone" />
</RelativeLayout>
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
android:id="@+id/addNewOrganization"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="16dp"
android:text="@string/pageTitleCreateOrganization"
android:contentDescription="@string/pageTitleCreateOrganization"
android:textColor="@color/colorWhite"
android:backgroundTint="@color/darkGreen"
app:layout_behavior="com.google.android.material.behavior.HideBottomViewOnScrollBehavior"
app:iconTint="@color/colorWhite"
app:icon="@drawable/ic_add" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -306,11 +306,10 @@
<Button
android:id="@+id/repoAdditionalButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="60dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="5dp"
android:layout_marginBottom="20dp"
android:background="@drawable/shape_buttons"
android:text="@string/infoShowMoreInformation"
android:textColor="@color/btnTextColor" />

View File

@ -1,8 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout
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"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".activities.MainActivity">
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
@ -39,16 +41,18 @@
android:indeterminate="true"
android:visibility="visible" />
<ImageView
android:src="@drawable/ic_add"
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
android:id="@+id/addNewRepo"
android:layout_width="54dp"
android:layout_height="54dp"
android:layout_margin="15dp"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:background="@drawable/shape_circle"
android:padding="@dimen/fab_padding"
android:contentDescription="@string/addNewContent" />
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="16dp"
android:text="@string/pageTitleNewRepo"
android:contentDescription="@string/pageTitleNewRepo"
android:textColor="@color/colorWhite"
android:backgroundTint="@color/darkGreen"
app:layout_behavior="com.google.android.material.behavior.HideBottomViewOnScrollBehavior"
app:iconTint="@color/colorWhite"
app:icon="@drawable/ic_add" />
</RelativeLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -1,8 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout
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"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".activities.MainActivity">
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
@ -39,16 +41,18 @@
android:indeterminate="true"
android:visibility="visible" />
<ImageView
android:src="@drawable/ic_add"
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
android:id="@+id/addNewRepo"
android:layout_width="54dp"
android:layout_height="54dp"
android:layout_margin="15dp"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:background="@drawable/shape_circle"
android:padding="@dimen/fab_padding"
android:contentDescription="@string/addNewContent" />
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="16dp"
android:text="@string/pageTitleNewRepo"
android:contentDescription="@string/pageTitleNewRepo"
android:textColor="@color/colorWhite"
android:backgroundTint="@color/darkGreen"
app:layout_behavior="com.google.android.material.behavior.HideBottomViewOnScrollBehavior"
app:iconTint="@color/colorWhite"
app:icon="@drawable/ic_add" />
</RelativeLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -35,15 +35,14 @@
<Button
android:id="@+id/branchCommitHash"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="60dp"
android:text="@string/viewCommits"
android:layout_marginTop="15dp"
android:textColor="@color/btnTextColor"
android:textSize="14sp"
android:minHeight="0dp"
android:minWidth="0dp"
android:padding="8dp"
android:background="@drawable/shape_buttons" />
android:padding="8dp" />
</LinearLayout>

View File

@ -46,15 +46,14 @@
<Button
android:id="@+id/commitHtmlUrlVw"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="60dp"
android:text="@string/viewInBrowser"
android:layout_marginTop="15dp"
android:textColor="@color/btnTextColor"
android:textSize="14sp"
android:minHeight="0dp"
android:minWidth="0dp"
android:padding="8dp"
android:background="@drawable/shape_buttons" />
android:padding="8dp" />
</LinearLayout>