From 9d016b8c6509882e7aca2d509813e8ed4b6efd44 Mon Sep 17 00:00:00 2001 From: Niels Zwemmer Date: Thu, 29 Jun 2017 14:01:27 +0200 Subject: [PATCH] Added a progressBar to the profilepage aswell. --- .../tagram/ProfileFragment.java | 5 +++++ .../res/layout/fragment_profile_timeline.xml | 21 ++++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/app/MyHyvesBookPlusStagram/app/src/main/java/nl/myhyvesbookplus/tagram/ProfileFragment.java b/app/MyHyvesBookPlusStagram/app/src/main/java/nl/myhyvesbookplus/tagram/ProfileFragment.java index 465a08a..43493f4 100644 --- a/app/MyHyvesBookPlusStagram/app/src/main/java/nl/myhyvesbookplus/tagram/ProfileFragment.java +++ b/app/MyHyvesBookPlusStagram/app/src/main/java/nl/myhyvesbookplus/tagram/ProfileFragment.java @@ -16,6 +16,7 @@ import android.widget.Button; import android.widget.ImageButton; import android.widget.ImageView; import android.widget.ListView; +import android.widget.ProgressBar; import android.widget.TextView; import android.widget.Toast; import com.bumptech.glide.Glide; @@ -52,6 +53,7 @@ public class ProfileFragment extends Fragment implements View.OnClickListener { private DownloadClass downloadClass; private View headerInflater; private View timeLineInflater; + private ProgressBar progressBar; /* Required empty public constructor */ public ProfileFragment() {} @@ -109,6 +111,8 @@ public class ProfileFragment extends Fragment implements View.OnClickListener { timeLineInflater = inflater.inflate(R.layout.fragment_profile_timeline, container, false); headerInflater = inflater.inflate(R.layout.fragment_profile_header, listView, false); + progressBar = (ProgressBar) timeLineInflater.findViewById(R.id.progressbar_timeline); + progressBar.setVisibility(View.VISIBLE); findHeaderViews(); findTimelineViews(); @@ -179,6 +183,7 @@ public class ProfileFragment extends Fragment implements View.OnClickListener { public void startList() { ProfileAdapter adapter = new ProfileAdapter(getActivity(), downloadClass.getOwnPosts()); listView.setAdapter(adapter); + progressBar.setVisibility(View.GONE); } /** diff --git a/app/MyHyvesBookPlusStagram/app/src/main/res/layout/fragment_profile_timeline.xml b/app/MyHyvesBookPlusStagram/app/src/main/res/layout/fragment_profile_timeline.xml index 523ff58..ea8dc3c 100644 --- a/app/MyHyvesBookPlusStagram/app/src/main/res/layout/fragment_profile_timeline.xml +++ b/app/MyHyvesBookPlusStagram/app/src/main/res/layout/fragment_profile_timeline.xml @@ -5,9 +5,24 @@ android:orientation="vertical" tools:context="nl.myhyvesbookplus.tagram.TimelineFragment"> - - + + + + + + + + \ No newline at end of file