From 87649ebae8d315f3c9e51e65d70dfc07745a8747 Mon Sep 17 00:00:00 2001 From: M M Arif Date: Sun, 9 Aug 2020 10:23:51 +0200 Subject: [PATCH] Introduce new progress indicators (#638) Add indicator to the rest of fragments/activities Merge branch 'master' into profress-indicators # Conflicts: # app/src/main/res/layout/activity_credits.xml # app/src/main/res/layout/activity_sponsors.xml wip to remove old indicator Make dark green as primary color, clean up app files Introduce new progress indicators Co-authored-by: M M Arif Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/638 --- app/src/main/AndroidManifest.xml | 2 - .../activities/AddNewTeamMemberActivity.java | 2 + .../gitnex/activities/CreditsActivity.java | 64 ------------- .../OrganizationTeamMembersActivity.java | 4 + .../gitnex/activities/SponsorsActivity.java | 66 -------------- .../mian/gitnex/fragments/AboutFragment.java | 91 +++++++------------ .../ExploreRepositoriesFragment.java | 26 ++---- .../mian/gitnex/fragments/IssuesFragment.java | 10 +- .../fragments/MembersByOrgFragment.java | 5 + .../gitnex/fragments/MilestonesFragment.java | 5 +- .../fragments/PullRequestsFragment.java | 7 +- .../layout/activity_add_new_team_member.xml | 20 ++-- app/src/main/res/layout/activity_commits.xml | 21 ++--- app/src/main/res/layout/activity_credits.xml | 60 ------------ .../main/res/layout/activity_file_view.xml | 16 ++-- .../main/res/layout/activity_issue_detail.xml | 49 +++++----- .../res/layout/activity_org_team_members.xml | 11 ++- .../main/res/layout/activity_repo_detail.xml | 1 + app/src/main/res/layout/activity_sponsors.xml | 62 ------------- app/src/main/res/layout/fragment_about.xml | 30 +----- app/src/main/res/layout/fragment_branches.xml | 20 ++-- .../res/layout/fragment_collaborators.xml | 19 ++-- .../main/res/layout/fragment_explore_repo.xml | 19 ++-- app/src/main/res/layout/fragment_files.xml | 10 +- app/src/main/res/layout/fragment_issues.xml | 20 ++-- app/src/main/res/layout/fragment_labels.xml | 20 ++-- .../res/layout/fragment_members_by_org.xml | 10 +- .../main/res/layout/fragment_milestones.xml | 28 +++--- .../res/layout/fragment_my_repositories.xml | 8 +- .../res/layout/fragment_notifications.xml | 30 +++--- .../res/layout/fragment_organization_info.xml | 20 +--- .../res/layout/fragment_organizations.xml | 8 +- app/src/main/res/layout/fragment_profile.xml | 3 +- .../res/layout/fragment_profile_emails.xml | 22 ++--- .../res/layout/fragment_profile_followers.xml | 22 ++--- .../res/layout/fragment_profile_following.xml | 22 ++--- .../res/layout/fragment_pull_requests.xml | 20 ++-- app/src/main/res/layout/fragment_releases.xml | 20 ++-- .../main/res/layout/fragment_repo_info.xml | 18 +--- .../main/res/layout/fragment_repositories.xml | 16 ++-- .../layout/fragment_repositories_by_org.xml | 17 ++-- .../layout/fragment_starred_repositories.xml | 16 ++-- .../main/res/layout/fragment_teams_by_org.xml | 17 ++-- app/src/main/res/values-v23/themes.xml | 3 + app/src/main/res/values/attrs.xml | 1 + app/src/main/res/values/credits.xml | 8 -- app/src/main/res/values/sponsors.xml | 15 --- app/src/main/res/values/themes.xml | 6 ++ 48 files changed, 333 insertions(+), 657 deletions(-) delete mode 100644 app/src/main/java/org/mian/gitnex/activities/CreditsActivity.java delete mode 100644 app/src/main/java/org/mian/gitnex/activities/SponsorsActivity.java delete mode 100644 app/src/main/res/layout/activity_credits.xml delete mode 100644 app/src/main/res/layout/activity_sponsors.xml delete mode 100644 app/src/main/res/values/credits.xml delete mode 100644 app/src/main/res/values/sponsors.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index ff025745..a3f23869 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -48,8 +48,6 @@ android:name=".activities.OrganizationDetailActivity" android:label="@string/title_activity_org_detail" android:theme="@style/AppTheme.NoActionBar" /> - - 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 1e9251ea..2085cf13 100644 --- a/app/src/main/java/org/mian/gitnex/activities/AddNewTeamMemberActivity.java +++ b/app/src/main/java/org/mian/gitnex/activities/AddNewTeamMemberActivity.java @@ -125,6 +125,8 @@ public class AddNewTeamMemberActivity extends BaseActivity { Call call = RetrofitClient.getInstance(instanceUrl, ctx).getApiInterface().getUserBySearch(Authorization.returnAuthentication(ctx, loginUid, token), searchKeyword, 10); + mProgressBar.setVisibility(View.VISIBLE); + call.enqueue(new Callback() { @Override diff --git a/app/src/main/java/org/mian/gitnex/activities/CreditsActivity.java b/app/src/main/java/org/mian/gitnex/activities/CreditsActivity.java deleted file mode 100644 index 356e7d2e..00000000 --- a/app/src/main/java/org/mian/gitnex/activities/CreditsActivity.java +++ /dev/null @@ -1,64 +0,0 @@ -package org.mian.gitnex.activities; - -import androidx.recyclerview.widget.DividerItemDecoration; -import androidx.recyclerview.widget.LinearLayoutManager; -import androidx.recyclerview.widget.RecyclerView; -import android.content.Context; -import android.content.res.Resources; -import android.os.Bundle; -import android.view.View; -import android.widget.ImageView; -import org.mian.gitnex.R; -import org.mian.gitnex.adapters.CreditsAdapter; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -/** - * Author M M Arif - */ - -public class CreditsActivity extends BaseActivity { - - private View.OnClickListener onClickListener; - final Context ctx = this; - - @Override - protected int getLayoutResourceId(){ - return R.layout.activity_credits; - } - - @Override - public void onCreate(Bundle savedInstanceState) { - - super.onCreate(savedInstanceState); - - ImageView closeActivity = findViewById(R.id.close); - - initCloseListener(); - closeActivity.setOnClickListener(onClickListener); - - Resources res = getResources(); - CharSequence[] creditsInfo = res.getTextArray(R.array.creditsInfo); - - List creditsList = new ArrayList<>(Arrays.asList(creditsInfo)); - - RecyclerView mRecyclerView = findViewById(R.id.recyclerView); - - mRecyclerView.setHasFixedSize(true); - mRecyclerView.setLayoutManager(new LinearLayoutManager(ctx)); - - DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(mRecyclerView.getContext(), - DividerItemDecoration.VERTICAL); - mRecyclerView.addItemDecoration(dividerItemDecoration); - - CreditsAdapter adapter = new CreditsAdapter(creditsList); - mRecyclerView.setAdapter(adapter); - - } - - private void initCloseListener() { - - onClickListener = view -> finish(); - } -} diff --git a/app/src/main/java/org/mian/gitnex/activities/OrganizationTeamMembersActivity.java b/app/src/main/java/org/mian/gitnex/activities/OrganizationTeamMembersActivity.java index d336ddb8..d48b25bf 100644 --- a/app/src/main/java/org/mian/gitnex/activities/OrganizationTeamMembersActivity.java +++ b/app/src/main/java/org/mian/gitnex/activities/OrganizationTeamMembersActivity.java @@ -9,6 +9,7 @@ import android.view.MenuItem; import android.view.View; import android.widget.GridView; import android.widget.ImageView; +import android.widget.ProgressBar; import android.widget.TextView; import androidx.appcompat.widget.Toolbar; import androidx.lifecycle.ViewModelProvider; @@ -30,6 +31,7 @@ public class OrganizationTeamMembersActivity extends BaseActivity implements Bot private View.OnClickListener onClickListener; private TeamMembersByOrgAdapter adapter; private GridView mGridView; + private ProgressBar progressBar; final Context ctx = this; private Context appCtx; @@ -58,6 +60,7 @@ public class OrganizationTeamMembersActivity extends BaseActivity implements Bot TextView toolbarTitle = findViewById(R.id.toolbar_title); noDataMembers = findViewById(R.id.noDataMembers); mGridView = findViewById(R.id.gridView); + progressBar = findViewById(R.id.progressBar); initCloseListener(); closeActivity.setOnClickListener(onClickListener); @@ -114,6 +117,7 @@ public class OrganizationTeamMembersActivity extends BaseActivity implements Bot noDataMembers.setVisibility(View.VISIBLE); } + progressBar.setVisibility(View.GONE); }); } diff --git a/app/src/main/java/org/mian/gitnex/activities/SponsorsActivity.java b/app/src/main/java/org/mian/gitnex/activities/SponsorsActivity.java deleted file mode 100644 index 7c7a6d0d..00000000 --- a/app/src/main/java/org/mian/gitnex/activities/SponsorsActivity.java +++ /dev/null @@ -1,66 +0,0 @@ -package org.mian.gitnex.activities; - -import androidx.recyclerview.widget.DividerItemDecoration; -import androidx.recyclerview.widget.LinearLayoutManager; -import androidx.recyclerview.widget.RecyclerView; -import android.content.Context; -import android.content.res.Resources; -import android.os.Bundle; -import android.view.View; -import android.widget.ImageView; -import org.mian.gitnex.R; -import org.mian.gitnex.adapters.SponsorsAdapter; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -/** - * Author M M Arif - */ - -public class SponsorsActivity extends BaseActivity { - - private View.OnClickListener onClickListener; - private Context appCtx; - - @Override - protected int getLayoutResourceId(){ - return R.layout.activity_sponsors; - } - - @Override - public void onCreate(Bundle savedInstanceState) { - - super.onCreate(savedInstanceState); - appCtx = getApplicationContext(); - - ImageView closeActivity = findViewById(R.id.close); - - initCloseListener(); - closeActivity.setOnClickListener(onClickListener); - - Resources res = getResources(); - CharSequence[] sponsorsInfo = res.getTextArray(R.array.sponsorsInfo); - - List sponsorsList = new ArrayList<>(Arrays.asList(sponsorsInfo)); - - RecyclerView mRecyclerView = findViewById(R.id.recyclerView); - - mRecyclerView.setHasFixedSize(true); - mRecyclerView.setLayoutManager(new LinearLayoutManager(appCtx)); - - DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(mRecyclerView.getContext(), - DividerItemDecoration.VERTICAL); - mRecyclerView.addItemDecoration(dividerItemDecoration); - - SponsorsAdapter adapter = new SponsorsAdapter(sponsorsList); - mRecyclerView.setAdapter(adapter); - - } - - private void initCloseListener() { - - onClickListener = view -> finish(); - } - -} diff --git a/app/src/main/java/org/mian/gitnex/fragments/AboutFragment.java b/app/src/main/java/org/mian/gitnex/fragments/AboutFragment.java index 1b3da847..1f888ee2 100644 --- a/app/src/main/java/org/mian/gitnex/fragments/AboutFragment.java +++ b/app/src/main/java/org/mian/gitnex/fragments/AboutFragment.java @@ -11,8 +11,6 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; import org.mian.gitnex.R; -import org.mian.gitnex.activities.CreditsActivity; -import org.mian.gitnex.activities.SponsorsActivity; import org.mian.gitnex.helpers.AppUtil; import org.mian.gitnex.helpers.TinyDB; import java.util.Objects; @@ -33,83 +31,62 @@ public class AboutFragment extends Fragment { final TextView donationLink; final TextView donationLinkPatreon; final TextView translateLink; - final TextView creditsButton; - final TextView sponsorsButton; final TextView appWebsite; final TextView appRepo; appVerBuild = v.findViewById(R.id.appVerBuild); TextView viewTextGiteaVersion = v.findViewById(R.id.giteaVersion); - creditsButton = v.findViewById(R.id.creditsButton); donationLink = v.findViewById(R.id.donationLink); donationLinkPatreon = v.findViewById(R.id.donationLinkPatreon); translateLink = v.findViewById(R.id.translateLink); - sponsorsButton = v.findViewById(R.id.sponsorsButton); appWebsite = v.findViewById(R.id.appWebsite); appRepo = v.findViewById(R.id.appRepo); appVerBuild.setText(getString(R.string.appVerBuild, AppUtil.getAppVersion(Objects.requireNonNull(getContext())), AppUtil.getAppBuildNo(getContext()))); - donationLink.setOnClickListener(new View.OnClickListener() { - public void onClick(View v) { - Intent intent = new Intent(); - intent.setAction(Intent.ACTION_VIEW); - intent.addCategory(Intent.CATEGORY_BROWSABLE); - intent.setData(Uri.parse(getResources().getString(R.string.supportLink))); - startActivity(intent); - } + donationLink.setOnClickListener(v1 -> { + + Intent intent = new Intent(); + intent.setAction(Intent.ACTION_VIEW); + intent.addCategory(Intent.CATEGORY_BROWSABLE); + intent.setData(Uri.parse(getResources().getString(R.string.supportLink))); + startActivity(intent); }); - donationLinkPatreon.setOnClickListener(new View.OnClickListener() { - public void onClick(View v) { - Intent intent = new Intent(); - intent.setAction(Intent.ACTION_VIEW); - intent.addCategory(Intent.CATEGORY_BROWSABLE); - intent.setData(Uri.parse(getResources().getString(R.string.supportLinkPatreon))); - startActivity(intent); - } + donationLinkPatreon.setOnClickListener(v12 -> { + + Intent intent = new Intent(); + intent.setAction(Intent.ACTION_VIEW); + intent.addCategory(Intent.CATEGORY_BROWSABLE); + intent.setData(Uri.parse(getResources().getString(R.string.supportLinkPatreon))); + startActivity(intent); }); - translateLink.setOnClickListener(new View.OnClickListener() { - public void onClick(View v) { - Intent intent = new Intent(); - intent.setAction(Intent.ACTION_VIEW); - intent.addCategory(Intent.CATEGORY_BROWSABLE); - intent.setData(Uri.parse(getResources().getString(R.string.crowdInLink))); - startActivity(intent); - } + translateLink.setOnClickListener(v13 -> { + + Intent intent = new Intent(); + intent.setAction(Intent.ACTION_VIEW); + intent.addCategory(Intent.CATEGORY_BROWSABLE); + intent.setData(Uri.parse(getResources().getString(R.string.crowdInLink))); + startActivity(intent); }); - appWebsite.setOnClickListener(new View.OnClickListener() { - public void onClick(View v) { - Intent intent = new Intent(); - intent.setAction(Intent.ACTION_VIEW); - intent.addCategory(Intent.CATEGORY_BROWSABLE); - intent.setData(Uri.parse(getResources().getString(R.string.appWebsiteLink))); - startActivity(intent); - } + appWebsite.setOnClickListener(v14 -> { + + Intent intent = new Intent(); + intent.setAction(Intent.ACTION_VIEW); + intent.addCategory(Intent.CATEGORY_BROWSABLE); + intent.setData(Uri.parse(getResources().getString(R.string.appWebsiteLink))); + startActivity(intent); }); - appRepo.setOnClickListener(new View.OnClickListener() { - public void onClick(View v) { - Intent intent = new Intent(); - intent.setAction(Intent.ACTION_VIEW); - intent.addCategory(Intent.CATEGORY_BROWSABLE); - intent.setData(Uri.parse(getResources().getString(R.string.appRepoLink))); - startActivity(intent); - } - }); + appRepo.setOnClickListener(v15 -> { - creditsButton.setOnClickListener(new View.OnClickListener() { - public void onClick(View v) { - startActivity(new Intent(getContext(), CreditsActivity.class)); - } - }); - - sponsorsButton.setOnClickListener(new View.OnClickListener() { - public void onClick(View v) { - startActivity(new Intent(getContext(), SponsorsActivity.class)); - } + Intent intent = new Intent(); + intent.setAction(Intent.ACTION_VIEW); + intent.addCategory(Intent.CATEGORY_BROWSABLE); + intent.setData(Uri.parse(getResources().getString(R.string.appRepoLink))); + startActivity(intent); }); String commit = getResources().getString(R.string.commitPage) + tinyDb.getString("giteaVersion"); diff --git a/app/src/main/java/org/mian/gitnex/fragments/ExploreRepositoriesFragment.java b/app/src/main/java/org/mian/gitnex/fragments/ExploreRepositoriesFragment.java index 0ee8ee45..dc354883 100644 --- a/app/src/main/java/org/mian/gitnex/fragments/ExploreRepositoriesFragment.java +++ b/app/src/main/java/org/mian/gitnex/fragments/ExploreRepositoriesFragment.java @@ -4,7 +4,6 @@ import android.content.Context; import android.net.Uri; import android.os.Bundle; import android.util.Log; -import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -30,9 +29,8 @@ import retrofit2.Callback; import retrofit2.Response; /** - * + * Template Author M M Arif - * + * Author 6543 - * + + * Template Author Author M M Arif + * Author 6543 */ public class ExploreRepositoriesFragment extends Fragment { @@ -92,23 +90,19 @@ public class ExploreRepositoriesFragment extends Fragment { mProgressBar.setVisibility(View.VISIBLE); - searchKeyword.setOnEditorActionListener(new TextView.OnEditorActionListener() { + searchKeyword.setOnEditorActionListener((v1, actionId, event) -> { - @Override - public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { - - if(actionId == EditorInfo.IME_ACTION_SEND) { - if(!searchKeyword.getText().toString().equals("")) { - mProgressBar.setVisibility(View.VISIBLE); - mRecyclerView.setVisibility(View.GONE); - loadSearchReposList(instanceUrl, instanceToken, loginUid, searchKeyword.getText().toString(), repoTypeInclude, sort, order, getContext(), limit); - } + if(actionId == EditorInfo.IME_ACTION_SEND) { + if(!searchKeyword.getText().toString().equals("")) { + mProgressBar.setVisibility(View.VISIBLE); + mRecyclerView.setVisibility(View.GONE); + loadSearchReposList(instanceUrl, instanceToken, loginUid, searchKeyword.getText().toString(), repoTypeInclude, sort, order, getContext(), limit); } - return false; } + return false; }); - int limitDefault = 10; + int limitDefault = 25; loadDefaultList(instanceUrl, instanceToken, loginUid, repoTypeInclude, sort, order, getContext(), limitDefault); return v; diff --git a/app/src/main/java/org/mian/gitnex/fragments/IssuesFragment.java b/app/src/main/java/org/mian/gitnex/fragments/IssuesFragment.java index 1608b8fc..77a68ab9 100644 --- a/app/src/main/java/org/mian/gitnex/fragments/IssuesFragment.java +++ b/app/src/main/java/org/mian/gitnex/fragments/IssuesFragment.java @@ -55,6 +55,7 @@ public class IssuesFragment extends Fragment { private TextView noDataIssues; private int resultLimit = StaticGlobalVariables.resultLimitOldGiteaInstances; private String requestType = StaticGlobalVariables.issuesRequestType; + private ProgressBar progressLoadMore; @Nullable @Override @@ -83,6 +84,7 @@ public class IssuesFragment extends Fragment { recyclerView = v.findViewById(R.id.recyclerView); issuesList = new ArrayList<>(); + progressLoadMore = v.findViewById(R.id.progressLoadMore); mProgressBar = v.findViewById(R.id.progress_bar); noDataIssues = v.findViewById(R.id.noDataIssues); @@ -226,9 +228,7 @@ public class IssuesFragment extends Fragment { private void loadMore(String token, String repoOwner, String repoName, int page, int resultLimit, String requestType, String issueState) { - //add loading progress view - issuesList.add(new Issues("load")); - adapter.notifyItemInserted((issuesList.size() - 1)); + progressLoadMore.setVisibility(View.VISIBLE); Call> call = api.getIssues(token, repoOwner, repoName, page, resultLimit, requestType, issueState); @@ -239,9 +239,6 @@ public class IssuesFragment extends Fragment { if(response.code() == 200) { - //remove loading view - issuesList.remove(issuesList.size() - 1); - List result = response.body(); assert result != null; @@ -259,6 +256,7 @@ public class IssuesFragment extends Fragment { } adapter.notifyDataChanged(); + progressLoadMore.setVisibility(View.GONE); } else { diff --git a/app/src/main/java/org/mian/gitnex/fragments/MembersByOrgFragment.java b/app/src/main/java/org/mian/gitnex/fragments/MembersByOrgFragment.java index 1c684e83..c763ab93 100644 --- a/app/src/main/java/org/mian/gitnex/fragments/MembersByOrgFragment.java +++ b/app/src/main/java/org/mian/gitnex/fragments/MembersByOrgFragment.java @@ -10,6 +10,7 @@ import android.view.View; import android.view.ViewGroup; import android.view.inputmethod.EditorInfo; import android.widget.GridView; +import android.widget.ProgressBar; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -39,6 +40,7 @@ public class MembersByOrgFragment extends Fragment { private String orgName; private MembersByOrgAdapter adapter; private GridView mGridView; + private ProgressBar progressBar; public MembersByOrgFragment() { } @@ -72,6 +74,7 @@ public class MembersByOrgFragment extends Fragment { final String instanceToken = "token " + tinyDb.getString(loginUid + "-token"); noDataMembers = v.findViewById(R.id.noDataMembers); + progressBar = v.findViewById(R.id.progressBar); mGridView = v.findViewById(R.id.gridView); fetchDataAsync(instanceUrl, Authorization.returnAuthentication(getContext(), loginUid, instanceToken), orgName); @@ -96,6 +99,8 @@ public class MembersByOrgFragment extends Fragment { mGridView.setAdapter(adapter); noDataMembers.setVisibility(View.VISIBLE); } + + progressBar.setVisibility(View.GONE); } }); diff --git a/app/src/main/java/org/mian/gitnex/fragments/MilestonesFragment.java b/app/src/main/java/org/mian/gitnex/fragments/MilestonesFragment.java index 11ff775e..91323f7f 100644 --- a/app/src/main/java/org/mian/gitnex/fragments/MilestonesFragment.java +++ b/app/src/main/java/org/mian/gitnex/fragments/MilestonesFragment.java @@ -219,9 +219,7 @@ public class MilestonesFragment extends Fragment { private void loadMore(String token, String repoOwner, String repoName, int page, int resultLimit, String milestoneState) { - //add loading progress view - dataList.add(new Milestones("load")); - adapter.notifyItemInserted((dataList.size() - 1)); + viewBinding.progressLoadMore.setVisibility(View.VISIBLE); Call> call = api.getMilestones(token, repoOwner, repoName, page, resultLimit, milestoneState); @@ -251,6 +249,7 @@ public class MilestonesFragment extends Fragment { } adapter.notifyDataChanged(); + viewBinding.progressLoadMore.setVisibility(View.GONE); } else { diff --git a/app/src/main/java/org/mian/gitnex/fragments/PullRequestsFragment.java b/app/src/main/java/org/mian/gitnex/fragments/PullRequestsFragment.java index c4035a8e..72bb998f 100644 --- a/app/src/main/java/org/mian/gitnex/fragments/PullRequestsFragment.java +++ b/app/src/main/java/org/mian/gitnex/fragments/PullRequestsFragment.java @@ -55,6 +55,7 @@ public class PullRequestsFragment extends Fragment { private int pageSize = StaticGlobalVariables.prPageInit; private TextView noData; private int resultLimit = StaticGlobalVariables.resultLimitOldGiteaInstances; + private ProgressBar progressLoadMore; @Nullable @Override @@ -83,6 +84,7 @@ public class PullRequestsFragment extends Fragment { recyclerView = v.findViewById(R.id.recyclerView); prList = new ArrayList<>(); + progressLoadMore = v.findViewById(R.id.progressLoadMore); mProgressBar = v.findViewById(R.id.progress_bar); noData = v.findViewById(R.id.noData); @@ -233,9 +235,7 @@ public class PullRequestsFragment extends Fragment { private void loadMore(String token, String repoOwner, String repoName, int page, String prState, int resultLimit) { - //add loading progress view - prList.add(new PullRequests("load")); - adapter.notifyItemInserted((prList.size() - 1)); + progressLoadMore.setVisibility(View.VISIBLE); Call> call = apiPR.getPullRequests(token, repoOwner, repoName, page, prState, resultLimit); @@ -266,6 +266,7 @@ public class PullRequestsFragment extends Fragment { } adapter.notifyDataChanged(); + progressLoadMore.setVisibility(View.GONE); } else { 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 49fb2e01..e1c438f8 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,7 +1,7 @@ - @@ -42,6 +42,14 @@ + + - - - @@ -60,6 +60,14 @@ + + - - diff --git a/app/src/main/res/layout/activity_credits.xml b/app/src/main/res/layout/activity_credits.xml deleted file mode 100644 index d5b85fd8..00000000 --- a/app/src/main/res/layout/activity_credits.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/layout/activity_file_view.xml b/app/src/main/res/layout/activity_file_view.xml index 6a67768a..aff93f71 100644 --- a/app/src/main/res/layout/activity_file_view.xml +++ b/app/src/main/res/layout/activity_file_view.xml @@ -2,6 +2,7 @@ @@ -44,6 +45,13 @@ + + - - diff --git a/app/src/main/res/layout/activity_issue_detail.xml b/app/src/main/res/layout/activity_issue_detail.xml index d7196696..b0e62fb4 100644 --- a/app/src/main/res/layout/activity_issue_detail.xml +++ b/app/src/main/res/layout/activity_issue_detail.xml @@ -16,8 +16,7 @@ + + + + - - - - 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 cf48c73e..1f0e7c26 100644 --- a/app/src/main/res/layout/activity_org_team_members.xml +++ b/app/src/main/res/layout/activity_org_team_members.xml @@ -1,8 +1,8 @@ - @@ -41,6 +41,13 @@ + + - - - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/layout/fragment_about.xml b/app/src/main/res/layout/fragment_about.xml index 17e78512..5c3788e1 100644 --- a/app/src/main/res/layout/fragment_about.xml +++ b/app/src/main/res/layout/fragment_about.xml @@ -129,32 +129,6 @@ android:padding="5dp" android:background="?attr/primaryBackgroundColor"> - - - - - + @@ -190,4 +164,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/layout/fragment_branches.xml b/app/src/main/res/layout/fragment_branches.xml index 8fd7ea7a..5c2768c0 100644 --- a/app/src/main/res/layout/fragment_branches.xml +++ b/app/src/main/res/layout/fragment_branches.xml @@ -1,9 +1,9 @@ - + + - - diff --git a/app/src/main/res/layout/fragment_collaborators.xml b/app/src/main/res/layout/fragment_collaborators.xml index 86826ef1..9d13fe29 100644 --- a/app/src/main/res/layout/fragment_collaborators.xml +++ b/app/src/main/res/layout/fragment_collaborators.xml @@ -2,6 +2,7 @@ @@ -16,6 +17,13 @@ android:stretchMode="columnWidth" android:gravity="center"/> + + - - - \ No newline at end of file + diff --git a/app/src/main/res/layout/fragment_explore_repo.xml b/app/src/main/res/layout/fragment_explore_repo.xml index 5f2899c3..a5d1035d 100644 --- a/app/src/main/res/layout/fragment_explore_repo.xml +++ b/app/src/main/res/layout/fragment_explore_repo.xml @@ -1,11 +1,18 @@ - + + - - - + style="@style/Widget.MaterialComponents.ProgressIndicator.Linear.Indeterminate" + app:indicatorColor="?attr/progressIndicatorColor" /> diff --git a/app/src/main/res/layout/fragment_issues.xml b/app/src/main/res/layout/fragment_issues.xml index c99afd01..e8237bd6 100644 --- a/app/src/main/res/layout/fragment_issues.xml +++ b/app/src/main/res/layout/fragment_issues.xml @@ -1,9 +1,9 @@ - - + style="@style/Widget.MaterialComponents.ProgressIndicator.Linear.Indeterminate" + app:indicatorColor="?attr/progressIndicatorColor" /> + + - + + - - diff --git a/app/src/main/res/layout/fragment_members_by_org.xml b/app/src/main/res/layout/fragment_members_by_org.xml index 809289c2..9dbf4e5d 100644 --- a/app/src/main/res/layout/fragment_members_by_org.xml +++ b/app/src/main/res/layout/fragment_members_by_org.xml @@ -2,6 +2,7 @@ @@ -16,6 +17,13 @@ android:stretchMode="columnWidth" android:gravity="center"/> + + - \ No newline at end of file + diff --git a/app/src/main/res/layout/fragment_milestones.xml b/app/src/main/res/layout/fragment_milestones.xml index 699f37ca..d9b51075 100644 --- a/app/src/main/res/layout/fragment_milestones.xml +++ b/app/src/main/res/layout/fragment_milestones.xml @@ -1,9 +1,9 @@ - + + + + - - - + style="@style/Widget.MaterialComponents.ProgressIndicator.Linear.Indeterminate" + app:indicatorColor="?attr/progressIndicatorColor" /> - - - - @@ -35,6 +20,21 @@ + + + + - - - - - + android:layout_height="wrap_content" + style="@style/Widget.MaterialComponents.ProgressIndicator.Linear.Indeterminate" + app:indicatorColor="?attr/progressIndicatorColor" /> diff --git a/app/src/main/res/layout/fragment_organizations.xml b/app/src/main/res/layout/fragment_organizations.xml index 120d0d38..27c50655 100644 --- a/app/src/main/res/layout/fragment_organizations.xml +++ b/app/src/main/res/layout/fragment_organizations.xml @@ -19,14 +19,12 @@ - + style="@style/Widget.MaterialComponents.ProgressIndicator.Linear.Indeterminate" + app:indicatorColor="?attr/progressIndicatorColor" /> @@ -111,6 +111,7 @@ android:layout_width="match_parent" app:tabTextColor="?attr/primaryTextColor" android:background="?attr/primaryBackgroundColor" + app:tabIndicatorColor="@color/darkGreen" android:layout_height="wrap_content"> - + android:layout_height="wrap_content" + xmlns:app="http://schemas.android.com/apk/res-auto"> + + - - diff --git a/app/src/main/res/layout/fragment_profile_followers.xml b/app/src/main/res/layout/fragment_profile_followers.xml index d76dcf11..ac5d71b3 100644 --- a/app/src/main/res/layout/fragment_profile_followers.xml +++ b/app/src/main/res/layout/fragment_profile_followers.xml @@ -1,8 +1,8 @@ - + android:layout_height="wrap_content" + xmlns:app="http://schemas.android.com/apk/res-auto"> + + - - diff --git a/app/src/main/res/layout/fragment_profile_following.xml b/app/src/main/res/layout/fragment_profile_following.xml index 80b4a6f7..4bf66239 100644 --- a/app/src/main/res/layout/fragment_profile_following.xml +++ b/app/src/main/res/layout/fragment_profile_following.xml @@ -1,8 +1,8 @@ - + android:layout_height="wrap_content" + xmlns:app="http://schemas.android.com/apk/res-auto"> + + - - diff --git a/app/src/main/res/layout/fragment_pull_requests.xml b/app/src/main/res/layout/fragment_pull_requests.xml index 4ab09666..6d8cb9c6 100644 --- a/app/src/main/res/layout/fragment_pull_requests.xml +++ b/app/src/main/res/layout/fragment_pull_requests.xml @@ -1,9 +1,9 @@ - - + style="@style/Widget.MaterialComponents.ProgressIndicator.Linear.Indeterminate" + app:indicatorColor="?attr/progressIndicatorColor" /> + + - + + - - diff --git a/app/src/main/res/layout/fragment_repo_info.xml b/app/src/main/res/layout/fragment_repo_info.xml index cd4eed25..d4ccea8a 100644 --- a/app/src/main/res/layout/fragment_repo_info.xml +++ b/app/src/main/res/layout/fragment_repo_info.xml @@ -370,19 +370,11 @@ - - - - - + android:layout_height="wrap_content" + style="@style/Widget.MaterialComponents.ProgressIndicator.Linear.Indeterminate" + app:indicatorColor="?attr/progressIndicatorColor" /> diff --git a/app/src/main/res/layout/fragment_repositories.xml b/app/src/main/res/layout/fragment_repositories.xml index afb81e0d..3044e1e0 100644 --- a/app/src/main/res/layout/fragment_repositories.xml +++ b/app/src/main/res/layout/fragment_repositories.xml @@ -21,6 +21,13 @@ + + - - + + - - diff --git a/app/src/main/res/layout/fragment_starred_repositories.xml b/app/src/main/res/layout/fragment_starred_repositories.xml index afb81e0d..3044e1e0 100644 --- a/app/src/main/res/layout/fragment_starred_repositories.xml +++ b/app/src/main/res/layout/fragment_starred_repositories.xml @@ -21,6 +21,13 @@ + + - - + + - - diff --git a/app/src/main/res/values-v23/themes.xml b/app/src/main/res/values-v23/themes.xml index 84bfb986..e8fe3576 100644 --- a/app/src/main/res/values-v23/themes.xml +++ b/app/src/main/res/values-v23/themes.xml @@ -7,6 +7,8 @@ monospace @color/colorAccent @color/lightThemeTextColor + @color/darkGreen + @color/lightThemeTextColor @color/lightThemeDiffAddedColor @color/lightThemeDiffRemovedColor @@ -26,6 +28,7 @@ @color/lightThemeDividerColor @style/AppThemeLightBottomSheetDialog @style/AppSearchViewStyle + @color/darkGreen diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml index 992b3fd7..c1028eb7 100644 --- a/app/src/main/res/values/attrs.xml +++ b/app/src/main/res/values/attrs.xml @@ -11,4 +11,5 @@ + diff --git a/app/src/main/res/values/credits.xml b/app/src/main/res/values/credits.xml deleted file mode 100644 index 5f1fbbe2..00000000 --- a/app/src/main/res/values/credits.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - Removed - - - \ No newline at end of file diff --git a/app/src/main/res/values/sponsors.xml b/app/src/main/res/values/sponsors.xml deleted file mode 100644 index 60854d4b..00000000 --- a/app/src/main/res/values/sponsors.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - Fabian Stamm - Thomas Schneider @Fedilab - Ljoonal @ljoonal - Tobias @Tobias - Sameer Gupta - Yin Yihang - Svierne - Sam Forest - - - diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index e62a2d88..4d758fe6 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -8,6 +8,8 @@ @color/colorAccent @color/colorWhite @color/colorWhite + @color/darkGreen + @color/colorWhite @color/diffAddedColor @color/diffRemovedColor @@ -27,6 +29,7 @@ @color/dividerColorDark @style/AppThemeDarkBottomSheetDialog @style/AppSearchViewStyle + @color/darkGreen @@ -37,6 +40,8 @@ @color/colorAccent @color/lightThemeTextColor @color/lightThemeTextColor + @color/darkGreen + @color/lightThemeTextColor @color/lightThemeDiffAddedColor @color/lightThemeDiffRemovedColor @@ -56,6 +61,7 @@ @color/lightThemeDividerColor @style/AppThemeLightBottomSheetDialog @style/AppSearchViewStyle + @color/darkGreen