Added a progressBar to the profilepage aswell.
This commit is contained in:
@@ -16,6 +16,7 @@ import android.widget.Button;
|
|||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
|
import android.widget.ProgressBar;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
@@ -52,6 +53,7 @@ public class ProfileFragment extends Fragment implements View.OnClickListener {
|
|||||||
private DownloadClass downloadClass;
|
private DownloadClass downloadClass;
|
||||||
private View headerInflater;
|
private View headerInflater;
|
||||||
private View timeLineInflater;
|
private View timeLineInflater;
|
||||||
|
private ProgressBar progressBar;
|
||||||
|
|
||||||
/* Required empty public constructor */
|
/* Required empty public constructor */
|
||||||
public ProfileFragment() {}
|
public ProfileFragment() {}
|
||||||
@@ -109,6 +111,8 @@ public class ProfileFragment extends Fragment implements View.OnClickListener {
|
|||||||
|
|
||||||
timeLineInflater = inflater.inflate(R.layout.fragment_profile_timeline, container, false);
|
timeLineInflater = inflater.inflate(R.layout.fragment_profile_timeline, container, false);
|
||||||
headerInflater = inflater.inflate(R.layout.fragment_profile_header, listView, false);
|
headerInflater = inflater.inflate(R.layout.fragment_profile_header, listView, false);
|
||||||
|
progressBar = (ProgressBar) timeLineInflater.findViewById(R.id.progressbar_timeline);
|
||||||
|
progressBar.setVisibility(View.VISIBLE);
|
||||||
findHeaderViews();
|
findHeaderViews();
|
||||||
findTimelineViews();
|
findTimelineViews();
|
||||||
|
|
||||||
@@ -179,6 +183,7 @@ public class ProfileFragment extends Fragment implements View.OnClickListener {
|
|||||||
public void startList() {
|
public void startList() {
|
||||||
ProfileAdapter adapter = new ProfileAdapter(getActivity(), downloadClass.getOwnPosts());
|
ProfileAdapter adapter = new ProfileAdapter(getActivity(), downloadClass.getOwnPosts());
|
||||||
listView.setAdapter(adapter);
|
listView.setAdapter(adapter);
|
||||||
|
progressBar.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -5,9 +5,24 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:context="nl.myhyvesbookplus.tagram.TimelineFragment">
|
tools:context="nl.myhyvesbookplus.tagram.TimelineFragment">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<ProgressBar
|
||||||
|
android:id="@+id/progressbar_timeline"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:indeterminate="true"
|
||||||
|
android:visibility="gone"/>
|
||||||
|
|
||||||
<ListView
|
<ListView
|
||||||
android:id="@+id/list"
|
android:id="@+id/list"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
</ListView>
|
</ListView>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
Reference in New Issue
Block a user