From d9cd04facf8e850abcd0072c4883a4d1131ae60e Mon Sep 17 00:00:00 2001 From: M M Arif Date: Sat, 8 Aug 2020 17:43:14 +0200 Subject: [PATCH] Layout improvements (#637) Layout improvements Co-authored-by: M M Arif Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/637 --- .../activities/AddNewTeamMemberActivity.java | 2 +- .../org/mian/gitnex/helpers/ChangeLog.java | 6 +- ...ctivity_add_collaborator_to_repository.xml | 16 +-- .../res/layout/activity_add_new_account.xml | 15 +-- .../layout/activity_add_new_team_member.xml | 15 +-- .../layout/activity_add_remove_assignees.xml | 4 +- .../res/layout/activity_add_remove_labels.xml | 4 +- .../res/layout/activity_admin_get_users.xml | 13 +- app/src/main/res/layout/activity_commits.xml | 10 +- .../main/res/layout/activity_create_issue.xml | 10 +- .../main/res/layout/activity_create_label.xml | 13 +- .../res/layout/activity_create_new_user.xml | 13 +- .../res/layout/activity_create_release.xml | 19 +-- .../layout/activity_create_team_by_org.xml | 16 +-- app/src/main/res/layout/activity_credits.xml | 11 +- .../main/res/layout/activity_edit_issue.xml | 10 +- .../main/res/layout/activity_file_diff.xml | 9 +- .../main/res/layout/activity_file_view.xml | 126 +++++++++--------- app/src/main/res/layout/activity_forks.xml | 10 +- .../main/res/layout/activity_issue_detail.xml | 8 +- app/src/main/res/layout/activity_main.xml | 5 +- .../layout/activity_merge_pull_request.xml | 10 +- app/src/main/res/layout/activity_new_file.xml | 10 +- .../res/layout/activity_new_milestone.xml | 12 +- .../res/layout/activity_new_organization.xml | 10 +- app/src/main/res/layout/activity_new_repo.xml | 23 ++-- .../main/res/layout/activity_org_detail.xml | 10 +- .../res/layout/activity_org_team_members.xml | 13 +- .../res/layout/activity_profile_email.xml | 10 +- .../res/layout/activity_reply_to_issue.xml | 10 +- .../main/res/layout/activity_repo_detail.xml | 11 +- .../res/layout/activity_repo_stargazers.xml | 11 +- .../res/layout/activity_repo_watchers.xml | 11 +- .../layout/activity_settings_appearance.xml | 10 +- .../res/layout/activity_settings_drafts.xml | 8 +- .../res/layout/activity_settings_fileview.xml | 10 +- .../layout/activity_settings_reporting.xml | 11 +- .../res/layout/activity_settings_security.xml | 9 +- .../layout/activity_settings_translation.xml | 11 +- app/src/main/res/layout/activity_sponsors.xml | 9 +- app/src/main/res/values/themes.xml | 1 + 41 files changed, 235 insertions(+), 310 deletions(-) diff --git a/app/src/main/java/org/mian/gitnex/activities/AddNewTeamMemberActivity.java b/app/src/main/java/org/mian/gitnex/activities/AddNewTeamMemberActivity.java index dab3079e..1e9251ea 100644 --- a/app/src/main/java/org/mian/gitnex/activities/AddNewTeamMemberActivity.java +++ b/app/src/main/java/org/mian/gitnex/activities/AddNewTeamMemberActivity.java @@ -68,7 +68,7 @@ public class AddNewTeamMemberActivity extends BaseActivity { final String instanceToken = "token " + tinyDb.getString(loginUid + "-token"); ImageView closeActivity = findViewById(R.id.close); - addNewTeamMember = findViewById(R.id.addNewTeamMeber); + addNewTeamMember = findViewById(R.id.addNewTeamMember); mRecyclerView = findViewById(R.id.recyclerViewUserSearch); mProgressBar = findViewById(R.id.progress_bar); noData = findViewById(R.id.noData); diff --git a/app/src/main/java/org/mian/gitnex/helpers/ChangeLog.java b/app/src/main/java/org/mian/gitnex/helpers/ChangeLog.java index c85e5a77..6d0f4d9e 100644 --- a/app/src/main/java/org/mian/gitnex/helpers/ChangeLog.java +++ b/app/src/main/java/org/mian/gitnex/helpers/ChangeLog.java @@ -21,9 +21,9 @@ public class ChangeLog { static final private String TAG = "ChangeLog"; static final private String CHANGELOG_XML_NODE = "changelog"; - + private Activity changelogActivity; - + public ChangeLog(Activity context) { changelogActivity = context; } @@ -93,7 +93,7 @@ public class ChangeLog { androidx.appcompat.app.AlertDialog.Builder builder = new AlertDialog.Builder(changelogActivity); builder.setTitle(R.string.changelogTitle); builder.setMessage(Html.fromHtml("" + changelogMessage + "")); - builder.setNegativeButton(R.string.close, (dialog, which) -> dialog.cancel()); + builder.setNeutralButton(R.string.close, null); builder.setCancelable(false); builder.create(); builder.show(); diff --git a/app/src/main/res/layout/activity_add_collaborator_to_repository.xml b/app/src/main/res/layout/activity_add_collaborator_to_repository.xml index e412026a..d03c9837 100644 --- a/app/src/main/res/layout/activity_add_collaborator_to_repository.xml +++ b/app/src/main/res/layout/activity_add_collaborator_to_repository.xml @@ -1,3 +1,4 @@ + - + android:background="?attr/primaryBackgroundColor"> - + @@ -60,7 +59,7 @@ android:textColorHint="?attr/hintColor" android:textColorHighlight="?attr/primaryTextColor" android:hint="@string/addCollaboratorSearchHint" - android:imeOptions="actionSend"/> + android:imeOptions="actionSend" /> + android:scrollbars="vertical" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/activity_add_new_account.xml b/app/src/main/res/layout/activity_add_new_account.xml index 71a6bd5c..2b921e22 100644 --- a/app/src/main/res/layout/activity_add_new_account.xml +++ b/app/src/main/res/layout/activity_add_new_account.xml @@ -1,11 +1,10 @@ - @@ -16,12 +15,11 @@ android:theme="@style/Widget.AppCompat.SearchView" app:layout_constraintTop_toTopOf="parent"> - + android:background="?attr/primaryBackgroundColor"> - + @@ -54,8 +52,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" - android:padding="20dp" - android:layout_marginTop="50dp" + android:padding="16dp" app:layout_constraintTop_toTopOf="parent"> - + diff --git a/app/src/main/res/layout/activity_add_new_team_member.xml b/app/src/main/res/layout/activity_add_new_team_member.xml index 8c830a7c..49fb2e01 100644 --- a/app/src/main/res/layout/activity_add_new_team_member.xml +++ b/app/src/main/res/layout/activity_add_new_team_member.xml @@ -1,5 +1,5 @@ - - + android:background="?attr/primaryBackgroundColor"> - + - \ No newline at end of file + diff --git a/app/src/main/res/layout/activity_add_remove_assignees.xml b/app/src/main/res/layout/activity_add_remove_assignees.xml index 612c60f8..5dd2573a 100644 --- a/app/src/main/res/layout/activity_add_remove_assignees.xml +++ b/app/src/main/res/layout/activity_add_remove_assignees.xml @@ -5,6 +5,4 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:background="?attr/primaryBackgroundColor" - tools:context=".activities.AddRemoveAssigneesActivity"> - - \ No newline at end of file + tools:context=".activities.AddRemoveAssigneesActivity" /> diff --git a/app/src/main/res/layout/activity_add_remove_labels.xml b/app/src/main/res/layout/activity_add_remove_labels.xml index 9d0dc751..2c4cd512 100644 --- a/app/src/main/res/layout/activity_add_remove_labels.xml +++ b/app/src/main/res/layout/activity_add_remove_labels.xml @@ -5,6 +5,4 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:background="?attr/primaryBackgroundColor" - tools:context=".activities.AddRemoveLabelsActivity"> - - \ No newline at end of file + tools:context=".activities.AddRemoveLabelsActivity" /> diff --git a/app/src/main/res/layout/activity_admin_get_users.xml b/app/src/main/res/layout/activity_admin_get_users.xml index 26afb6f8..1607aaf6 100644 --- a/app/src/main/res/layout/activity_admin_get_users.xml +++ b/app/src/main/res/layout/activity_admin_get_users.xml @@ -1,6 +1,6 @@ - - + android:background="?attr/primaryBackgroundColor"> - + @@ -62,7 +61,7 @@ android:id="@+id/noDataUsers" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_margin="15dp" + android:layout_margin="16dp" android:gravity="center" android:text="@string/noDataFound" android:textColor="?attr/primaryTextColor" diff --git a/app/src/main/res/layout/activity_commits.xml b/app/src/main/res/layout/activity_commits.xml index 25b259e0..bd61fda7 100644 --- a/app/src/main/res/layout/activity_commits.xml +++ b/app/src/main/res/layout/activity_commits.xml @@ -1,6 +1,5 @@ - + android:background="?attr/primaryBackgroundColor"> - + @@ -66,7 +64,7 @@ android:id="@+id/noDataCommits" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_margin="15dp" + android:layout_margin="16dp" android:gravity="center" android:text="@string/noDataFound" android:textColor="?attr/primaryTextColor" diff --git a/app/src/main/res/layout/activity_create_issue.xml b/app/src/main/res/layout/activity_create_issue.xml index ab3b3c1c..e6fb42e5 100644 --- a/app/src/main/res/layout/activity_create_issue.xml +++ b/app/src/main/res/layout/activity_create_issue.xml @@ -12,13 +12,12 @@ android:layout_height="wrap_content" android:theme="@style/Widget.AppCompat.SearchView"> - + android:background="?attr/primaryBackgroundColor"> - + @@ -53,8 +52,7 @@ - - + android:background="?attr/primaryBackgroundColor"> - + - + android:background="?attr/primaryBackgroundColor"> - + @@ -52,7 +51,7 @@ - - diff --git a/app/src/main/res/layout/activity_create_release.xml b/app/src/main/res/layout/activity_create_release.xml index 2b9284aa..1f58dc3c 100644 --- a/app/src/main/res/layout/activity_create_release.xml +++ b/app/src/main/res/layout/activity_create_release.xml @@ -13,12 +13,11 @@ android:layout_height="wrap_content" android:theme="@style/Widget.AppCompat.SearchView"> - + android:background="?attr/primaryBackgroundColor"> - + @@ -52,7 +51,7 @@ + android:textColorHighlight="?attr/primaryTextColor" /> + android:layout_marginBottom="10dp"> + android:textColorHighlight="?attr/primaryTextColor" /> - - diff --git a/app/src/main/res/layout/activity_create_team_by_org.xml b/app/src/main/res/layout/activity_create_team_by_org.xml index b4dde543..c44f1189 100644 --- a/app/src/main/res/layout/activity_create_team_by_org.xml +++ b/app/src/main/res/layout/activity_create_team_by_org.xml @@ -1,5 +1,6 @@ - - + android:background="?attr/primaryBackgroundColor"> - + @@ -51,7 +51,7 @@ - - diff --git a/app/src/main/res/layout/activity_credits.xml b/app/src/main/res/layout/activity_credits.xml index 69d6be17..d5b85fd8 100644 --- a/app/src/main/res/layout/activity_credits.xml +++ b/app/src/main/res/layout/activity_credits.xml @@ -2,7 +2,6 @@ @@ -13,12 +12,11 @@ android:layout_height="wrap_content" android:theme="@style/Widget.AppCompat.SearchView"> - + android:background="?attr/primaryBackgroundColor"> - + @@ -55,9 +53,8 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:background="?attr/primaryBackgroundColor" - android:padding="4dp" android:scrollbars="vertical" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/activity_edit_issue.xml b/app/src/main/res/layout/activity_edit_issue.xml index 0222aea5..46b1345b 100644 --- a/app/src/main/res/layout/activity_edit_issue.xml +++ b/app/src/main/res/layout/activity_edit_issue.xml @@ -12,13 +12,12 @@ android:layout_height="wrap_content" android:theme="@style/Widget.AppCompat.SearchView"> - + android:background="?attr/primaryBackgroundColor"> - + @@ -53,8 +52,7 @@ - + android:background="?attr/primaryBackgroundColor"> - + @@ -71,4 +70,4 @@ android:indeterminate="true" android:visibility="visible" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/activity_file_view.xml b/app/src/main/res/layout/activity_file_view.xml index 6cefc452..6a67768a 100644 --- a/app/src/main/res/layout/activity_file_view.xml +++ b/app/src/main/res/layout/activity_file_view.xml @@ -1,7 +1,5 @@ - - + android:background="?attr/primaryBackgroundColor"> - + - - - - - - - - - - - - - - - - - + android:background="?attr/primaryBackgroundColor"> - + + + + + + + + + + + + + + + + + + + + + - + diff --git a/app/src/main/res/layout/activity_forks.xml b/app/src/main/res/layout/activity_forks.xml index 373acba5..8509a2e8 100644 --- a/app/src/main/res/layout/activity_forks.xml +++ b/app/src/main/res/layout/activity_forks.xml @@ -1,6 +1,5 @@ - + android:background="?attr/primaryBackgroundColor"> - + @@ -66,7 +64,7 @@ android:id="@+id/noData" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_margin="15dp" + android:layout_margin="16dp" android:gravity="center" android:text="@string/noDataFound" android:textColor="?attr/primaryTextColor" diff --git a/app/src/main/res/layout/activity_issue_detail.xml b/app/src/main/res/layout/activity_issue_detail.xml index 39c7fb04..d7196696 100644 --- a/app/src/main/res/layout/activity_issue_detail.xml +++ b/app/src/main/res/layout/activity_issue_detail.xml @@ -13,14 +13,12 @@ android:layout_height="wrap_content" android:theme="@style/Widget.AppCompat.SearchView"> - + android:background="?attr/primaryBackgroundColor"> - + diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 2f22cc27..a968da5f 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -15,13 +15,12 @@ android:layout_height="match_parent" android:orientation="vertical"> - @@ -34,7 +33,7 @@ android:textColor="?attr/primaryTextColor" android:id="@+id/toolbar_title" /> - + - + android:background="?attr/primaryBackgroundColor"> - + @@ -64,8 +63,7 @@ - + android:background="?attr/primaryBackgroundColor"> - + @@ -53,8 +52,7 @@ - + android:background="?attr/primaryBackgroundColor"> - + @@ -53,8 +52,7 @@ diff --git a/app/src/main/res/layout/activity_new_organization.xml b/app/src/main/res/layout/activity_new_organization.xml index 5c069f45..4f8195fc 100644 --- a/app/src/main/res/layout/activity_new_organization.xml +++ b/app/src/main/res/layout/activity_new_organization.xml @@ -12,13 +12,12 @@ android:layout_height="wrap_content" android:theme="@style/Widget.AppCompat.SearchView"> - + android:background="?attr/primaryBackgroundColor"> - + @@ -53,8 +52,7 @@ - @@ -12,13 +12,12 @@ android:layout_height="wrap_content" android:theme="@style/Widget.AppCompat.SearchView"> - + android:background="?attr/primaryBackgroundColor"> - + - + android:background="?attr/primaryBackgroundColor"> + android:padding="16dp" + android:orientation="vertical"> - + app:layout_scrollFlags="enterAlways"> - + - \ No newline at end of file + diff --git a/app/src/main/res/layout/activity_org_team_members.xml b/app/src/main/res/layout/activity_org_team_members.xml index 1d287346..cf48c73e 100644 --- a/app/src/main/res/layout/activity_org_team_members.xml +++ b/app/src/main/res/layout/activity_org_team_members.xml @@ -1,6 +1,6 @@ - - + android:background="?attr/primaryBackgroundColor"> - + @@ -65,4 +64,4 @@ android:textSize="20sp" android:visibility="gone" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/activity_profile_email.xml b/app/src/main/res/layout/activity_profile_email.xml index dbdfc571..1a5287b9 100644 --- a/app/src/main/res/layout/activity_profile_email.xml +++ b/app/src/main/res/layout/activity_profile_email.xml @@ -1,5 +1,6 @@ - - - + - + android:background="?attr/primaryBackgroundColor"> - + @@ -64,8 +63,7 @@ - - + android:background="?attr/primaryBackgroundColor"> - + - - + android:background="?attr/primaryBackgroundColor"> - + diff --git a/app/src/main/res/layout/activity_repo_watchers.xml b/app/src/main/res/layout/activity_repo_watchers.xml index 6b40842a..da09e8e4 100644 --- a/app/src/main/res/layout/activity_repo_watchers.xml +++ b/app/src/main/res/layout/activity_repo_watchers.xml @@ -1,6 +1,6 @@ - - + android:background="?attr/primaryBackgroundColor"> - + diff --git a/app/src/main/res/layout/activity_settings_appearance.xml b/app/src/main/res/layout/activity_settings_appearance.xml index 51f6876a..ffbc7116 100644 --- a/app/src/main/res/layout/activity_settings_appearance.xml +++ b/app/src/main/res/layout/activity_settings_appearance.xml @@ -3,7 +3,6 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" - xmlns:tools="http://schemas.android.com/tools" android:orientation="vertical" android:background="?attr/primaryBackgroundColor"> @@ -13,13 +12,12 @@ android:layout_height="wrap_content" android:theme="@style/Widget.AppCompat.SearchView"> - + android:theme="@style/AppTheme.AppBarOverlay"> - + @@ -226,4 +224,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/layout/activity_settings_drafts.xml b/app/src/main/res/layout/activity_settings_drafts.xml index 80994bcd..1f87c3d1 100644 --- a/app/src/main/res/layout/activity_settings_drafts.xml +++ b/app/src/main/res/layout/activity_settings_drafts.xml @@ -3,7 +3,6 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" - xmlns:tools="http://schemas.android.com/tools" android:id="@+id/layoutReportingView" android:orientation="vertical" android:background="?attr/primaryBackgroundColor"> @@ -14,13 +13,12 @@ android:layout_height="wrap_content" android:theme="@style/Widget.AppCompat.SearchView"> - + android:theme="@style/AppTheme.AppBarOverlay"> - + diff --git a/app/src/main/res/layout/activity_settings_fileview.xml b/app/src/main/res/layout/activity_settings_fileview.xml index f859c5f9..df18f600 100644 --- a/app/src/main/res/layout/activity_settings_fileview.xml +++ b/app/src/main/res/layout/activity_settings_fileview.xml @@ -3,7 +3,6 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" - xmlns:tools="http://schemas.android.com/tools" android:id="@+id/layoutFileView" android:orientation="vertical" android:background="?attr/primaryBackgroundColor"> @@ -14,13 +13,12 @@ android:layout_height="wrap_content" android:theme="@style/Widget.AppCompat.SearchView"> - + android:theme="@style/AppTheme.AppBarOverlay"> - + @@ -107,4 +105,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/layout/activity_settings_reporting.xml b/app/src/main/res/layout/activity_settings_reporting.xml index c9d86526..1e22a092 100644 --- a/app/src/main/res/layout/activity_settings_reporting.xml +++ b/app/src/main/res/layout/activity_settings_reporting.xml @@ -3,7 +3,6 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" - xmlns:tools="http://schemas.android.com/tools" android:id="@+id/layoutReportingView" android:orientation="vertical" android:background="?attr/primaryBackgroundColor"> @@ -14,13 +13,11 @@ android:layout_height="wrap_content" android:theme="@style/Widget.AppCompat.SearchView"> - + android:background="?attr/primaryBackgroundColor"> - + @@ -78,4 +75,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/layout/activity_settings_security.xml b/app/src/main/res/layout/activity_settings_security.xml index 5b6b6aad..5701525e 100644 --- a/app/src/main/res/layout/activity_settings_security.xml +++ b/app/src/main/res/layout/activity_settings_security.xml @@ -3,7 +3,6 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" - xmlns:tools="http://schemas.android.com/tools" android:id="@+id/layoutSettingsCerts" android:orientation="vertical" android:background="?attr/primaryBackgroundColor"> @@ -14,13 +13,11 @@ android:layout_height="wrap_content" android:theme="@style/Widget.AppCompat.SearchView"> - + android:background="?attr/primaryBackgroundColor"> - + diff --git a/app/src/main/res/layout/activity_settings_translation.xml b/app/src/main/res/layout/activity_settings_translation.xml index ea7fc570..8deae560 100644 --- a/app/src/main/res/layout/activity_settings_translation.xml +++ b/app/src/main/res/layout/activity_settings_translation.xml @@ -3,7 +3,6 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" - xmlns:tools="http://schemas.android.com/tools" android:orientation="vertical" android:background="?attr/primaryBackgroundColor"> @@ -13,13 +12,11 @@ android:layout_height="wrap_content" android:theme="@style/Widget.AppCompat.SearchView"> - + android:background="?attr/primaryBackgroundColor"> - + @@ -87,4 +84,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/layout/activity_sponsors.xml b/app/src/main/res/layout/activity_sponsors.xml index b0910e6b..cd520d0b 100644 --- a/app/src/main/res/layout/activity_sponsors.xml +++ b/app/src/main/res/layout/activity_sponsors.xml @@ -13,12 +13,11 @@ android:layout_height="wrap_content" android:theme="@style/Widget.AppCompat.SearchView"> - + android:background="?attr/primaryBackgroundColor"> - + @@ -60,4 +59,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index df3eb037..e62a2d88 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -62,6 +62,7 @@