-
Notifications
You must be signed in to change notification settings - Fork 25
Android_Profile Screen
In this section we'll add a My Profile Screen to our application, and we'll only focus on the layout part, we won't go into implementation of background logic.
On My Profile Screen I want to add a picture of the user, his name, occupation, education, interests, what the user is knowledgeable in, and what are his current goals. I want to show the same information both in My Profile Screen and in Contact Screen, with only difference that the Contact Screen is not editable, since it's showing information of other users.
I'm going to use LinearLayout
with vertical
orientation to stack all my views within this layout. The process is pretty straightforward, and the code is rather long, so I won't be showing it here, rather, you can follow this link to see the full source code.
As I already said, the difference between My Profile and Contact screen is only that the Contact screen is not editable, so I'm going to use this to quickly create the Contact Layout as well. Again, I'm not pasting any code, but you can see what I did in this commit or in this layout file. The process of adding new screens is already described here.
The only thing I'd point out in this post is the android:hint
attribute. This is used to specify a text value that will be displayed in an empty EditText
view, and will disappear after you start typing. This is a pretty useful feature that can help users understand what is expected of them, and what's the purpose of a specific EditText
.
Creating the two layouts for My Profile and Contact screens was rather straightforward, especially after I previously created the reusable layout that I was able to simply include in these new layouts. Below you can see the look of the My Profile and Contact screens, respectively.
- Android
- Getting Started
- Project Structure
- Gradle
- Menu
- Theming
- Login Screen
- Menu & Navigation
- Importing Library From GitHub
- Creating Reusable Layouts
- Adding New Icons
- Profile Screen
- Chat Screen
- Contacts Screen
- Pending Invites Screen
- Settings Screen
- Add Library Dependency
- Discover Users Screen
- Splash Screen
- Auth0
- Authentication Logic
- Profile Screen Logic
- Send Feedback
- Authenticated to Firebase via Auth0
- Saving User Info to Firebase
- Storing User Connection Info to Firebase
- Calculating Distance Between Users
- Chat Logic
- Handling Device Rotation
- Android Other
- Ionic
- Getting Started
- Project Structure
- Menu
- Theming
- Login Screen
- Adding Images
- Creating Reusable Layouts
- Adding New Icons
- Profile Screen
- Contact Screen
- Elastic Textarea
- Chat Bubble
- Chat Screen
- Contacts Screen
- Pending Invites Screen
- Settings Screen
- Discover Users Screen
- Splash Screen
- Animations
- Auth0
- Storing User Data
- Profile Screen Logic
- Send Feedback
- Update to Ionic RC0
- Reimplemented Auth0 with Ionic RC0
- Authenticated to Firebase via Auth0
- Saving User Info to Firebase
- Storing User Connection Info to Firebase
- Calculating Distance Between Users
- Chat Logic
- Handling Device Rotation
- Ionic Other
- Version Updating
- Cordova
- Other
- Messaging