From 4e4da0568d10a2baa1bcbe9f2dbc703977a57e3e Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Wed, 29 Jun 2022 16:08:38 +0200 Subject: [PATCH] Add header view back --- .../fragments/CommitDetailFragment.java | 6 - .../main/res/layout/custom_commit_header.xml | 100 --------------- .../res/layout/fragment_commit_details.xml | 119 ++++++++++++++++-- 3 files changed, 112 insertions(+), 113 deletions(-) delete mode 100644 app/src/main/res/layout/custom_commit_header.xml diff --git a/app/src/main/java/org/mian/gitnex/fragments/CommitDetailFragment.java b/app/src/main/java/org/mian/gitnex/fragments/CommitDetailFragment.java index eab290e2..4c4ec1bc 100644 --- a/app/src/main/java/org/mian/gitnex/fragments/CommitDetailFragment.java +++ b/app/src/main/java/org/mian/gitnex/fragments/CommitDetailFragment.java @@ -21,7 +21,6 @@ import org.mian.gitnex.activities.ProfileActivity; import org.mian.gitnex.adapters.DiffFilesAdapter; import org.mian.gitnex.clients.PicassoService; import org.mian.gitnex.clients.RetrofitClient; -import org.mian.gitnex.databinding.CustomCommitHeaderBinding; import org.mian.gitnex.databinding.FragmentCommitDetailsBinding; import org.mian.gitnex.helpers.AlertDialogs; import org.mian.gitnex.helpers.AppUtil; @@ -146,11 +145,6 @@ public class CommitDetailFragment extends Fragment { public void onResponse(@NonNull Call call, @NonNull Response response) { checkLoading(); - CustomCommitHeaderBinding binding = CustomCommitHeaderBinding.inflate(getLayoutInflater()); - binding.getRoot().setOnClickListener((v) -> { - // we need a ClickListener here to prevent that the ItemClickListener of the diffFiles ListView handles clicks for the header - }); - //CommitDetailFragment.this.binding.diffFiles.addHeaderView(binding.getRoot()); Commit commitsModel = response.body(); if(commitsModel == null) { onFailure(call, new Throwable()); diff --git a/app/src/main/res/layout/custom_commit_header.xml b/app/src/main/res/layout/custom_commit_header.xml deleted file mode 100644 index c3787a38..00000000 --- a/app/src/main/res/layout/custom_commit_header.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/layout/fragment_commit_details.xml b/app/src/main/res/layout/fragment_commit_details.xml index beb34c35..5383c8ac 100644 --- a/app/src/main/res/layout/fragment_commit_details.xml +++ b/app/src/main/res/layout/fragment_commit_details.xml @@ -2,6 +2,7 @@ @@ -57,13 +58,117 @@ style="@style/Widget.MaterialComponents.LinearProgressIndicator" app:indicatorColor="?attr/progressIndicatorColor" /> - + android:layout_height="match_parent"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +