Merge remote-tracking branch 'origin/niels-profile' into felix
This commit is contained in:
@@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
|
android:screenOrientation="portrait"
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:label="@string/app_name">
|
android:label="@string/app_name">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
@@ -34,7 +35,9 @@
|
|||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<activity android:name=".LoginActivity">
|
<activity
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:name=".LoginActivity">
|
||||||
|
|
||||||
</activity>
|
</activity>
|
||||||
</application>
|
</application>
|
||||||
|
|||||||
@@ -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">
|
||||||
|
|
||||||
<ListView
|
<RelativeLayout
|
||||||
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>
|
|
||||||
|
<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>
|
</LinearLayout>
|
||||||
Reference in New Issue
Block a user