diff options
author | Iván Ávalos <avalos@disroot.org> | 2022-01-13 00:40:40 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2022-01-13 00:40:40 -0600 |
commit | beca6444ba01e2c4052c45fe04166afcc5035449 (patch) | |
tree | c55d168a42011cf18a94540ad2bba646c22e5474 /androidApp/src/main/res/layout/user_information_activity.xml | |
parent | 16959dc1595218c61822110fed9f8f9c4bb9b52b (diff) | |
download | etbsa-trackermap-mobile-beca6444ba01e2c4052c45fe04166afcc5035449.tar.gz etbsa-trackermap-mobile-beca6444ba01e2c4052c45fe04166afcc5035449.tar.bz2 etbsa-trackermap-mobile-beca6444ba01e2c4052c45fe04166afcc5035449.zip |
Finished and redesigned UserInformationActivity and added About section
Diffstat (limited to 'androidApp/src/main/res/layout/user_information_activity.xml')
-rw-r--r-- | androidApp/src/main/res/layout/user_information_activity.xml | 312 |
1 files changed, 184 insertions, 128 deletions
diff --git a/androidApp/src/main/res/layout/user_information_activity.xml b/androidApp/src/main/res/layout/user_information_activity.xml index 8bb994a..0b4924a 100644 --- a/androidApp/src/main/res/layout/user_information_activity.xml +++ b/androidApp/src/main/res/layout/user_information_activity.xml @@ -14,143 +14,199 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintBottom_toBottomOf="parent" + android:translationZ="2dp" android:visibility="gone"/> - <androidx.cardview.widget.CardView - android:id="@+id/userInfoCard" - android:layout_margin="@dimen/card_margin" + <com.google.android.material.floatingactionbutton.FloatingActionButton + android:id="@+id/backButton" + android:layout_width="wrap_content" + android:layout_height="0dp" + android:layout_margin="@dimen/fab_margin" + android:backgroundTint="@android:color/white" + android:contentDescription="@string/open_profile" + android:src="@drawable/icon_back" + app:borderWidth="0dp" + app:elevation="@dimen/fab_elevation" + app:fabSize="mini" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <ScrollView android:layout_width="0dp" - android:layout_height="wrap_content" - app:layout_constraintTop_toTopOf="parent" + android:layout_height="0dp" + android:layout_marginTop="@dimen/fab_margin" + app:layout_constraintTop_toBottomOf="@id/backButton" app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:contentPadding="@dimen/card_padding" - app:cardCornerRadius="@dimen/card_border_radius" - app:cardElevation="@dimen/card_elevation"> + app:layout_constraintBottom_toBottomOf="parent"> - <androidx.constraintlayout.widget.ConstraintLayout + <LinearLayout android:layout_width="match_parent" - android:layout_height="wrap_content"> + android:layout_height="wrap_content" + android:orientation="vertical"> - <TextView - android:id="@+id/usernameLabel" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:text="@string/username" - app:layout_constraintBottom_toTopOf="@id/usernameInfo" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintVertical_chainStyle="spread_inside" /> - - <TextView - android:id="@+id/usernameInfo" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:layout_constraintBottom_toTopOf="@id/emailLabel" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/usernameLabel" - tools:text="Username" /> - - <TextView - android:id="@+id/emailLabel" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/fields_spacing" - android:text="@string/email" - app:layout_constraintBottom_toTopOf="@id/emailInfo" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/usernameInfo" /> - - <TextView - android:id="@+id/emailInfo" - android:layout_width="0dp" + <androidx.cardview.widget.CardView + android:id="@+id/userInfoCard" + android:layout_margin="@dimen/card_margin" + android:layout_width="match_parent" android:layout_height="wrap_content" - app:layout_constraintBottom_toTopOf="@id/idLabel" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/emailLabel" - tools:text="Email" /> - - <TextView - android:id="@+id/idLabel" - android:layout_width="0dp" + app:contentPadding="@dimen/card_padding" + app:cardCornerRadius="@dimen/card_border_radius" + app:cardElevation="@dimen/card_elevation"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/fields_spacing" + android:text="@string/user_details" + android:textAppearance="@style/TextAppearance.AppCompat.Headline"/> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/username" + android:textAppearance="@style/TextAppearance.AppCompat.Body2"/> + + <TextView + android:id="@+id/usernameInfo" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/fields_spacing" + tools:text="Username" /> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/email" + android:textAppearance="@style/TextAppearance.AppCompat.Body2"/> + + <TextView + android:id="@+id/emailInfo" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/fields_spacing" + tools:text="Email" /> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/unique_id" + android:textAppearance="@style/TextAppearance.AppCompat.Body2"/> + + <TextView + android:id="@+id/idInfo" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/fields_spacing" + tools:text="Unique ID" /> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/device_limit" + android:textAppearance="@style/TextAppearance.AppCompat.Body2"/> + + <TextView + android:id="@+id/deviceLimitInfo" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/fields_spacing" + tools:text="Device Limit" /> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/admin" + android:textAppearance="@style/TextAppearance.AppCompat.Body2"/> + + <TextView + android:id="@+id/adminInfo" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/fields_spacing" + tools:text="Admin" /> + + <com.google.android.material.button.MaterialButton + android:id="@+id/signoutButton" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/sign_out" /> + + </LinearLayout> + + </androidx.cardview.widget.CardView> + + <androidx.cardview.widget.CardView + android:id="@+id/aboutCard" + android:layout_margin="@dimen/card_margin" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="@dimen/fields_spacing" - android:text="@string/unique_id" - app:layout_constraintBottom_toTopOf="@id/idInfo" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/emailInfo" /> - - <TextView - android:id="@+id/idInfo" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:layout_constraintBottom_toTopOf="@id/deviceLimitLabel" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/idLabel" - tools:text="Unique ID" /> - - <TextView - android:id="@+id/deviceLimitLabel" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/fields_spacing" - android:text="@string/device_limit" - app:layout_constraintBottom_toTopOf="@id/deviceLimitInfo" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/idInfo" /> - - <TextView - android:id="@+id/deviceLimitInfo" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:layout_constraintBottom_toTopOf="@id/adminLabel" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/deviceLimitLabel" - tools:text="Device Limit" /> - - <TextView - android:id="@+id/adminLabel" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/fields_spacing" - android:text="@string/admin" - app:layout_constraintBottom_toTopOf="@id/adminInfo" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/deviceLimitInfo" /> - - <TextView - android:id="@+id/adminInfo" - android:layout_width="0dp" - android:layout_height="wrap_content" - app:layout_constraintBottom_toTopOf="@id/signoutButton" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/adminLabel" - tools:text="Admin" /> - - <com.google.android.material.button.MaterialButton - android:id="@+id/signoutButton" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/fields_spacing" - android:text="@string/sign_out" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/adminInfo" /> - - </androidx.constraintlayout.widget.ConstraintLayout> - - </androidx.cardview.widget.CardView> + app:contentPadding="@dimen/card_padding" + app:cardCornerRadius="@dimen/card_border_radius" + app:cardElevation="@dimen/card_elevation"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/fields_spacing" + android:text="@string/about_details" + android:textAppearance="@style/TextAppearance.AppCompat.Headline"/> + + <ImageView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/fields_spacing" + android:contentDescription="@string/about_logo" + android:src="@drawable/about_logo" /> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/fields_spacing" + android:text="@string/about_text" + android:maxLines="10"/> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/app_version" + android:textAppearance="@style/TextAppearance.AppCompat.Body2"/> + + <TextView + android:id="@+id/appVersion" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/fields_spacing" + tools:text="1.0" /> + + <com.google.android.material.button.MaterialButton + android:id="@+id/sourceCodeButton" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/source_code" /> + + <com.google.android.material.button.MaterialButton + android:id="@+id/websiteButton" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/open_website" /> + + </LinearLayout> + + </androidx.cardview.widget.CardView> + + </LinearLayout> + + </ScrollView> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file |