Commit 091f7a15 authored by Timothé KOBAK's avatar Timothé KOBAK

UI improvement and about page

parent 07e62214
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/Theme.ElBuenoPeso" android:theme="@style/Theme.ElBuenoPeso"
tools:targetApi="31"> tools:targetApi="31">
<activity
android:name=".AboutActivity"
android:exported="false" />
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:exported="true" android:exported="true"
......
package com.example.elbuenopeso
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
class AboutActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_about)
}
}
\ No newline at end of file
package com.example.elbuenopeso package com.example.elbuenopeso
import android.content.Intent
import android.os.Bundle import android.os.Bundle
import android.view.Menu import android.view.Menu
import android.view.MenuItem import android.view.MenuItem
...@@ -46,7 +47,8 @@ class MainActivity : AppCompatActivity() { ...@@ -46,7 +47,8 @@ class MainActivity : AppCompatActivity() {
override fun onOptionsItemSelected(item: MenuItem): Boolean { override fun onOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) { when (item.itemId) {
R.id.about -> { R.id.about -> {
Toast.makeText(this, "About Selected", Toast.LENGTH_SHORT).show() // Start AboutActivity when "About" menu item is selected
startActivity(Intent(this, AboutActivity::class.java))
return true return true
} }
R.id.settings -> { R.id.settings -> {
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- Appbar with Toolbar -->
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:title="About"
app:navigationIcon="@drawable/ic_launcher_foreground"
app:navigationContentDescription="Back"
app:layout_scrollFlags="scroll|enterAlways" />
</com.google.android.material.appbar.AppBarLayout>
<!-- Scrollable content -->
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<!-- Main content -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<!-- Project Description -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="This project is a replica of Leboncoin."
android:textSize="18sp"
android:layout_marginBottom="8dp"/>
<!-- Developers -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Developed by:"
android:textSize="18sp"
android:textStyle="bold"
android:layout_marginTop="16dp"
android:layout_marginBottom="8dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Arthur Mata"
android:textSize="16sp"
android:layout_marginBottom="4dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Matis Spineli"
android:textSize="16sp"
android:layout_marginBottom="4dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Timothé Kobak"
android:textSize="16sp"
android:layout_marginBottom="16dp"/>
<!-- Technology -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Technology:"
android:textSize="18sp"
android:textStyle="bold"
android:layout_marginTop="16dp"
android:layout_marginBottom="8dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Kotlin and Android Studio"
android:textSize="16sp"
android:layout_marginBottom="16dp"/>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment