public class ViewProfileActivity
extends AppCompatActivity
Modifier and Type | Class and Description |
---|---|
(package private) class |
ViewProfileActivity.ContributionsPager
This PagerAdapter returns the correct fragment based on which list the user wishes to see.
|
Modifier and Type | Field and Description |
---|---|
(package private) android.widget.TextView |
bio
Text fields for the displayed profile's display name, bio, and name
|
(package private) android.widget.TextView |
fullName
Text fields for the displayed profile's display name, bio, and name
|
(package private) android.widget.FrameLayout |
loadingOverlay |
(package private) TabLayout |
mTabLayout
Handles the tabs available in the interface and serves as the framework on which the rest
of the UI elements are arranged.
|
(package private) ViewPager |
mViewPager
Manages the variety of lists that could be displayed: networks, posts, and events
|
(package private) android.widget.ImageView |
profilePic
Field for the displayed profile's photo
|
(package private) RequestQueue |
queue
Queue for asynchronous tasks
|
static java.lang.String |
SELECTED_USER
Key for extra in
Intent s that specifies the user whose profile is
to be displayed. |
(package private) long |
selUser
ID of the
User whose profile to display |
(package private) android.widget.TextView |
userName
Text fields for the displayed profile's display name, bio, and name
|
Constructor and Description |
---|
ViewProfileActivity() |
Modifier and Type | Method and Description |
---|---|
protected void |
onCreate(android.os.Bundle savedInstanceState)
Setup the user interface using the layout defined in
R.layout#activity_view_profile
and configure the various tabs. |
void |
onStop()
This ensures that we are canceling all network requests if the user is leaving this activity.
|
boolean |
onSupportNavigateUp()
This allows the user to hit the back button on the toolbar to go to the previous activity.
|
public static final java.lang.String SELECTED_USER
Intent
s that specifies the user whose profile is
to be displayed. This should be included in the intent that launches this activity.ViewPager mViewPager
TabLayout mTabLayout
android.widget.TextView userName
android.widget.TextView bio
android.widget.TextView fullName
android.widget.ImageView profilePic
android.widget.FrameLayout loadingOverlay
long selUser
User
whose profile to displayRequestQueue queue
protected void onCreate(android.os.Bundle savedInstanceState)
R.layout#activity_view_profile
and configure the various tabs. Initialize instance fields with the elements of the
View
created from the layout and fill the UI fields with the content
of the profile using API.Get#user(RequestQueue, long, Response.Listener)
savedInstanceState
- public boolean onSupportNavigateUp()
true
public void onStop()