Skip to content

Commit

Permalink
feat: Redesign program info activity (1/3)
Browse files Browse the repository at this point in the history
  • Loading branch information
aikrq committed Oct 14, 2024
1 parent 780c197 commit fbbf51b
Showing 1 changed file with 82 additions and 87 deletions.
169 changes: 82 additions & 87 deletions app/src/main/res/layout/program_info.xml
Original file line number Diff line number Diff line change
@@ -1,103 +1,98 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_height="match_parent">

<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:navigationIcon="?attr/homeAsUpIndicator"
app:elevation="0dp" />
app:elevation="0dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/app_icon"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_marginStart="20dp"
android:layout_marginTop="16dp"
android:src="@drawable/sketch_app_icon"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/toolbar" />

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">

<ImageView
android:id="@+id/app_icon"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp"
android:src="@drawable/sketch_app_icon"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/app_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="@string/title_sketchware"
android:textAppearance="?attr/textAppearanceHeadlineSmall"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/app_icon"
app:layout_constraintTop_toTopOf="@id/app_icon" />

<TextView
android:id="@+id/app_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="@string/title_sketchware"
android:textAppearance="?attr/textAppearanceHeadlineSmall"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/app_icon"
app:layout_constraintTop_toTopOf="@id/app_icon" />
<TextView
android:id="@+id/app_version"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginTop="3dp"
android:textAppearance="?attr/textAppearanceBodyLarge"
android:textColor="?attr/colorPrimary"
android:textIsSelectable="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/app_name"
app:layout_constraintTop_toBottomOf="@id/app_name"
tools:text="Version 1.0.0" />

<TextView
android:id="@+id/app_version"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:textAppearance="?attr/textAppearanceBodyLarge"
android:textColor="?attr/colorPrimary"
android:textIsSelectable="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/app_name"
app:layout_constraintTop_toBottomOf="@id/app_name"
tools:text="Version 1.0.0" />
<TextView
android:id="@+id/app_copyright"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginTop="3dp"
android:text="Copyright ⓒ Sketchware. All Rights Reserved."
android:textAppearance="?attr/textAppearanceBodyMedium"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/app_name"
app:layout_constraintTop_toBottomOf="@id/app_version" />

<TextView
android:id="@+id/app_copyright"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:text="Copyright ⓒ Sketchware. All Rights Reserved."
android:textAppearance="?attr/textAppearanceBodyMedium"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/app_name"
app:layout_constraintTop_toBottomOf="@id/app_version" />
<Button
android:id="@+id/btn_reset"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginStart="20dp"
android:layout_marginTop="16dp"
android:text="@string/program_information_button_reset_system"
app:layout_constraintEnd_toStartOf="@id/btn_upgrade"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/app_copyright" />

<Button
android:id="@+id/btn_reset"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginStart="20dp"
android:layout_marginTop="12dp"
android:text="@string/program_information_button_reset_system"
app:layout_constraintEnd_toStartOf="@id/btn_upgrade"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/app_copyright" />
<Button
android:id="@+id/btn_upgrade"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="20dp"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
android:text="@string/program_information_button_check_update"
app:layout_constraintStart_toEndOf="@id/btn_reset"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/app_copyright" />

<Button
android:id="@+id/btn_upgrade"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="20dp"
android:layout_marginStart="8dp"
android:layout_marginTop="12dp"
android:text="@string/program_information_button_check_update"
app:layout_constraintStart_toEndOf="@id/btn_reset"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/app_copyright" />
<LinearLayout
android:id="@+id/content"
android:layout_width="0dp"
android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btn_reset" />

<LinearLayout
android:id="@+id/content"
android:layout_width="0dp"
android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btn_reset" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

0 comments on commit fbbf51b

Please sign in to comment.