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.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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,9 +5,24 @@
|
||||
android:orientation="vertical"
|
||||
tools:context="nl.myhyvesbookplus.tagram.TimelineFragment">
|
||||
|
||||
<ListView
|
||||
android:id="@+id/list"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
</ListView>
|
||||
|
||||
<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
|
||||
android:id="@+id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
</ListView>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
Reference in New Issue
Block a user